Linear Independence, Rank, and Bases

What you will be able to do

Given a set of vectors or the columns of a matrix, the learner can decide whether they are linearly independent, state the rank, exhibit an explicit dependence relation when one exists, and say whether a given square matrix can serve as a basis.

Orientation

Given a handful of vectors, is any one of them redundant? The answer decides whether they can serve as a basis, and a basis is what every later method is built on.

This sits beneath the linear programming units rather than after them. A basic feasible solution is defined by a set of linearly independent columns, and every simplex iteration solves a system against the basis matrix, which works only because that matrix is invertible. Both facts are used constantly; this unit is where they are established.

The unit is also where a common shortcut gets corrected. Checking that no two vectors are parallel feels like checking independence, and it is not the same test.

This unit assumes you can multiply a matrix by a vector and solve a two-by-two system.

Intuition

Independence as absence of redundancy

Given a collection of vectors, ask: can any one of them be built out of the others? If yes, that vector contributes no direction the rest do not already reach, and dropping it loses nothing. The set is dependent.

If no vector can be built from the others, every one of them adds something genuinely new, and the set is independent.

Rank counts what survives this pruning: how many genuinely different directions the columns supply between them.

Invertibility is the case where a square matrix's columns supply exactly as many directions as the space has dimensions. Then every target can be reached, and reached in exactly one way, which is why A x = b has a unique solution precisely when A is invertible.

The difficulty is that "builds out of the others" means combining several vectors, not only scaling one. Two vectors can fail to be multiples of each other while a third is still reachable from the pair. That is why a pairwise check is not an independence check, and it is the point of the contrast case later in this unit.

Definition

Independence, rank, and invertibility

Linear combination. For vectors v 1 , … , v k and scalars λ 1 , … , λ k , the vector λ 1 v 1 + ⋯ + λ k v k is a linear combination of them.

Linear independence. The vectors are linearly independent when

λ 1 v 1 + ⋯ + λ k v k = 0

forces λ 1 = ⋯ = λ k = 0 . If any solution has some λ i ≠ 0 , the set is dependent, and that equation can be rearranged to express v i in terms of the others.

Note what the definition quantifies over: all scalars at once, not pairs.

Rank. The rank of a matrix A is the size of its largest independent set of columns. It equals the number of pivots in the reduced row echelon form of A , and equals the corresponding count for the rows: column rank and row rank always agree.

Invertibility. For a square A ∈ R m × m the following say the same thing:

  1. the columns of A are linearly independent;
  2. rank ⁡ ( A ) = m ;
  3. det A ≠ 0 ;
  4. A − 1 exists;
  5. A x = b has exactly one solution for every b .

A set of columns can serve as a basis exactly when it satisfies these, which is why the basis matrix in a linear program must have independent columns.

Example

An independent pair and a dependent triple

Independent. Take

a 1 = ( 1 2 ) , a 2 = ( 3 1 ) .

Suppose λ 1 a 1 + λ 2 a 2 = 0 . Reading the two rows gives λ 1 + 3 λ 2 = 0 and 2 λ 1 + λ 2 = 0 . From the second, λ 2 = − 2 λ 1 ; substituting into the first gives λ 1 − 6 λ 1 = − 5 λ 1 = 0 , so λ 1 = 0 and then λ 2 = 0 . Only the trivial combination vanishes, so the pair is independent.

Equivalently, the matrix ( 1 3 2 1 ) has determinant 1 − 6 = − 5 ≠ 0 .

Dependent. Now add

a 3 = ( 2 − 1 ) .

Three vectors in R 2 are always dependent, because rank cannot exceed 2. The counting argument settles the question before any computation.

The explicit relation is

a 3 = − a 1 + a 2 ,

since − 1 + 3 = 2 in the first component and − 2 + 1 = − 1 in the second. Rearranged, a 1 − a 2 + a 3 = 0 is a nontrivial combination giving the zero vector.

What this shows. No two of a 1 , a 2 , a 3 are multiples of one another, yet the set is dependent. Independence is not a pairwise property.

Procedure

Deciding independence

Count first. If there are more vectors than components, they are dependent and no computation is needed: k vectors in R m with k > m cannot be independent. If any vector is the zero vector, the set is dependent for the same trivial reason.

For two vectors, check proportionality. A pair is dependent exactly when one is a scalar multiple of the other. This shortcut is valid for two vectors only, and using it on three or more is the error this unit warns about.

For a square set, use the determinant. Form the matrix whose columns are the vectors. A nonzero determinant means independent; zero means dependent. This answers the question but does not show the relationship.

Otherwise reduce. Put the vectors in as columns and row reduce. The number of pivots is the rank. If the rank equals the number of vectors, they are independent; if it is smaller, they are dependent.

If dependent, exhibit the relation. A column without a pivot is a combination of the pivot columns, and the reduced form's entries are the coefficients. Solve for them explicitly rather than stopping at "dependent".

Verify the relation. Substitute the coefficients back and check every component. A dependence claim with arithmetic behind it is checkable; one without is an assertion.

For a square matrix, name the consequence. Independent columns mean the matrix is invertible, A x = b has exactly one solution for every b , and the columns can serve as a basis. Dependent columns mean none of those hold.

Worked example

A basis matrix and the system it solves

Problem. Decide whether

B = ( 2 1 1 2 )

has independent columns. If it does, find B − 1 and solve B x = ( 12 12 ) .

