Row reduction, rank and null space

Solve linear systems by row reduction, interpret unique, infinite and empty solution sets, find determinants and inverses, and relate rank to the null and column spaces.

More
Reading settings

Read offline with Premium

Save lessons and figures on this device with Premium.

Connect at least once every 30 days to confirm Premium. Topic checks, coaching and sync need a connection.

On this page

Reading settings

Appearance and reading tools for your lessons.

Live preview

Take a moment to read at your own pace. Choose the font and spacing that feel comfortable for you.

Pause after each idea, then explain it in your own words before moving on.

Narrower lines take effect when the screen has room.

Colour theme
Reading font
Line spacing
Reading width
Section links
Worked examples

Open example banners when a lesson starts. Hints and solutions stay closed until you open them.

Checking Premium access…

Explore Premium
Revision Mode

Hide questions, activities and worked examples to read the notes. Turn off to show the full lesson.

Checking Premium access…

Explore Premium

Enlarged diagram

Row reduction is the systematic way to solve a system of linear equations, and it reveals far more than one solution: whether a solution exists at all, how many free parameters it has, and the rank of the matrix. This lesson reduces matrices with row operations that keep the solutions, interprets a zero row, finds rank, null space and column space, computes 3 × 3 determinants and inverses, and decides how a parameter in a system changes the type of solution.

Row operations keep the solutions

A system of linear equations Ax = b is recorded in the augmented matrix (A ∣ b). Three row operations never change the solution set, because each can be undone:

  • swap two rows;
  • multiply a row by a nonzero number;
  • add a multiple of one row to another.

Row reduction uses them to reach echelon form: each row’s first nonzero entry (its leading entry) is to the right of the one above, and any zero rows are at the bottom. Then the last equation involves the fewest unknowns, and you substitute back upwards.

Worked example 1

Three planes through one point

Solve x + y + z = 6, x + 2y + 3z = 14, 2x + 3y + 5z = 23 by row reduction, and interpret the answer geometrically.

Show full solutionHide solution
  1. Clear the first column

    Method

    Subtract row 1 from row 2, and twice row 1 from row 3.

    Reason

    The leading 1 in row 1 removes x from every later equation.

    Working

    Answer

    (1116; 12314; 23523) → (1116; 0128; 01311)
  2. Clear the second column and substitute back

    Method

    Subtract the new row 2 from row 3.

    Reason

    Echelon form leaves one unknown in the last row.

    Working

    Answer

    (1116; 0128; 0013)

    So z = 3, then y = 8-2z = 2, then x = 6-y-z = 1.

When elimination produces a zero row

Worked example 2

A line of solutions, or none

Solve x + y + z = 6, x + 2y + 3z = 14, 2x + 3y + 4z = c for (a) c = 20 and (b) c = 21. Interpret each case geometrically.

Show full solutionHide solution
  1. Reduce with c kept general

    Method

    Use the same operations as before.

    Reason

    Only the last entry depends on c, so one reduction covers both cases.

    Working

    Answer

    (1116; 0128; 012c-12) → (1116; 0128; 000c-20)
  2. Case (a): c = 20

    Method

    The last row says 0 = 0, so only two equations constrain three unknowns.

    Reason

    One unknown is free; give it a parameter.

    Working

    Answer

    Let z = t. Then y = 8-2t and x = 6-y-z = t-2:

    r = (-2; 8; 0) + t (1; -2; 1), t∈R.

    The three planes share this line.

  3. Case (b): c = 21

    Method

    The last row says 0 = 1.

    Reason

    No values of x, y, z can satisfy it.

    Working

    Answer

    There is no solution. No two of the normals (1,1,1), (1,2,3), (2,3,4) are parallel, so each pair of planes meets in a line, and the three lines are parallel: the planes form a triangular prism.

Rank, null space and column space

