Matrices and Systems of Equations Advanced. This lesson goes beyond core Algebra II. You can skip it.
Learning goals
- Write an augmented matrix with the variables stripped away
- Apply the three row operations, each reversible
- Reduce to row-echelon form, then back-substitute
- Read a contradiction row as no solution
- Use a pivot in every variable column to tell one solution from infinitely many
From equations to a grid of numbers
A matrix is a rectangular array of numbers, written inside square brackets. Nothing more mysterious than that. Here is one with two rows and three columns:
The reason a matrix is useful right now is that a system of linear equations is already a grid of numbers in disguise. Take the system
Line up the variables in the same order in every equation, keep the constants on the right, and read off the coefficients row by row. The two coefficients on the left of each equation become the first two columns, and the constant becomes a third column. To remember that the third column plays a different role, we draw a vertical bar in front of it. The result is the augmented matrix of the system:
The bar stands for the equals signs. Everything left of it is a coefficient of a variable; the single column to its right holds the constants. Drop the bar and the first two columns on their own form the coefficient matrix. The augmented matrix carries strictly more information, because it remembers the right-hand sides too, which is why it is the one we reduce.
Two small conventions keep the translation honest. A variable that is written with no number in front of it has coefficient , so becomes the row , coefficients and constant together. A variable that is missing from an equation has coefficient . That is not optional: it holds the column open so the other coefficients stay in their correct places, exactly the placeholder job a zero does in place value. Write inside a three-variable system and its row is , with the marking the absent .
Check your understanding
Write the augmented matrix for the system and , keeping the variable order in every column. Which matrix is correct?
Equation , , has no term, so its coefficient is : the row is , with the holding the -column open. Equation , , already names all three variables, so its row is . Stacking the rows, keeping in the same three columns and the constants in a final column, gives
The second option drops the placeholder for the missing and lets the -coefficient slide into 's column instead, exactly the slip the Common mistakes section warns about. The third flips the sign of 's coefficient in row . The fourth writes the constants first instead of last.
Dimensions and entries
A matrix with rows and columns is called an matrix (say ” by ”), always rows first. The augmented matrix above is . To point at one number inside a matrix , we name its row and its column: the entry in row and column is written . That notation uses the same letter as the matrix, but lowercase, with the row number first and the column number second. So in
the entry sits in the top left, is the first constant, and is the coefficient of in the second equation. Row first, column second, every time. That is the entire vocabulary you need; matrices carry much more machinery in later chapters, but here the matrix exists only to organize elimination, so this is where we stop.
Check your understanding
A system has the equations and . In its augmented matrix, what is the entry (row 2, column 1)?
The entry is in row 2, column 1. Row 2 comes from the second equation , and column 1 holds the coefficient of .
The is and the is ; the is , up in the first row.
The three row operations
Elimination lets you do three things to a system without changing which values of the variables solve it. Written on the augmented matrix, where each row is one equation, they become the three row operations:
- Swap two rows. (.) You are just listing the equations in a different order.
- Multiply a row by a nonzero constant. ( with .) You are scaling one whole equation, both sides at once.
- Add a multiple of one row to another. (.) This is the elimination step itself: you add a chosen multiple of one equation to a second so that a variable cancels in the second.
These are the only moves you are allowed, and every one of them is reversible, which is the property that matters. Swapping back undoes a swap; dividing by undoes a multiply; subtracting the same multiple undoes an addition. Reversibility is what protects the whole system, together, not row by row: if a set of values satisfies every equation before the move, it still satisfies every equation after, and if it satisfies every equation after the move, undoing the move recovers the original system, so those values must have solved that too. Nothing gets in or out of the solution set either way. Multiplying by is the one move left out, because it is not reversible: it turns an equation into , which is true no matter what, and there is no way back to what the row used to say.
Check your understanding
Which of these is not a legal row operation on an augmented matrix?
Multiplying a row by a nonzero constant is allowed, but the constant must be nonzero. Multiplying by replaces an equation with , which is true for every value and cannot be undone, so it discards a constraint and can change the solution set.
Swapping rows and adding a multiple of one row to another are always legal, and multiplying by is fine because .
Row-echelon form and back-substitution
The goal of the row operations is to reach row-echelon form, the matrix version of the triangular shape you drove systems toward in the previous lessons. The leading entry of a row is its first nonzero number, and we call it a pivot. A matrix is in row-echelon form when each pivot sits strictly to the right of the pivot in the row above, and any all-zero rows lie at the bottom. For a square system with a single solution this makes a clean staircase: the entries below the diagonal are all zero.
Once the matrix is triangular, you translate the bottom row back into an equation and solve it, then work upward. Each row you climb into has only one new variable in it. The variables to the right of that row’s pivot were already pinned down by the rows below. The entries to the left of the pivot are zero, by the staircase shape itself. So you substitute the values you already have and solve for that one remaining variable. Working from the bottom up like this is called back-substitution, and it is the reason the triangular shape is worth chasing.
Row reduction in action
Worked example 1 Solve a system by row reduction
Solve the system
Write the augmented matrix, keeping the variables in the order :
The first column already has a on top, a convenient pivot. Clear the beneath it by replacing with . That means subtracting times every entry of row , the constant included, from the matching entry of row :
Now scale row so its pivot becomes , replacing with :
The matrix is triangular. Read the bottom row back as an equation: it says . Back-substitute into the top row, which reads :
The solution is . A quick check in the original second equation confirms it: .
Check your understanding
Starting from , replace with . What is the new row ?
Subtract times every entry of row , the constant included, from the matching entry of row : . The second option forgets to touch the constant column, exactly the slip this operation is meant to prevent. The third flips every sign, and the fourth uses row itself instead of times row .
Worked example 2 Solve a system by row reduction
Solve the system
Build the augmented matrix:
Use the pivot in the top left to clear the rest of column . Replace with and with :
Now the pivot in row , column clears the below it. Replace with :
Scale row to make its pivot , replacing with :
This is triangular, so back-substitute from the bottom. Row gives . Row reads :
Row reads , and both other values are known:
The solution is , the values the echelon matrix in the figure above was built from.
Check your understanding
Reduce to row-echelon form and back-substitute. What is the solution ?
Replace with : . Scale that row by so its pivot is : , giving the triangular matrix . Reading the bottom row back as an equation gives directly. Back-substitute into the top row, : , so . The solution is .
reads the rows top-down instead of starting from the bottom row, the exact slip the Common mistakes section warns about. keeps but reports , the result of scaling row by instead of and reading the row's constant directly instead of solving . keeps but back-substitutes with the wrong sign, computing instead of .
When a row gives it away
Not every system has a single solution. In the previous lessons you saw that a linear system always has exactly one solution, no solution, or infinitely many. In matrix form, no solution announces itself in a single tell-tale row; infinitely many takes a little more reading, which the next two examples and the rule after them will show you how to do.
Worked example 3 Spot the no-solution and infinitely-many cases
Start with a system that has no solution:
Reduce its augmented matrix by replacing with :
Translate the bottom row back into an equation. Its coefficients are all zero, but the constant is not: it reads , that is, . No values of and can make that true, so the system has no solution. A row of the form with is the matrix shouting contradiction.
Now change a single number so the system has infinitely many solutions:
The same operation now gives:
This time the bottom row is entirely zero, standing for . That is true for every choice of values, so it adds no constraint at all: the second equation was really just the first one doubled. What remains is the single equation , and any pair of numbers that adds to satisfies it: try , or , or , and each one checks out. To describe every such pair at once, let stand for any number, and give it the name so it is clear it is no longer fixed; then matches it. Every is a solution, one for each value of . The system is dependent, with a whole line of solutions.
The pattern is worth stating plainly, because it is how you diagnose a system straight from its reduced matrix. First check for a contradiction: a row of zeros on the left with a nonzero constant on the right, with , means no solution, full stop. If no such row appears, the system is consistent, and the count of solutions comes down to one thing: does every variable column have a pivot? If it does, each variable is pinned to a single value, and the solution is unique. If some variable column has no pivot, that variable is free. You assign each free variable a parameter, one per pivot-free column, and solve for the pivoted variables in terms of those parameters, giving infinitely many solutions.
A row that is entirely zero, , carries no information on its own: it just means one equation added nothing new. It often shows up alongside the infinitely-many case, since one equation adding nothing is one less piece of information to pin a variable down with, but it is the missing pivot that decides the solution count, not the zero row itself. A zero row can appear in a system with more equations than unknowns, one of them redundant, while every unknown still has its own pivot from the other equations, giving one solution despite the zero row.
Check your understanding
While reducing a system's augmented matrix, you reach a row whose left entries are all zero but whose constant is , standing for the equation . What does this tell you about the system?
The row says , which is false for every choice of the variables, so no values can satisfy all the equations at once.
A contradiction row like this one means the system is inconsistent: it has no solution. (A row of all zeros, standing for , would add no constraint; in a consistent system with a free variable, that leads to infinitely many solutions.)
Check your understanding
A system of three equations in two unknowns, and , reduces to the augmented matrix . The bottom row is entirely zero. How many solutions does the system have?
The zero row only says the third equation added nothing new; it does not by itself decide the count. What decides it is the pivots: column has a pivot in row and column has a pivot in row , so both variables are already pinned down, and . A zero row often keeps company with the infinitely-many case, but not here, since neither variable column is missing its pivot.