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.
| Situation | Conclusion |
|---|---|
| rank(A) = number of vectors | Linearly independent |
| rank(A) < number of vectors | Linearly dependent |
| A is square and det(A) ≠ 0 | Linearly independent |
| Number of vectors > dimension of the vectors | Always 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.
- 01The matrix whose columns are the three vectors.12121−130−3
- 02Make every other entry of column 1 zero.
R₂ ← R₂ − 2R₁R₃ ← R₃ − 3R₁1210−3−30−6−6 - 03Divide row 2 by the pivot so the pivot becomes 1.
R₂ ← (−1/3)R₂1210110−6−6 - 04Make 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.
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).
The determinant is nonzero, and the RREF is the identity matrix, so the rank is 3.
Every column has a pivot, so the vectors are linearly independent. The three vectors form a basis for ℝ³.
Useful facts
- Any set that contains the zero vector is linearly dependent.
- More than n vectors in ℝⁿ are always linearly dependent.
- Any n linearly independent vectors in ℝⁿ form a basis.
- A single vector is linearly independent as long as it is not the zero vector.
- Two vectors are linearly dependent only when one is a scalar multiple of the other.
Common mistakes
- Putting the vectors in rows works too, but mixing rows and columns gets confusing. Pick one convention; we recommend columns.
- Concluding that the whole set is independent because some pairs are. In Example 1 any two of the vectors are independent, yet all three are dependent.
- Using the determinant on a non-square matrix. The determinant only applies to square matrices; for rectangular ones, use the rank.
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