MatrixStep

Guides7 min

How to Test Vectors for Linear Independence (Using Rank)

Deciding whether a set of vectors is linearly independent is one of the most common problems in linear algebra. There is really only one method: put the vectors in the columns of a matrix and look at its rank. Let's compare an independent example and a dependent one.

Definition of linear independence

Vectors v₁, v₂, …, vₖ are linearly independent if the only coefficients satisfying c₁v₁ + c₂v₂ + … + cₖvₖ = 0 are c₁ = c₂ = … = cₖ = 0. If the zero vector can be produced with coefficients that are not all zero, the vectors are linearly dependent. When they are dependent, at least one vector can be written as a linear combination of the others.

Testing with a matrix

If we form the matrix A = [v₁ v₂ … vₖ] with the vectors as columns, the equation above becomes Ax = 0. Therefore linearly independent ⟺ Ax = 0 has only the solution x = 0 ⟺ rank(A) = number of vectors.

SituationConclusion
rank(A) = number of vectorsLinearly independent
rank(A) < number of vectorsLinearly dependent
A is square and det(A) ≠ 0Linearly independent
Number of vectors > dimension of the vectorsAlways linearly dependent

Example 1: a linearly dependent set

Put the three vectors v₁ = (1, 2, 3), v₂ = (2, 1, 0), v₃ = (1, −1, −3) in the columns.

A =12121−130−3
  1. 01
    The matrix whose columns are the three vectors.
    12121−130−3
  2. 02
    Make every other entry of column 1 zero.
    R₂ ← R₂ − 2R₁R₃ ← R₃ − 3R₁
    1210−3−30−6−6
  3. 03
    Divide row 2 by the pivot so the pivot becomes 1.
    R₂ ← (−1/3)R₂
    1210110−6−6
  4. 04
    Make every other entry of column 2 zero.
    R₁ ← R₁ − 2R₂R₃ ← R₃ + 6R₂
    10−1011000

The RREF has only two pivots, so rank(A) = 2, while there are three vectors. The set is linearly dependent. Column 3, which has no pivot, can be expressed in terms of the other columns; indeed v₁ − v₂ + v₃ = 0.

123−210+1−1−3=000

Since the matrix is square, the determinant also settles it: det(A) = 0.

Example 2: a linearly independent set

This time take w₁ = (1, 0, 1), w₂ = (0, 1, 1), w₃ = (1, 1, 0).

A =101011110det(A) = −2 ≠ 0

The determinant is nonzero, and the RREF is the identity matrix, so the rank is 3.

RREF(A) =100010001

Every column has a pivot, so the vectors are linearly independent. The three vectors form a basis for ℝ³.

Useful facts

Common mistakes

FAQ

Are linear independence and orthogonality the same thing?

No. Nonzero orthogonal vectors are linearly independent, but linearly independent vectors need not be orthogonal.

How are a basis and linear independence related?

A basis is a set of vectors that is linearly independent and spans the whole space. In ℝⁿ, any n linearly independent vectors automatically form a basis.

Can functions or polynomials be linearly independent?

Yes. Convert them to coefficient vectors and use the same method. For example, the coefficient vectors of 1, x, x² form the identity matrix, so they are linearly independent.

Related guides