Linear Algebra, Live
Strang §1.3 and §3.1 · Column space

The column space: every place Ax can reach

Slide 3 gave one output Ax for one x. Now collect all of them. Each column of A is a kind of step you're allowed to take, say one step north-east and one step north-west. You can take as many of each as you like, forwards or backwards. The column space is every spot you can reach that way. If the two steps go in different directions, you can get anywhere. If they go the same way, you are stuck walking back and forth along one line. Ax = b has a solution (an x that makes Ax equal to b) exactly when b is a spot you can reach.

Lesson 1 · slide 4Column space
C(A) = all vectors Ax = all combinations of the columns
Key ideas
  1. The column space C(A) contains every combination of the columns of A, that is, every vector Ax.
  2. Ax = b has a solution exactly when b is in C(A).
  3. In the plane, C(A) is the whole plane, a line through the origin, or just the origin.
  4. Columns are independent when no column is a combination of the others.
  5. The rank counts how many independent directions C(A) has: 2 for the plane, 1 for a line, 0 for the origin.

All the outputs at once

Try every possible x and mark each Ax on the plane. All those points form the column space, C(A). Every Ax is a combination of the columns, hence the name.

Columns 21 and −11. Every dot is one output Ax. They cover the whole plane, so here C(A) is the plane.

A quick picture: two kinds of steps

Each column is one kind of step. x says how many of each to take (negative means walk backwards). Steps in different directions can take you anywhere: C(A) is the plane. Steps in the same direction only take you forward or back along one line: C(A) is a line.

Three possibilities in the plane

  • The whole plane: the columns point different ways. They are independent.
  • A line: one column is a multiple of the other. They are dependent.
  • Just the origin: both columns are zero.

The rank names the case: 2, 1 or 0.

A closer look at the dependent case

A = 1224. Column 2 is 2 times column 1.
Ax = x₁12 + x₂24 = (x₁ + 2x₂)·12
Every output is a multiple of 12. So b = 36 is reachable, but b = 10 is not.
Columns 12 and 24 point the same way. However you mix them, every output lands on one line. That line is C(A).

Also, x = 30 and x = 11 both give 36. With dependent columns, different inputs can give the same output. Lesson 4 comes back to this extra freedom.

Two questions that sound alike

  • Can we solve Ax = b for this one b? Yes, if b is in C(A).
  • Can we solve Ax = b for every b? Only if C(A) is the whole plane.

For two columns there is a quick test: is one column a multiple of the other? If yes, C(A) is only a line (or just the origin). If no, C(A) is the whole plane. Lesson 3 turns this test into a single number, the determinant.

A bigger example: columns in 3D

Take two columns with 3 numbers each. Mixing them gives

x₁·101 + x₂·011 = x₁x₂x₁ + x₂

The third number is always the first plus the second. So you can't reach all of space, only a flat sheet through the origin. b = 123 is on the sheet (take x = 12). b = 120 is not, so Ax = b has no solution for it.

Two columns in 3D reach a flat sheet, not all of space. One point is on the sheet; the other floats off it.

Add a third column that sticks out of the sheet, like 001 (now x needs three numbers), and now you can reach every point in space. A third column that lies on the sheet, like 112, adds nothing new. The same holds in any size: the column space can be all of space, or a smaller flat piece of it.

A third column off the sheet. Now the three columns reach all of space.

Next: The column space tells us whether Ax = b has a solution. Lesson 2 shows how to find it: first by reading the equations two ways, then by elimination. The recap comes first.

Examples

Example 1 · A line, and who is on it

A = 2412. Column 2 = 2·column 1, so C(A) is the line through 21.

Show solutionHide solution
b = 63 = 3·21: in C(A), for example x = 30
b = 11: not a multiple of 21, so Ax = b has no solution

Example 2 · The whole plane

A = 111−1. The columns 11 and 1−1 are not multiples of each other, so C(A) is the whole plane. Solve Ax = 42:

Show solutionHide solution
x₁ + x₂ = 4    x₁ − x₂ = 2
x₁ = 3, x₂ = 1

Example 3 · Is b in the column space?

A = 1326, b = 25.

Show solutionHide solution
Column 2 = 3·column 1, so C(A) is the line of multiples of 12
Is 25 a multiple of 12? It would need 2·12 = 24, not 25

So b is not in C(A), and Ax = b has no solution. Changing b to 24 would make it solvable.

Example 4

Describe C(A) for A = 3612. What is the rank?

Show solutionHide solution

Column 2 = 2·column 1, so C(A) is the line through 31. Rank 1.

Example 5

What is C(A) when A is the zero matrix (all entries 0)? And what is C(I), where I = 1001 is the identity matrix (it leaves every vector where it is: Ix = x)?

Show solutionHide solution

Zero matrix: only the origin, rank 0. Identity: the whole plane, rank 2, since Ix = x reaches everything.

Exercise Change column 2 (the second number in each row of the code) into a multiple of column 1 and watch C(A) shrink to a line. Edit the code and press Run.
slide_4.py Loading Python…
1
Output · Ctrl+Enter runs
Press Run to execute this slide's code. Ctrl+Enter works too.

Enjoying lesson 1? Get the full course: all 8 lessons through the SVD and PCA, your progress saved lesson by lesson, every solution and 5 extra problems per lesson. $20 once, yours for life.

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