Elimination with matrices