MatrixStep

Guides7 min

One Solution, No Solution, or Infinitely Many? How to Tell

A system of linear equations has exactly one solution, no solution, or infinitely many. Reducing the augmented matrix tells you which case you are in. Three examples make the difference clear.

The augmented matrix

For a system Ax = b, the matrix [A | b] obtained by writing b to the right of the coefficient matrix A is called the augmented matrix. Reduce it to RREF with row operations and the solution can be read off.

How to tell the three cases apart

Let n be the number of unknowns. After reduction, compare ranks.

ConditionNumber of solutionsWhat the reduced matrix looks like
rank(A) < rank([A | b])NoneA row of the form 0 = (nonzero) appears
rank(A) = rank([A | b]) = nExactly oneEvery variable column has a pivot
rank(A) = rank([A | b]) < nInfinitely manySome variable column has no pivot (a free variable)

Case 1: exactly one solution

Solve the system below.

2x + y − z = 8
−3x − y + 2z = −11
−2x + y + 2z = −3

Reducing the augmented matrix to RREF gives the matrix on the right. The calculator shows every intermediate step.

21−18−3−12−11−212−3→10020103001−1

All three variable columns have pivots. Since rank(A) = rank([A | b]) = 3 = n, the solution is unique and the last column is the solution.

(x, y, z) = (2, 3, −1)

Check by substituting: 2·2 + 3 − (−1) = 8, −3·2 − 3 + 2·(−1) = −11, and −2·2 + 3 + 2·(−1) = −3 all hold.

Case 2: no solution

x + y + z = 3
2x + 2y + 2z = 5
x − y = 1

Doubling the first equation gives 2x + 2y + 2z = 6, but the second equation says 5. The equations contradict each other. Elimination makes this visible.

  1. 01
    Form the augmented matrix [A | b].
    111322251−101
  2. 02
    Make every other entry of column 1 zero.
    R₂ ← R₂ − 2R₁R₃ ← R₃ − R₁
    1113000−10−2−1−2
  3. 03
    Move a nonzero entry of column 2 up to row 2 to use as the pivot.
    R₂ ↔ R₃
    11130−2−1−2000−1
  4. 04
    Divide row 2 by the pivot so the pivot becomes 1.
    R₂ ← (−1/2)R₂
    111301121000−1
  5. 05
    Make every other entry of column 2 zero.
    R₁ ← R₁ − R₂
    1012201121000−1

Row 3 became [0, 0, 0 | −1], which says 0 = −1. That is impossible, so there is no solution. rank(A) = 2 while rank([A | b]) = 3, so rank(A) < rank([A | b]).

Case 3: infinitely many solutions

x + 2y + z = 4
2x + 4y + 2z = 8
x + y = 3

The second equation is twice the first, so there are really only two equations.

  1. 01
    Form the augmented matrix [A | b].
    121424281103
  2. 02
    Make every other entry of column 1 zero.
    R₂ ← R₂ − 2R₁R₃ ← R₃ − R₁
    121400000−1−1−1
  3. 03
    Move a nonzero entry of column 2 up to row 2 to use as the pivot.
    R₂ ↔ R₃
    12140−1−1−10000
  4. 04
    Divide row 2 by the pivot so the pivot becomes 1.
    R₂ ← (−1)R₂
    121401110000
  5. 05
    Make every other entry of column 2 zero.
    R₁ ← R₁ − 2R₂
    10−1201110000

Row 3 is all zeros and column 3 has no pivot. rank(A) = rank([A | b]) = 2 with n = 3, so there are infinitely many solutions. The variable of the pivot-free column, z, is a free variable. Set z = t and the other variables follow.

x = 2 + t
y = 1 − t
z = t

Any value of t satisfies all three equations: t = 0 gives (2, 1, 0) and t = 1 gives (3, 0, 1). The number of free variables is n − rank = 3 − 2 = 1, so the solutions form a line.

Common mistakes

FAQ

If there are more equations than unknowns, is there never a solution?

Not necessarily. If some equations repeat others, a solution can exist. Decide by rank.

Can I choose which variable is free?

The free variables are those in pivot-free columns of the RREF. A different elimination order may make the solution look different, but the solution set is the same.

What about Ax = 0?

x = 0 is always a solution, so a homogeneous system is never inconsistent. If there is a free variable, there are infinitely many nonzero solutions too.

Related guides