Linear Algebra, Live
Strang §3.2 · Solving Ax = 0 and Rx = 0

Finding the nullspace: reduce to R, then read off the special solutions

Slide 2 found nullspace vectors by guessing. Now we find all of them with a method. Think of four friends settling up two shared bills, where each bill's shares must balance to zero (what some pay in, others get back). Choose two of the shares, and the other two are forced, one by each bill. Ax = 0 with two equations and four unknowns works the same way: two unknowns you pick freely, and the equations force the other two. Elimination, pushed a little further than in lesson 2, turns A into a tidy matrix R, the reduced row echelon form. In R you can see which unknowns are free (you choose them) and which are pivot variables (they follow). Set one free unknown to 1 and the others to 0, solve for the rest, and you get a special solution. Every vector in the nullspace is a combination of the special solutions.

Lesson 4 · slide 3Special solutions
12132438  →  R = 12010012
Key ideas
  1. Elimination does not change the nullspace: Ax = 0 and Rx = 0 have the same solutions, because the right sides stay 0.
  2. A variable whose column has a pivot is a pivot variable. The others are free variables.
  3. Each free variable gives one special solution.
  4. The rank r of A is the number of pivots.
  5. An m by n matrix of rank r has n − r special solutions, and every vector in N(A) is a combination of them.

What R looks like

R is what you get when elimination goes all the way. Three things are true of R:

  • Each pivot is 1 (divide a row by its pivot if needed).
  • Each pivot column is zero everywhere else, above the pivot as well as below.
  • Rows of zeros, if any, sit at the bottom.

Take A = 12132438. It takes two row steps:

row 2 − 2·row 1:  2438 − 2426 = 0012
row 1 − row 2:  1213 − 0012 = 1201

The second step is new. It clears the entry above the pivot in column 3. Lesson 3's Gauss-Jordan did the same thing.

The circles mark the pivots, in columns 1 and 3. The last step clears the entry above the second pivot, and R is done.

Why R has the same nullspace

Each row step subtracts a multiple of one equation from another, or divides a row by a nonzero number. All the right sides are 0, and they stay 0. So no solution is gained or lost. Quick check with x = −2100:

Ax:   1·(−2) + 2·1 = 0,   2·(−2) + 4·1 = 0     Rx:   1·(−2) + 2·1 = 0,   0 = 0 ✓

Pivot variables and free variables

The pivots are in columns 1 and 3. So x₁ and x₃ are pivot variables, and x₂ and x₄ are free. Rx = 0 reads:

x₁ + 2x₂ + x₄ = 0    and    x₃ + 2x₄ = 0

Each equation has exactly one pivot variable in it. So whatever you choose for x₂ and x₄, the pivot variables follow: x₁ = −2x₂ − x₄ and x₃ = −2x₄. Choose x₂ = 3, x₄ = 1, for example: x₁ = −6 − 1 = −7, x₃ = −2. Then A−73−21 = −7 + 6 − 2 + 3−14 + 12 − 6 + 8 = 00 ✓.

The special solutions

The simplest choices are one free variable 1, the rest 0.

Set x₂ = 1, x₄ = 0.
Second equation: x₃ + 2·0 = 0, so x₃ = 0
First equation: x₁ + 2·1 + 0 = 0, so x₁ = −2  →  s₁ = −2100
The second special solution comes from x₂ = 0, x₄ = 1. That is your exercise.
Check s₁ = −2100 against A itself. Both rows dotted with s₁ give 0, so As₁ = 0.

Every nullspace vector is a combination x = c·s₁ + d·s₂ of the two special solutions, with c and d equal to its free variables x₂ and x₄. For example, the choice x₂ = 3, x₄ = 1 from above gives 3 times s₁ plus 1 times the second special solution. Check this once you have found it.

Keep reading with the full course

Finish lesson 4 and you will be able to: write down every solution of Ax = b, not just one.

Still locked here:

  • The rest of this explanation
  • 4 more examples with step-by-step solutions
  • Five extra members-only problems with worked solutions

$20 once, lifetime access. Lessons 1 to 3 stay free.

Examples

Example 1 · One free column

A = 123001.

Show solutionHide solution
row 1 − 3·row 2: R = 120001. Pivots in columns 1 and 3
Free x₂ = 1: x₁ = −2, x₃ = 0. Special solution −210
Exercise Find the second special solution s, with x₂ = 0 and x₄ = 1. Edit the code and press Run.
slide_3.py Loading Python…
1
Output · Ctrl+Enter runs
Press Run to execute this slide's code. Ctrl+Enter works too.

Questions and comments

Stuck on something, or found a mistake? Ask here and I'll answer. You sign in with GitHub.

The full course

From Ax = b to PCA, by running it

Lessons 1 to 3 are free. Finish all eight and you will be able to:

You get: all 8 lessons with Python labs · every worked example and solution · 5 extra problems per lesson · your progress tracked · answers to your questions · every future update.

$20 once · lifetime access
Continue to checkout →

Already a member? Log in to the course