Linear Algebra · Undergraduate

Row Reduction and Echelon Form

Quick answer

A linear system is recorded as an augmented matrix, one row per equation. Three row operations — swapping two rows, scaling a row, and adding a multiple of one row to another — change the matrix without changing the solution set. Applying them systematically produces echelon form, where each leading entry sits to the right of the one above, and then reduced echelon form, where each pivot is 1 and is alone in its column. The solution can then be read straight off the rows.

What you'll learn

  • Write a linear system as an augmented matrix
  • Apply the three row operations correctly
  • Reduce a matrix to echelon and reduced echelon form
  • Identify pivot positions and read off a solution

The system as a matrix

Solving a linear system means combining equations until each unknown stands alone. The variable names take no part in that work, so record only the coefficients. The system

x+2y=53x−y=1\begin{aligned} x + 2y &= 5\\ 3x - y &= 1 \end{aligned}

becomes the augmented matrix, one row per equation, with a bar marking the right-hand side:

[1253−11]\left[\begin{array}{cc|c} 1 & 2 & 5\\ 3 & -1 & 1 \end{array}\right]

Three row operations rewrite it without changing what it says:

  1. Swap two rows.
  2. Scale a row by a nonzero number.
  3. Replace a row by itself plus a multiple of another row.

Why row operations keep every solution

Each operation is a move on whole equations, and each is reversible. Swapping two equations changes their order, and a solution of a set of equations does not depend on the order. Multiplying an equation by c≠0c \ne 0 gives an equation with the same solutions, since dividing by cc returns the original. Adding a multiple of one equation to another produces an equation that every common solution already satisfies, and subtracting the same multiple undoes it. Every row operation can be undone by another row operation, so the new system has exactly the same solution set as the old one — no solutions lost, none gained.

Echelon form

Working down the matrix, the goal is a staircase shape.

A matrix is in echelon form when every all-zero row sits at the bottom. Each leading nonzero entry, called a pivot, must also stand strictly to the right of the pivot in the row above.

Going further gives the form that answers the question outright.

A matrix is in reduced row echelon form when it is in echelon form, every pivot is 11, and every pivot is the only nonzero entry in its column.

Each matrix has exactly one reduced row echelon form, whatever route the row operations take to get there.

The algorithm. Work left to right. In the current column, pick a nonzero entry at or below the current row and swap it up. Scale it to 11, then use it to clear every other entry in its column. Move down one row and right at least one column, and repeat.

Worked examples

Common mistakes

Practice problems

  1. Write the system 2x+y=72x + y = 7, x−y=−1x - y = -1 as an augmented matrix.

    Answer

    [2171−1−1]\left[\begin{array}{cc|c} 2 & 1 & 7\\ 1 & -1 & -1 \end{array}\right]

    Full solution

    One row per equation, with the coefficients of xx and yy and then the constant.

  2. Solve that system by row reduction.

    Answer

    (2,3)(2, 3)

    Full solution

    Swapping the rows puts a 11 in the first pivot: then R2−2R1R_2 - 2R_1 gives 3y=93y = 9, so y=3y = 3 and x=−1+3=2x = -1 + 3 = 2.

  3. Solve x−2y+z=0x - 2y + z = 0, 2x+y−z=52x + y - z = 5, 3x−y+2z=53x - y + 2z = 5.

    Answer

    (2,1,0)(2, 1, 0)

    Full solution

    Clearing the first column gives 5y−3z=55y - 3z = 5 and 5y−z=55y - z = 5. Subtracting, 2z=02z = 0, so z=0z = 0, y=1y = 1 and x=2y−z=2x = 2y - z = 2.

  4. What does a row [0004]\left[\begin{array}{ccc|c} 0 & 0 & 0 & 4 \end{array}\right] tell you?

    Answer

    The system has no solution.

    Full solution

    The row says 0=40 = 4. No values of the variables make that true, so the system is inconsistent.

  5. Is [102031000]\left[\begin{array}{ccc} 1 & 0 & 2\\ 0 & 3 & 1\\ 0 & 0 & 0 \end{array}\right] in echelon form? In reduced echelon form?

    Answer

    Echelon yes; reduced no

    Full solution

    The staircase and the zero row at the bottom are correct, but the second pivot is 33 rather than 11.

  6. Put [1492716]\left[\begin{array}{cc|c} 1 & 4 & 9\\ 2 & 7 & 16 \end{array}\right] in reduced row echelon form.

    Answer

    [101012]\left[\begin{array}{cc|c} 1 & 0 & 1\\ 0 & 1 & 2 \end{array}\right]

    Full solution

    R2−2R1R_2 - 2R_1 gives [1490−1−2]\left[\begin{array}{cc|c} 1 & 4 & 9\\ 0 & -1 & -2 \end{array}\right]. Scaling by −1-1 and then R1−4R2R_1 - 4R_2 finishes it, giving x=1x = 1 and y=2y = 2.

  7. How many pivots does [012000050000]\left[\begin{array}{cccc} 0 & 1 & 2 & 0\\ 0 & 0 & 0 & 5\\ 0 & 0 & 0 & 0 \end{array}\right] have, and in which columns?

    Answer

    Two pivots, in columns 22 and 44

    Full solution

    The leading entries are the 11 in row 1 column 2 and the 55 in row 2 column 4.

  8. Which row operation turns [1345]\left[\begin{array}{cc} 1 & 3\\ 4 & 5 \end{array}\right] into [130−7]\left[\begin{array}{cc} 1 & 3\\ 0 & -7 \end{array}\right]?

    Answer

    R2−4R1R_2 - 4R_1

    Full solution

    Subtracting four times the first row from the second gives 4−4=04 - 4 = 0 and 5−12=−75 - 12 = -7.

  9. A system of three equations in three unknowns row reduces to a matrix with pivots in columns 1, 2 and 3. How many solutions does it have?

    Answer

    Exactly one

    Full solution

    Every variable has a pivot and no pivot sits in the last column, so the reduced form reads off a single value for each variable.

  10. A student solves a system, reaches [125000]\left[\begin{array}{cc|c} 1 & 2 & 5\\ 0 & 0 & 0 \end{array}\right], and reports “no solution”. What went wrong?

    Hint

    What does the second row say?

    Answer

    The row says 0=00 = 0, which is always true. The system has infinitely many solutions.

    Full solution

    A zero row on both sides carries no information: one equation was a multiple of the other. No solution requires a pivot in the last column, as in [001]\left[\begin{array}{cc|c} 0 & 0 & 1 \end{array}\right]. Here the surviving equation x+2y=5x + 2y = 5 is satisfied by a whole line of pairs.

Frequently asked questions

What are the three elementary row operations?

Swap two rows; multiply a row by a nonzero number; add a multiple of one row to another row. Each is reversible, so none changes the solution set.

What is echelon form?

Every all-zero row sits at the bottom, and each leading nonzero entry is strictly to the right of the leading entry in the row above.

What is reduced row echelon form?

Echelon form with every leading entry equal to 1 and every other entry in a pivot column equal to 0. A matrix has exactly one reduced echelon form.

What is a pivot?

The leading nonzero entry of a row in echelon form. Its position is a pivot position, and its column is a pivot column.

How do you know a system has no solution?

A row of the form [0 0 … 0 | c] with c nonzero says 0 = c, which is false, so the system is inconsistent.

What to learn next