Linear Algebra, Live
Recap · Reading

What you can now do.

Lesson 4 in one page: which sets of vectors count as subspaces, how to find every input a matrix sends to zero, how to write down all solutions of Ax = b, how to measure a subspace by its dimension, and the four subspaces every matrix carries. For any matrix, you can now say which equations Ax = b are solvable, how many solutions they have, and what those solutions look like.

Lesson 4 · slide 7Recap
dim C(Aᵀ) + dim N(A) = n    dim C(A) + dim N(Aᵀ) = m
Key ideas
  1. Subspaces are closed under adding and scaling, and always contain 0.
  2. N(A) holds the solutions of Ax = 0, found from the special solutions of R.
  3. Every solution of Ax = b is x_p + x_null.
  4. Independent vectors that span a space are a basis; their number is the dimension.
  5. Four subspaces with dimensions r, n − r, r, m − r.
  • §3.1 Subspaces. The straight path past your front door: a set you can't leave by stretching and adding. It must contain 0. In the plane: the origin, a line through it, or the whole plane. The column space is one.
  • §3.2 The nullspace. Inputs that do nothing: every x with Ax = 0. A nonzero one is a recipe that mixes the columns into zero, so the columns are dependent: one column is a mix of the others (§3.4 below). For an invertible A, only x = 0.
  • §3.2 R and special solutions. Four friends settling two bills that must balance to zero: you choose the free variables, and the pivot variables follow. Reduce A to R (pivots 1, zeros above and below them), set one free variable to 1 and the rest to 0. The n − r special solutions span N(A). The rank r is the number of pivots.
  • §3.3 The complete solution. One route to the bakery plus any stroll that brings you back: x = x_p + x_null. Find x_p from [A | b] with the free variables set to 0. A row 0 = nonzero means b is not in C(A), and there is no solution.
  • §3.4 Independence, basis and dimension. Walking directions with nothing extra: independent vectors have only the all-zero combination giving 0. A basis is independent and spans the space, and every basis has the same size, the dimension. The pivot columns are a basis of C(A), so dim C(A) = r.
  • §3.5 The four subspaces. The shadow: row space and nullspace among the inputs, column space and left nullspace among the outputs. Sizes r, n − r, r, m − r. The nullspace is perpendicular to the row space.

Next lesson: orthogonality and least squares (chapter 4)

Perpendicular subspaces, projections, and the best answer to Ax = b when there is no exact one. That is how you fit a line to noisy sensor data.

Read along

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
  • 2 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

Find N(A) for A = 1326.

Show solutionHide solution

All multiples of −31.

Exercise Free play: try four(A) and nullpic(A, x) on matrices of your own. Edit the code and press Run.
slide_7.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