Skip to content

Linear independence

Decide whether a list of vectors is independent from the definition and by elimination, and recognise a dependent column in a data matrix.

It opens on

Three arrows in the plane, v₁ = (1, 2), v₂ = (2, 1) and v₃ = (3, 3). Does the third add any new direction that the first two do not already give?

Why it matters

A dependent column carries no new information and makes a regression's coefficients impossible to pin down, so spotting dependence is the first step to choosing features, finding a basis and counting dimensions.

Good to know first

  • Linear combinations and span: c₁v₁ + c₂v₂ is a combination
  • the null space N(A) of the matrix with the vectors as columns
  • elimination and pivots

Step by step

  1. Independent or dependent

    State independence as "only the trivial combination gives 0", test it on two and three vectors in the plane, and see dependence as a redundant arrow.

    For v₁ = (1, 2) and v₂ = (2, 1): c₁ + 2c₂ = 0 and 2c₁ + c₂ = 0; the first gives c₁ = −2c₂, the second then −3c₂ = 0, so c₂ = 0 and c₁ = 0: independent.

    A common mix-up

    Independent vectors must be perpendicular.

    In fact: v₁ = (1, 2) and v₂ = (2, 1) are independent and not perpendicular; only "not multiples of each other" is needed for two.

  2. The elimination test

    Test independence by putting the vectors as columns of A and looking for free columns, i.e. a nonzero vector in N(A), and use it in ℝ³.

    Put a, b, c as columns: A = [[1, 0, 1], [2, 1, 3], [0, 1, 1]]. Subtract 2·(row 1) from row 2 to get (0, 1, 1), then row 3 minus row 2 gives 0.

    A common mix-up

    Three vectors in ℝ³ that are pairwise not multiples of each other are independent.

    In fact: a, b, c are pairwise not multiples and still dependent, since c = a + b.

  3. Dependent columns in data

    Recognise a duplicated feature as a dependent column, see why it makes regression coefficients ambiguous, and see that a nearly dependent column is a numerical problem.

    Five people with weights 50, 60, 70, 80, 90 kg have 110, 132, 154, 176, 198 lb, so (pound column) = 2.2·(kilogram column) and 2.2·(kg) − 1·(lb) = 0 is a nonzero vector in N(X).

    A common mix-up

    Redundant features are harmless extras in a model.

    In fact: Exact duplicates make the coefficients unidentifiable, and near-duplicates make them unstable.

Try it

Are (1, 1) and (1, −1) independent?Answer

Yes; c₁ + c₂ = 0 and c₁ − c₂ = 0 give c₁ = c₂ = 0

Hint: Add and subtract the two equations

Are (1, 2, 3), (2, 4, 6) and (0, 0, 1) independent?Answer

No; the second is twice the first, so 2v₁ − v₂ + 0v₃ = 0

Hint: Look for a column that is a multiple of another

A data matrix has columns "age", "income" and "age + income". Is N(X) = {0}?Answer

No; (1, 1, −1) is in N(X), since the third column is the sum of the first two

Hint: Write the combination that gives zero

Which combination gives 0? Set the free variable c₃ = 1 and back-substitute.Answer

c₁ = −1 and c₂ = −1, so −a − b + c = 0, that is c = a + b.

A model predicts y from b₁·kg + b₂·lb. Replace b₁ by b₁ + 2.2 and b₂ by b₂ − 1; what happens to every prediction?Answer

Nothing changes, since 2.2·kg − lb = 0, so the coefficients are not unique.

Linear independence

30 minutes every month. No card.