ZestCalc

Linear Independence and Span Calculator

Check whether vectors are independent, and if not, see exactly how one depends on the others. Watch the span grow, and stall, one vector at a time.

Vectors

Enter up to 8 vectors of the same length, or start from an example.

Entries3
v1=v_{1} =
v2=v_{2} =
v3=v_{3} =

Result

Updates as you type.

These vectors are linearly dependent. At least one is a combination of the vectors before it.

Rank
2 of 3 vectors
Span
A plane through the origin.
Basis of the span
v1, v2v_{1},\ v_{2}
Dependencies
v3=2v1+v2v_{3} = 2 v_{1} + v_{2}

What linear independence means

Vectors are linearly independent when none of them can be built from the others. Put another way, the only combination that gives the zero vector uses all zero amounts:

c1v1+c2v2+⋯+ckvk=0⟹c1=c2=⋯=ck=0c_1 v_1 + c_2 v_2 + \cdots + c_k v_k = 0 \quad\Longrightarrow\quad c_1 = c_2 = \cdots = c_k = 0

If some other combination works, the vectors are linearly dependent, and at least one is redundant. For example, v3=2v1−v2v_3 = 2v_1 - v_2 shows that v3v_3 adds nothing new.

Two cases need no calculation. Any set that includes the zero vector is dependent, and so is any set with more vectors than entries, such as 3 vectors in 2-D.

Span and basis

The span of a set of vectors is everything you can build from them. Through the origin, it's a line, a plane, or a larger flat piece of space, and adding a vector either grows it by one dimension or leaves it the same.

A basis of the span is a set of independent vectors that builds all of it. This calculator keeps each vector that adds something new, reading from left to right. The number of basis vectors is the dimension of the span, the same number as the Matrix Rank Calculator gives for the matrix with these vectors as columns.

How the check works

Place the vectors side by side as the columns of a matrix, then row reduce it with the RREF Calculator:

[∣∣∣v1v2v3∣∣∣]⟶RREF\begin{bmatrix} | & | & | \\ v_1 & v_2 & v_3 \\ | & | & | \end{bmatrix} \longrightarrow \text{RREF}
  • A column with a pivot is a vector that adds a new direction.
  • A column without a pivot is redundant, and its entries give the amounts of the pivot vectors that build it.

Row operations keep every relationship between columns, so what the reduced matrix shows holds for the original vectors. If you have exactly 3 vectors in 3-D, the Determinant Calculator offers another check: they're independent exactly when the determinant isn't zero.