All Labs

Vector Spaces & Linear Independence Lab

Visualize span and linear independence in 2D. Row-reduce matrices to reduced echelon form with every elementary row operation shown. Find null space and column space bases and verify the rank-nullity theorem.

Guided Experiment: Span of 1 vs 2 Vectors in R²

What is the span of a single nonzero vector in R²? What happens when you add a second independent vector? A third vector that is a linear combination of the first two?

Write your hypothesis in the Lab Report panel, then click Next.

Vector Visualization (R²)

-2-1-1112xyv1(1, 0)v2(0, 1)
v1 = [1, 0]v2 = [0, 1]Linearly Independent

Controls

v1[]
v2[]

Independence Analysis

Rank
2
of 2 vectors
Independent?
Yes
Determinant
1.0000
Nonzero determinant confirms linear independence
Steps
Formamatrixwithvectorsascolumns:[1001]Form a matrix with vectors as columns: \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}
RowreducetoRREF:[1001]Row reduce to RREF: \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}
Rank=2,numberofvectors=2Rank = 2, number of vectors = 2
Sincerank=numberofvectors,thesetislinearlyindependent.Since rank = number of vectors, the set is linearly independent.
Determinant=1(nonzero,confirmingindependence)Determinant = 1 (nonzero, confirming independence)

Data Table

(0 rows)
#InputRankNullityIndependent?Basis Vectors
0 / 500
0 / 500
0 / 500

Reference Guide

Linear Independence

Vectors are linearly independent if no vector in the set can be written as a combination of the others. Equivalently, the only solution to the equation below is all zeros.

c1v1+c2v2++ckvk=0c_1 \mathbf{v}_1 + c_2 \mathbf{v}_2 + \cdots + c_k \mathbf{v}_k = \mathbf{0}

For square matrices, the vectors are independent exactly when the determinant is non-zero.

Row Echelon Form

Gaussian elimination uses three row operations (swap, scale, eliminate) to transform a matrix into reduced row echelon form (RREF).

[1001000]\begin{bmatrix} 1 & 0 & * \\ 0 & 1 & * \\ 0 & 0 & 0 \end{bmatrix}

Pivot columns correspond to independent variables. Non-pivot columns are free variables.

Null Space & Column Space

The null space of A is the set of all vectors x where Ax = 0. The column space is the set of all possible outputs Ax.

Null(A)={x:Ax=0}\text{Null}(A) = \{\mathbf{x} : A\mathbf{x} = \mathbf{0}\}

Null space basis vectors come from free variables in RREF. Column space basis is the original pivot columns.

Rank-Nullity Theorem

For any m by n matrix, the rank (number of pivot columns) plus the nullity (dimension of null space) equals the number of columns.

rank(A)+nullity(A)=n\text{rank}(A) + \text{nullity}(A) = n

This theorem always holds and connects the dimensions of the column space and null space.