Algebra › Section D · Systems of linear equations › Topic D.6
Solving systems with matrices
A matrix is a system with the variables peeled off — just the numbers in a grid. Row operations then mechanise elimination until the answer simply sits in the last column.
Matrices: elimination organised
A matrix is a rectangular array of numbers, and a linear system is a matrix waiting to happen. Strip away the variables and what remains is a grid of coefficients with a column of constants. Writing the system this way has one great payoff: the solving process becomes a fixed mechanical routine — swap, scale, add — with no letters to carry around. Hand-solving two or three equations looks like the same work as elimination, but the routine scales unchanged to thousands of unknowns, which is why every serious computation, from engineering to graphics, runs on this algorithm.
Writing the augmented matrix
First put both equations in standard form \(Ax + By = C\), so like terms line up in columns. Then copy the coefficients row by row and the constants after a vertical bar. The system \(2x + y = 7\), \(x - y = 2\) becomes
The bar separates coefficients from constants; each row is one equation in disguise. Reading a matrix backward works the same way: each row becomes an equation with one letter per column before the bar.
The three row operations
Only three moves are ever legal, and each mirrors a legal move on equations, which is why it never changes the solution set. Swap: interchange two rows, like reordering equations. Scale: multiply an entire row by a nonzero constant, like multiplying an equation through. Replace: add a multiple of one row to another row, term by term, like adding a multiple of one equation to another — the heart of elimination. Everything below is these three moves in sequence. Any operation touching a row must touch the whole row, constants included.
Row-echelon form and back-substitution
The target of the routine is a staircase: a leading 1 at the front of each row, zeros below each leading 1, and rows of zeros pushed to the bottom. The systematic route is Gaussian elimination: use the leading entry of a row to clear everything below it, move one column right, and repeat until the staircase is complete. Then translate the finished matrix back into equations and back-substitute upward: the bottom row gives the last variable, and each row above yields one more. When the leading 1s also have zeros above them, the answers sit in the constants column directly.
Worked example: a two-by-two system
Solve \(2x + y = 7\) and \(x - y = 2\). The augmented matrix is
Swap the rows for a leading 1:
Replace row 2 with row 2 minus 2 times row 1:
Scale row 2 by one third, then add row 2 to row 1:
So \(x = 3\) and \(y = 1\). Checking: \(2(3) + 1 = 7\) and \(3 - 1 = 2\).
Worked example: three equations, three variables
Solve \(x + y + z = 6\), \(x + y - z = 0\), \(x - y + z = 2\). The augmented matrix has rows \(1\ 1\ 1\ \vert\ 6\), \(1\ 1\ -1\ \vert\ 0\), \(1\ -1\ 1\ \vert\ 2\). Subtract row 1 from row 2: the new row 2 is \(0\ 0\ -2\ \vert\ -6\), which says \(-2z = -6\), so \(z = 3\). Subtract row 1 from row 3: \(0\ -2\ 0\ \vert\ -4\), so \(y = 2\). The first row then gives \(x + 2 + 3 = 6\), so \(x = 1\). Checking all three originals: \(1 + 2 + 3 = 6\), \(1 + 2 - 3 = 0\), \(1 - 2 + 3 = 2\).
Special cases read straight off the matrix
Row reduction exposes inconsistent and dependent systems without any graphing. A row that reduces to \(0\ 0\ \vert\ k\) with \(k \neq 0\) reads \(0 = k\) — a false statement, so the system has no solution. A row that reduces to \(0\ 0\ \vert\ 0\) reads \(0 = 0\) — no information, meaning the equations are dependent and the system has infinitely many solutions. The same rule holds in three variables: \(0\ 0\ 0\ \vert\ k\) means planes with no common point, and \(0\ 0\ 0\ \vert\ 0\) means one equation was a combination of the others.
Why matrices earn their keep
The row-reduction routine is Gaussian elimination, named for Carl Friedrich Gauss, and it is the same elimination you already do by hand — with the variables removed so nothing needs tracking but arithmetic. Because the three row operations never require a decision more complicated than "what multiple clears this entry?", a computer can run them on matrices with thousands of columns: structural engineering, economic modelling, computer graphics, and the solvers inside machine learning all reduce big systems exactly this way. The hand method here is not a warm-up; it is the algorithm itself.
Common mistakes to avoid
First, writing the matrix before both equations are in standard form, which scrambles the columns. Second, applying a row operation to part of a row — every move hits all entries, the constant included. Third, arithmetic slips that compound silently, which is why the final pair must be checked in the original system, not just trusted from the matrix. Fourth, losing the bar discipline: after several swaps and scales, keep the constants column visually separate or an equation's right side leaks into the coefficients. Fifth, stopping at a staircase without back-substituting — the matrix is the means, the variable values are the end.
Key takeaways
A system in standard form becomes an augmented matrix: coefficient rows with constants behind a vertical bar, each row an equation in disguise. Only three row operations are legal — swap two rows, scale a row by a nonzero constant, add a multiple of one row to another — and each preserves the solution set because each mirrors a legal move on equations. Gaussian elimination applies them to build a staircase of leading 1s with zeros below; translating back and back-substituting yields the solution. A reduced row \(0\ 0\ \vert\ k\) with \(k \neq 0\) means no solution, and \(0\ 0\ \vert\ 0\) means infinitely many. Check the answers in the original system, and know that the same routine scales to industrial size.
Flashcards
Flashcard
Rectangular array of numbers
Test your understanding
Question 1 of 5
What is the augmented matrix for the system 2x + y = 7 and x - y = 2?
Question 2 of 5
After row reduction an augmented matrix has row 1: 1 0 | 3 and row 2: 0 1 | 1. What is the solution?
Question 3 of 5
A row of an augmented matrix reduces to 0 0 | 5. What does the system have?
Question 4 of 5
Which of these is NOT a legal row operation?
Question 5 of 5
Row reduction of a three-variable system leaves the row 0 0 1 | 3. What is z?
