Matrices and Systems of Equations
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
- Recognize a zero row as a dependent system
- Require a pivot in every variable column for uniqueness
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 contributes a row of and . 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 .
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. Because you can always walk backward, no information is lost, and the reduced system has neither gained nor lost any solutions. Here is the argument in full.
Why the three row operations preserve the solution set#
A solution of a system is a choice of values for the variables that makes every equation true at once. We check each operation against that definition.
Reordering the rows changes nothing about the equations themselves, only the order in which they are listed. So a choice of values that satisfies all of them before the swap satisfies all of them after. The solution set is untouched.
Multiplying row by a nonzero constant replaces the equation with . Any values that make true make true, since multiplying both sides of a true equation by keeps it true. Conversely, any values that make true also make true, because lets you divide both sides by and recover . So and have precisely the same solutions, and the rest of the system is unchanged. This is exactly where the word nonzero earns its place. Multiplying by would turn into , which every choice of values satisfies, and the original equation could never be recovered. That step would throw a genuine constraint away.
Adding times row to row replaces the equation with , while itself stays in the system. Suppose some values satisfy the original system. Then they make both and true, so they make true as well, and they still satisfy the untouched . So every old solution is a solution of the new system. For the reverse, suppose some values satisfy the new system. They make true and, because is still present, they make true too. Subtracting times from returns , so those values satisfy as well. Every new solution is therefore an old solution. The two systems have identical solution sets.
Since each operation leaves the solution set exactly as it was, any sequence of them does too. Whatever you reduce the matrix to, you may read its solutions as the solutions of the system you started with.
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, because everything below its pivot is zero. So you substitute the values you already have and solve for that one new 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 . Subtract times each entry of row from 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: .
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.
When a row gives it away
Not every system has a single solution. In the previous lessons you met the trichotomy: a linear system has exactly one solution, no solution, or infinitely many. In matrix form these last two cases announce themselves during reduction, in a single tell-tale row.
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 . Let be free; then , and every is a solution. 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. A row of zeros on the left with a nonzero constant on the right, with , means no solution. A row that is entirely zero, , carries no information and signals a dependent system, which has infinitely many solutions as long as no contradiction row appears elsewhere. In that dependent case, each variable column without a pivot is a free variable. You assign each free variable a parameter, one parameter per pivot-free column, and solve for the pivoted variables in terms of those parameters. If neither kind of row shows up and every variable ends with its own pivot, the solution is unique.
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.)