Elimination for systems of equations uses three moves: swap two equations, multiply an equation by a nonzero number, and add a multiple of one equation to another. With matrices we do exactly the same moves on rows of numbers, which is faster to write and easy to organize.
Key idea
Write the augmented matrix (coefficients, a bar, then constants). Use the row operations: swap two rows; multiply a row by a nonzero number; replace a row by itself plus a multiple of another row. Work column by column to get leading $1$s with zeros below them (row-echelon form), then back-substitute, or keep going until the left side is the identity (reduced form) and read off the answer.
Why it works
Each row operation is one of the elimination moves on the equations, and none of them changes the set of solutions: any numbers that satisfied the old equations still satisfy the new ones, and the moves can be undone. So the simple system at the end has exactly the same solutions as the one you started with.
Worked examples
Worked example: Two equations
Solve $2x + y = 5$, $x - y = 1$ with an augmented matrix.
- $\left[\begin{array}{cc|c} 2 & 1 & 5 \\ 1 & -1 & 1 \end{array}\right]$. Swap rows to put a $1$ on top: $\left[\begin{array}{cc|c} 1 & -1 & 1 \\ 2 & 1 & 5 \end{array}\right]$.
- $R_2 \to R_2 - 2R_1$: $\left[\begin{array}{cc|c} 1 & -1 & 1 \\ 0 & 3 & 3 \end{array}\right]$.
- $R_2 \to \frac{1}{3}R_2$: row 2 says $y = 1$. Then $R_1 \to R_1 + R_2$: row 1 says $x = 2$.
Answer: $(x, y) = (2, 1)$
Worked example: Three equations
Solve $x + y + z = 6$, $2x - y + z = 3$, $x + 2y - z = 2$.
- $\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 2 & -1 & 1 & 3 \\ 1 & 2 & -1 & 2 \end{array}\right]$. $R_2 \to R_2 - 2R_1$ and $R_3 \to R_3 - R_1$: $\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & -3 & -1 & -9 \\ 0 & 1 & -2 & -4 \end{array}\right]$.
- Swap $R_2$ and $R_3$, then $R_3 \to R_3 + 3R_2$: $\left[\begin{array}{ccc|c} 1 & 1 & 1 & 6 \\ 0 & 1 & -2 & -4 \\ 0 & 0 & -7 & -21 \end{array}\right]$.
- Back-substitute: $z = 3$; $y - 6 = -4$ gives $y = 2$; $x + 2 + 3 = 6$ gives $x = 1$.
Answer: $(1, 2, 3)$
Worked example: No solution
A system reduces to $\left[\begin{array}{cc|c} 1 & 2 & 4 \\ 0 & 0 & 3 \end{array}\right]$. What does that mean?
- Row 2 says $0x + 0y = 3$, which no numbers satisfy.
Answer: The system has no solution (its lines are parallel)
Common mistake
Changing the coefficients but forgetting the constants column, or adding a multiple of a row to itself (which only rescales it and eliminates nothing). Every operation applies to the whole row, bar included, and a replacement always uses a different row. Check your final answer in all of the original equations.