Math · Precalculus · Concept
Matrix row reduction, determinants and inverses
A matrix is a rectangular array of numbers. Writing a linear system as an augmented matrix lets you solve it with three row operations that never change the solutions, and the reduced row echelon form shows the answer directly. Row reduction also shows when a system has no solution, or a free variable and infinitely many. A square matrix has an inverse exactly when its determinant is not zero.
A concrete case
Elimination without the letters
Solve
The letters
The last rows read
| Step | The equations | The rows of numbers |
|---|---|---|
| Start | ||
| Second minus | ||
| Divide the second by | ||
| First minus |
The rule
Augmented matrices and row operations
A matrix is a rectangular array of numbers, and an
Three row operations are allowed. Swap two rows, written
Echelon forms, and what they say
The pivot of a row is its first nonzero entry. A matrix is in row echelon form when any rows of zeros sit at the bottom, each pivot lies to the right of the pivot above it, and every entry below a pivot is
The echelon form tells you how many solutions there are. A row that reads
Determinants and inverses
A square matrix has as many rows as columns. The determinant of a
The identity matrix
Why it works
Why the row operations are safe
Each row operation can be undone by another of the same kind. A swap is undone by swapping back. Multiplying a row by
Any solution of the old system satisfies the new one, because each new row is built from true equations. Undoing the operation shows the reverse, so the new system has exactly the same solutions as the old. Multiplying a row by
Where comes from
Take the general system
If
In the opening case,
The method
Gaussian elimination, step by step
Elimination on the augmented matrix works one column at a time, left to right. The table follows the first worked example below,
| Step | What to do | For this system |
|---|---|---|
| 1 | Write the augmented matrix, with | Rows |
| 2 | Put a nonzero pivot in the top left, swapping rows if needed | The |
| 3 | Clear the entries below the pivot with | |
| 4 | Move one row down and one column right, and repeat | Swap |
| 5 | Read the bottom row | |
| 6 | Back-substitute upward, or keep going to RREF | |
| 7 | Check in every original equation |
A determinant and an inverse, step by step
For a
For a
Where it breaks
Where it breaks
A row operation must act on the whole row, the constant included. Scaling only the coefficients changes the equation, and the solution that follows is wrong.
A row of zeros,
Determinants and inverses belong to square matrices only. A system of two equations in three unknowns has a
The inverse is not the matrix of reciprocals. For the rows
Matrix products depend on order, and
Check your answer
Check your answer
Put the solution into every original equation, not into a row you reduced. A slip made during the reduction cannot show up in the rows it produced.
Find a determinant a second way, by expanding along a different row or column. Both ways give the same value. For an inverse, multiply
The Matrices & linear systems studio row-reduces a matrix and lists every operation, so you can compare its trail with yours.
A Math box does not read an augmented matrix. A matrix row after a row operation reads ? with “Not checked: Chalk can’t read the notation in this row yet.” To have Chalk check the work, write the system as equations, one per row. The second and third equations read • with “Another equation of the system.” Each new equation and each final value then reads ✓. A slip reads ✗ with “Doesn’t follow from the equations above.” With infinitely many solutions, a row that holds at none of them reads ✗ too, and one that holds at some reads ?. Check one solution in every original equation.
Write a determinant as its expansion with the
Can a system of two linear equations in three unknowns have exactly one solution?
No. Row reduction leaves at most two leading entries, one per row, so at least one of the three unknowns is free. A consistent system then has infinitely many solutions, one for each value of the free unknown. A row
Unique answers, large systems and Cramer’s rule
Different choices of row operations lead to different row echelon forms, but every route ends at the same reduced row echelon form. That is why the RREF can be read as the answer.
Computers solve systems with millions of unknowns by this same elimination. The work grows like the cube of the number of unknowns, so ten times as many unknowns take about a thousand times as long. A computer also swaps the largest available entry into each pivot position, because dividing by a tiny pivot magnifies rounding errors.
The formula
As a transformation of the plane, a
Common mistakes
- Leaving the constant out of a row operation. With rows
and , the operation gives , not , because the constant is part of the equation. - Reading a row of zeros as no solution. The row
says , which is true and only means one equation was redundant. The row says , which is false, and that is the row that means no solution. - Replacing a row with a multiple of another, such as
instead of . The first throws away equation 2, so the new system can have more solutions than the old. A replacement always keeps the row it changes. - Losing a sign in
. For the rows and , the determinant is . Writing treats as and drops the minus sign of . - Forgetting the alternating signs when expanding a
determinant. The middle entry of the first row takes a minus sign, so the example below gives , not . - Writing
for . Matrix products depend on order, and with a single column the product is not even defined. Multiplying both sides on the left by gives .
Key terms
- Matrix
- A rectangular array of numbers in rows and columns. In a system’s coefficient matrix, each row is an equation and each column belongs to one unknown.
- Augmented matrix
- A matrix holding a system’s coefficients, with the constants from the right-hand sides added as a last column. That column holds the equations’ values, not another unknown.
- Elementary row operation
- One of three moves that don’t change a system’s solutions: swap two rows, multiply a row by a nonzero number, or add a multiple of one row to another.
- Gaussian elimination
- Using elementary row operations to simplify a system into echelon form and solve it. Gauss–Jordan elimination continues until pivots are also cleared above, producing reduced row echelon form.
- Pivot
- The first nonzero entry of a row once the matrix is in echelon form: the entry elimination uses to clear those below it (and, in Gauss–Jordan elimination, above it). In reduced row echelon form every pivot is
, alone in its column. - Reduced row echelon form
- The simplest form row reduction reaches: each row’s first nonzero entry is a
, alone in its column and to the right of the one above, with any zero rows at the bottom. The solutions can be read straight off it. - Determinant
- A number computed from a square matrix. For
it is . Its absolute value is the factor by which the matrix scales area or volume, and the matrix has an inverse exactly when it isn’t zero. - Matrix inverse
- The matrix
that undoes : . Only square matrices with a nonzero determinant have one. - Identity matrix
- A square matrix with
on the main diagonal and elsewhere. Multiplying a compatible matrix or vector by it leaves that object unchanged. - Singular matrix
- A square matrix with no inverse, which happens exactly when its determinant is
. A system with a singular coefficient matrix has either no solution or infinitely many.
Work through an example
Solve the system
Find the determinant of a
Sources and scope
Authored study material. Tool results depend on the stated inputs and model assumptions.
- Stitz & Zeager, Precalculus (3rd corrected ed.) — §8.2 Systems of Linear Equations: Augmented Matrices (PDF p. 579), §8.4 Systems of Linear Equations: Matrix Inverses (PDF p. 610) and §8.5 Determinants and Cramer’s Rule (PDF p. 626)
- OpenStax College Algebra 2e — Solving systems with Gaussian elimination
- OpenStax College Algebra 2e — Solving systems with inverses
- OpenStax College Algebra 2e — Solving systems with Cramer’s rule
Try it, then study it
Open the example in its tool to check steps or change values, then review the key terms as flashcards.
Row-reduce it in Matrices & linear systems Check each equation in Math Study the 10 key terms Open worked example on a board Matrix Transformations in Math ReferenceYour existing work stays on this device. Examples open as editable copies.