Linear Algebra, Live
Strang §3.4 · Independence, basis and dimension

Independence, basis and dimension: how many directions a space needs

Slide 4 kept counting: free columns, special solutions, pivots. Now we give that counting a name. Think of giving a friend walking directions: "go east, go north, and also go north-east". The third direction adds nothing, because north-east is just some east plus some north. Directions where none can be made from the others are independent. A set of independent directions that can still take you everywhere in a space (we say they span it) is a basis. The number of directions in a basis is the dimension: 2 for a flat map, 3 for the air a drone flies in. It is the same for every basis you pick (Strang §3.4 proves it).

Lesson 4 · slide 5Basis and dimension
independent + spans the space = basis    size of every basis = dimension
Key ideas
  1. Independent: the only combination giving 0 is the one with all coefficients (the numbers in the combination) 0.
  2. Span: all combinations of the vectors.
  3. Basis: independent vectors that span the space.
  4. Dimension: the number of vectors in any basis. The rank r is the dimension of C(A).

Dependent: one vector is a mix of the others

1−1 and −22 point along the same line: −22 = −2·1−1. So they are dependent, and there is a combination with nonzero numbers that gives 0:

2·1−1 + 1·−22 = 2 − 2−2 + 2 = 00
Two dependent vectors. However you mix them, you stay on one line. The second vector adds no new direction.

Two ways to say independent

"No vector is a combination of the others" and "only the all-zero combination gives 0" mean the same thing. If v₃ = v₁ + v₂, then v₁ + v₂ − v₃ = 0: a combination with nonzero coefficients. The other way round: if a combination with a nonzero coefficient gives 0, solve it for that vector. It is a combination of the others.

The span of some vectors is all their combinations. 1−1 and −22 span a line. 11 and 1−1 span the whole plane.

Testing for independence

Put the vectors in the columns of A. These all say the same thing:

  • The only solution of Ax = 0 is x = 0.
  • N(A) contains only the zero vector.
  • Every column has a pivot, so the rank is r = n, the number of vectors.

Example: the columns 12 and 34, so A = 1324. Elimination: row 2 − 2·row 1 gives 0−2. Two pivots, 1 and −2, so the columns are independent.

ℝⁿ means all vectors with n components. ℝ² is the plane and ℝ³ is 3D space.

Four vectors in ℝ³ are always dependent. Put them in a 3 by 4 matrix. Each pivot needs its own row, so there are at most 3 pivots for 4 columns. At least one column is free, and its special solution is a nonzero x with Ax = 0. In the same way, three vectors in the plane are always dependent.

Dependent in 3D

v₁ = 101, v₂ = 011, v₃ = 112.
v₃ = v₁ + v₂,  so 1·v₁ + 1·v₂ − 1·v₃ = 0
The vectors are dependent and the rank is 2. All three lie in one plane, and v₁, v₂ alone form a basis for that plane. Its dimension is 2.
Columns 1 and 2 span the sheet. Column 3 lies flat on that same sheet, so it adds no new direction: the three columns are dependent.

A basis is not unique

10 and 01 are a basis of the plane. So are 11 and 1−1. Different vectors, but always two. In the second basis, every vector still has exactly one recipe. For 31:

c·11 + d·1−1 = 31  →  c + d = 3,   c − d = 1  →  c = 2, d = 1
2 steps of 11, then 1 step of 1−1, lands on 31. With a basis, each point has exactly one such recipe.

Exactly one, because the vectors are independent: two different recipes for the same point would subtract to a combination that gives 0.

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 basis of the plane

10 and 11.

Show solutionHide solution
Not multiples of each other: independent. Two independent vectors in 2D span the plane

A basis.

Exercise Change the third column so the three columns are independent (rank 3). Edit the code and press Run.
slide_5.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