Linear Algebra, Live
Strang §3.1 · Spaces of vectors

Subspaces: lines and planes through the origin

Lesson 1 ended with the column space: every spot your steps can reach. Lessons 2 and 3 solved Ax = b when A is square and has an inverse. Now we look at the shape of the sets that keep showing up. Picture a long straight path that runs right past your front door, the origin. Walk any number of steps along it, forwards or backwards, and you are still on the path. Do one walk along it and then another, and you are still on it. A set of vectors you can't leave by stretching and adding is a subspace. It must contain your front door, the zero vector, because 0 steps leaves you there.

Lesson 4 · slide 1Subspaces
v and w in S  ⇒  cv + dw in S, for every c and d
Key ideas
  1. A subspace contains the zero vector and is closed under addition and scaling: sums and multiples stay inside.
  2. Lines and planes through the origin are subspaces. Those that miss the origin are not.
  3. In the plane there are only three kinds: the origin alone, a line through the origin, or the whole plane. Any two vectors in different directions already reach the whole plane.
  4. The column space C(A) from lesson 1 is a subspace.
  5. This lesson is about four subspaces that every matrix carries.

The three rules

A set S of vectors is a subspace when three things hold:

  • The zero vector is in S.
  • If v and w are in S, so is v + w.
  • If v is in S, so is cv for every number c.

In short: every combination cv + dw of vectors in S stays in S. Mathematicians say S is closed under adding and scaling: you can't get out by doing those two things.

Stretching stays on the line

Take the line y = x/2 through the origin. The vector v = 21 is on it, since 1 = 2/2. Stretch it by any number and it stays on the line:

3v = 63:   3 = 6/2 ✓     −1.5v = −3−1.5:   −1.5 = −3/2 ✓
cv slides along the line through v, forwards and backwards. It never leaves the line, and at c = 0 it sits on the origin.

Adding stays on the line

Now add two vectors that are both on the line, say 21 and −4−2:

21 + −4−2 = −2−1:   −1 = −2/2 ✓

Any mix of them lands on the same line. That line passes all three tests, so it is a subspace.

Both arrows lie on one line through the origin. Each dot is one combination cv + dw, and every dot lands on that line.

Yes and no in the plane

  • Yes: the line y = 2x. 12 + 24 = 36, and 6 = 2·3 ✓. Sums and multiples of its points stay on it.
  • No: the line y = 2x + 1. It misses the origin. Also 01 and 13 are on it, but their sum 14 is not, since 2·1 + 1 = 3, not 4.
  • No: the first quadrant (x ≥ 0, y ≥ 0). 12 is in it, but −1·12 = −1−2 is not.
  • No: the two axes together. 10 and 01 are in the set, but their sum 11 is not.

So in the plane only three things pass: the origin alone, a line through the origin, and the whole plane. Why nothing else? If a subspace holds one nonzero vector, it holds all its multiples: a whole line. If it also holds a vector pointing in a different direction, then combinations of those two already reach every point of the plane (lesson 1, slide 1). So it is the origin, one line, or everything.

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 · A line through the origin

All xy with y = 3x.

Show solutionHide solution
Contains 00. If y₁ = 3x₁ and y₂ = 3x₂, then y₁ + y₂ = 3(x₁ + x₂), and cy₁ = 3(cx₁)

A subspace.

Exercise C(A) is the line through (1, 2). Choose x so that Ax reaches b = (−3, −6) on that line. Edit the code and press Run.
slide_1.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