For the coefficient matrix A = (1, 1, 1; 1, 2, 3; 2, 3, 4):

  • The rank is the number of nonzero rows in an echelon form: here 2.
  • The null space is the set of x with Ax = 0. From the reduction with zero right-hand side, it is {t(1,-2,1)^T}, a line through the origin with basis {(1,-2,1)^T}. Its dimension, the nullity, is 1.
  • The column space (or range space) is the set of all Ax, the combinations of the columns. The third column is 2 × the second minus the first, so the first two columns are a basis, and the column space is the plane z = x + y through the origin.

For an n × n matrix, rank + nullity = n: here 2 + 1 = 3. The row space, spanned by the rows, has the same dimension as the column space.

The null space is a subspace: it contains 0, and if Au = Av = 0 then A(λu + μv) = 0. The column space explains the earlier cases: Ax = b has a solution exactly when b is in the column space, that is when b₃ = b₁ + b₂. That holds for (6,14,20) and fails for (6,14,21).

A null-space direction also runs along the solution line

The solid projected solution line is y = 4 − 2x, with z = x + 2. The dashed projected null-space line is y = −2x, with z = x. Only the latter passes through the three-dimensional origin.

The solid projected solution line is y = 4 − 2x, with z = x + 2. The dashed projected null-space line is y = −2x, with z = x. Only the latter passes through the three-dimensional origin.The solid projected solution line is y = 4 − 2x, with z = x + 2. The dashed projected null-space line is y = −2x, with z = x. Only the latter passes through the three-dimensional origin.
These are xy projections of the lesson’s three-dimensional lines. The null space has (x, y, z) = (t, −2t, t). The inhomogeneous solutions have (t − 2, 8 − 2t, t); they run in the same direction.
Open full-size graphOpen full-size graph
What to noticeThis is an xy projection, not a true view of lengths or angles in three dimensions. The z coordinate is given in the caption.
Figure data

This table is included in print while it is open.

Figure data: A null-space direction also runs along the solution line
x coordinateSolutions: y = 4 − 2xNull: y = −2x
-3.0010.06.0
-2.959.95.9
-2.909.85.8
-2.859.75.7
-2.809.65.6
-2.759.55.5
-2.709.45.4
-2.659.35.3
-2.609.25.2
-2.559.15.1
-2.509.05.0
-2.458.94.9
-2.408.84.8
-2.358.74.7
-2.308.64.6
-2.258.54.5
-2.208.44.4
-2.158.34.3
-2.108.24.2
-2.058.14.1
-2.008.04.0
-1.957.93.9
-1.907.83.8
-1.857.73.7
-1.807.63.6
-1.757.53.5
-1.707.43.4
-1.657.33.3
-1.607.23.2
-1.557.13.1
-1.507.03.0
-1.456.92.9
-1.406.82.8
-1.356.72.7
-1.306.62.6
-1.256.52.5
-1.206.42.4
-1.156.32.3
-1.106.22.2
-1.056.12.1
-1.006.02.0
-0.955.91.9
-0.905.81.8
-0.855.71.7
-0.805.61.6
-0.755.51.5
-0.705.41.4
-0.655.31.3
-0.605.21.2
-0.555.11.1
-0.505.01.0
-0.454.90.9
-0.404.80.8
-0.354.70.7
-0.304.60.6
-0.254.50.5
-0.204.40.4
-0.154.30.3
-0.104.20.2
-0.054.10.1
0.004.00.0
0.053.9-0.1
0.103.8-0.2
0.153.7-0.3
0.203.6-0.4
0.253.5-0.5
0.303.4-0.6
0.353.3-0.7
0.403.2-0.8
0.453.1-0.9
0.503.0-1.0
0.552.9-1.1
0.602.8-1.2
0.652.7-1.3
0.702.6-1.4
0.752.5-1.5
0.802.4-1.6
0.852.3-1.7
0.902.2-1.8
0.952.1-1.9
1.002.0-2.0
1.051.9-2.1
1.101.8-2.2
1.151.7-2.3
1.201.6-2.4
1.251.5-2.5
1.301.4-2.6
1.351.3-2.7
1.401.2-2.8
1.451.1-2.9
1.501.0-3.0

Check your understanding 1

A 2 × 2 example

For B = (1, 2; 2, 4), find the rank, a basis for the null space and a basis for the column space. Check rank + nullity, and decide whether Bx = (3; 5) has a solution.