Goal. Establish independence, then use it.

Relevant principle. For a square matrix, independent columns, nonzero determinant, and invertibility are the same condition.

Step 1: count. Two vectors in R 2 , so the counting argument does not settle it. Continue.

Step 2: check proportionality. Is ( 1 , 2 ) T a multiple of ( 2 , 1 ) T ? Scaling the first component by 1 / 2 would give ( 1 , 1 / 2 ) T , not ( 1 , 2 ) T . They are not proportional.
Reason: with exactly two vectors, proportionality is a valid test, and it already answers the question.

Step 3: confirm with the determinant.

det B = ( 2 ) ( 2 ) − ( 1 ) ( 1 ) = 3 ≠ 0 ,

so the columns are independent and B is invertible.

Step 4: form the inverse. For ( a b c d ) the inverse is 1 a d − b c ( d − b − c a ) , giving

B − 1 = 1 3 ( 2 − 1 − 1 2 ) = ( 2 / 3 − 1 / 3 − 1 / 3 2 / 3 ) .

Check: B B − 1 = ( 2 1 1 2 ) ( 2 / 3 − 1 / 3 − 1 / 3 2 / 3 ) = ( 1 0 0 1 ) , as required.

Step 5: solve the system.

x = B − 1 ( 12 12 ) = ( 2 / 3 ( 12 ) − 1 / 3 ( 12 ) − 1 / 3 ( 12 ) + 2 / 3 ( 12 ) ) = ( 4 4 ) .

Check. 2 ( 4 ) + 4 = 12 and 4 + 2 ( 4 ) = 12 . Both rows hold.

Interpretation. Because the columns are independent, this is the only solution. Had they been dependent, the system would have had either no solution or infinitely many, and no inverse would exist to pick one out.

This matrix is not arbitrary: it is the basis matrix reached at the end of the simplex worked example, where the same system gives the optimal x 1 = x 2 = 4 . The independence established here is what made that final step well defined.

Figure

Three pairwise non-parallel vectors, one of them redundant

a₃ = −a₁ + a₂, so the triple spans only a plane

The contrast the unit turns on, drawn.

a 1 = ( 1 , 2 ) and a 2 = ( 3 , 1 ) point in genuinely different directions, so between them they reach every point of the plane: two independent directions, rank 2.

a 3 = ( 2 , − 1 ) looks like a third direction. It is not parallel to a 1 , and it is not parallel to a 2 , so the pairwise test passes on every pair. But follow the grey path: start along − a 1 , then travel a 2 , and you arrive exactly at a 3 . That is

a 3 = − a 1 + a 2 ,

so a 3 contributes no direction the first two do not already reach. Dropping it loses nothing, and the rank of the triple is still 2.

This is why pairwise checking fails. Independence allows all three coefficients to vary at once, and here a 1 − a 2 + a 3 = 0 is a nontrivial combination giving zero. Checking pairs only ever tests two coefficients at a time, so it cannot see this. For three or more vectors the pairwise test is not a weaker test but the wrong one, and it returns an answer regardless.

Three vectors in R 2 are in fact always dependent: you cannot have three independent directions in a plane. The drawing shows the particular combination that witnesses it.

Contrast

Pairwise non-proportionality is not independence

Checking that no two vectors are multiples of each other is a valid test for a set of two. Applied to three or more it gives the wrong answer, and it gives it confidently.

The tempting reasoning. Take

a 1 = ( 1 2 ) , a 2 = ( 3 1 ) , a 3 = ( 2 − 1 ) .

No two are proportional: a 2 is not a multiple of a 1 , nor a 3 of a 1 , nor a 3 of a 2 . Each points a different way. So the set looks independent.

Why it is not. The definition allows all three coefficients to vary at once, and

a 1 − a 2 + a 3 = ( 1 − 3 + 2 2 − 1 − 1 ) = ( 0 0 )

is a nontrivial combination giving zero. Equivalently a 3 = − a 1 + a 2 : the third vector is reachable from the first two, so it adds no new direction.

The counting argument settles it instantly. Three vectors in R 2 are always dependent, whatever they look like, because rank cannot exceed the number of components. The pairwise check cannot see this, since it never considers three vectors together.

Where it does real damage. In a linear program, a basis is a set of m columns that must be independent. Selecting columns by eye because they look different produces a singular basis matrix, and then A B − 1 does not exist: the basic solution is undefined and the iteration cannot proceed. The failure appears as a division by zero deep in the arithmetic rather than as a clear message about the columns.

The reliable test. Count first; if the count does not settle it, reduce or take a determinant. Reserve the proportionality check for pairs.

Next step

Practice Linear Independence, Rank, and Bases

Practice this

Results update as you type. Use the up and down arrow keys to move between results, Enter to open one, and Escape to close.

Type to search.

Settings

Appearance

Interface density

Your record

Your progress is stored in this browser and nowhere else: an identifier, the answers you have given, the mastery states and review schedule derived from them, and the lesson you last opened. Clearing it makes you a new learner on this device. It cannot be undone, and it will not affect your appearance or density settings.

Focus timer

Focus--minutes remaining

Phase

Kept in this browser only, and used to label the session in your own history.

Today

Nothing recorded yet. Finish a focus session and it will appear here.

Settings

Focus sessions between long breaks.

Sessions you are aiming for in a day.

Notifications

Your history

Sessions are stored in this browser and nowhere else. They are not evidence and never reach your mastery record.