Show answerHide answer

Subtracting twice row 1 from row 2 leaves one nonzero row, so the rank is 1. The null space is x + 2y = 0, with basis {(2,-1)^T}, so the nullity is 1 and 1 + 1 = 2. Both columns are multiples of (1,2)^T, which is a basis for the column space. (3,5)^T is not a multiple of (1,2)^T, so the system has no solution.

Determinants and inverses of 3 × 3 matrices

A square system has exactly one solution when its coefficient matrix has an inverse, and a matrix has an inverse exactly when its determinant is not zero. For a 3 × 3 matrix, expand along the first row. Each entry is multiplied by its cofactor: the 2 × 2 determinant left when you delete that entry’s row and column, with the signs + - + along the row.

For A = (2, 1, 0; 1, 3, 1; 0, 1, 2),

det A = 2 |3, 1; 1, 2| -1 |1, 1; 0, 2| + 0 |1, 3; 0, 1| = 2(5)-1(2) + 0 = 8.

You may expand along any row or column, using the sign pattern +, -, +; -, +, -; +, -, +; a row or column with zeros saves work. Swapping two rows changes the sign of the determinant, and adding a multiple of one row to another leaves it unchanged, so row reduction is another way to find it.

To find the inverse, replace every entry by its cofactor, transpose the result to get the adjugate, and divide by the determinant:

A⁻¹ = (1/(det A))adjA = 1/8 (5, -2, 1; -2, 4, -2; 1, -2, 5).

Check by multiplying: AA⁻¹ = I. Row reducing (A ∣ I) until the left-hand block is I gives the same inverse in the right-hand block.

Check your understanding 2

Determinant and inverse

For B = (1, 2, 0; 0, 1, 3; 2, 0, 1), find det B and B⁻¹. Then check one entry of BB⁻¹.

Show answerHide answer

Along the first row, det B = 1(1-0)-2(0-6) + 0 = 13. The adjugate is (1, -2, 6; 6, 1, -3; -2, 4, 1), so B⁻¹ = 1/13 (1, -2, 6; 6, 1, -3; -2, 4, 1). Check: row 1 of B times column 1 of B⁻¹ is (1/13)(1 + 12 + 0) = 1.

A parameter decides the case

Common mistakes

  • Using an operation that changes the solutions, such as multiplying a row by 0 or adding a multiple of a row to itself.
  • Reading a zero row 0 = 0 as “no solution”; it signals a free parameter. A row 0 = c with c ≠ 0 signals inconsistency.
  • Giving the null space as a single vector without the parameter, or forgetting that it always contains 0.
  • Taking the rank as the number of non-zero entries instead of the number of non-zero rows after reduction.
  • Dividing by a parameter in elimination without treating the case where it is zero separately.

Before you move on

Try it yourself 1

For which k and c?

Minimal support

Consider x + y + z = 6, x + 2y + 3z = 14, 2x + 3y + kz = c. Find the values of k for which the system has a unique solution. For the remaining value of k, find the condition on c for the system to have any solutions, and describe the solution set.

Write your answer, then compare it with the solution

Hint 1

Start with the determinant

A square system has a unique solution exactly when its coefficient matrix is non-singular.

Show full solutionHide solution
  1. Find when the matrix is singular

    Method

    Expand the determinant along the first row.

    Reason

    A nonzero determinant gives an inverse, and so exactly one solution.

    Working

    Answer

    det(1, 1, 1; 1, 2, 3; 2, 3, k) = (2k-9)-(k-6) + (3-4) = k-4.

    The solution is unique for every k ≠ 4, for every c.

  2. Reduce the case k = 4

    Method

    With k = 4 this is the system of the previous example.

    Reason

    The final row reduced to 0 = c-20.

    Working

    Answer

    If c = 20, there are infinitely many solutions on the line (-2,8,0) + t(1,-2,1). If c ≠ 20, there are none.

Linear transformations and the axioms of a linear space are taught in Linear transformations and linear spaces.

Questions

Open the discussion

Syllabus and review details

Last reviewed:

Back to top