All Tools

Vector Space Visualizer

Enter up to 4 vectors in ℝ² and explore their span, linear independence, basis, and dimension. The interactive graph shades the span region and shows Gram-Schmidt orthogonalization in real time.

Vector Space Visualization

VectorsSpanGS orthogonal (u₁, u₂)Linear combination (w)

Vector Inputs

Presets

v₁
x1
y0
v₂
x0
y1
v₃
x1
y1
v₄
x-1
y1

Linear Combination Scalars

c11
c21

Linear Independence

Linearly independent

No vector is a linear combination of the others.

Span and Dimension

Spanspan is all of ℝ²
Dimension2

Basis

Basis for span
(10)\begin{pmatrix}1\\0\end{pmatrix}
(01)\begin{pmatrix}0\\1\end{pmatrix}

Linear Combination

Using the scalars from the control panel

w=(11)\mathbf{w} = \begin{pmatrix}1\\1\end{pmatrix}

Gram-Schmidt Basis

Orthogonal basis for the span (shown on graph as dashed arrows)

u
(10)\begin{pmatrix}1\\0\end{pmatrix}
u
(01)\begin{pmatrix}0\\1\end{pmatrix}
u₁ · u₂ = 00

Vectors are orthogonal (u₁ · u₂ = 0)

Reference Guide

Vector Spaces

A vector space is a set V with two operations — addition and scalar multiplication — satisfying 8 axioms (closure, commutativity, associativity, identity, inverses, distributivity). The plane ℝ² is the standard example: vectors are pairs (x, y), addition is component-wise, and scalars are real numbers.

A subspace of ℝ² must contain the zero vector and be closed under addition and scalar multiplication. The possible subspaces of ℝ² are exactly the origin {0}, any line through the origin, and all of ℝ² itself.

u+v=(u1+v1u2+v2),cu=(cu1cu2)\mathbf{u} + \mathbf{v} = \begin{pmatrix}u_1+v_1\\u_2+v_2\end{pmatrix}, \quad c\mathbf{u} = \begin{pmatrix}cu_1\\cu_2\end{pmatrix}

The span of a set S of vectors is the smallest subspace containing S — it consists of all linear combinations of vectors in S.

Linear Independence

Vectors v₁, v₂, …, vₙ are linearly independent if the only solution to the equation below is the trivial one (all scalars zero). Otherwise they are linearly dependent.

c1v1+c2v2++cnvn=0c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + \cdots + c_n\mathbf{v}_n = \mathbf{0}

In ℝ², two vectors are independent if and only if their determinant is nonzero — equivalently, one is not a scalar multiple of the other. Any 3 or more vectors in ℝ² are automatically dependent, because ℝ² has dimension 2.

For 2D vectors u and v, independence is equivalent to:

det(u1v1u2v2)=u1v2u2v10\det\begin{pmatrix}u_1 & v_1 \\ u_2 & v_2\end{pmatrix} = u_1 v_2 - u_2 v_1 \ne 0

Basis and Dimension

A basis for a subspace W is a set of vectors that is both linearly independent and spans W. Every basis for the same subspace has the same number of elements — this number is the dimension of W.

  • dim({0}) = 0 (the zero subspace)
  • dim(line through origin) = 1
  • dim(ℝ²) = 2

The standard basis for ℝ² is e₁ = (1, 0) and e₂ = (0, 1). Any two independent vectors form another basis. Changing bases corresponds to a change-of-coordinates matrix.

e1=(10),e2=(01)\mathbf{e}_1 = \begin{pmatrix}1\\0\end{pmatrix}, \quad \mathbf{e}_2 = \begin{pmatrix}0\\1\end{pmatrix}

Gram-Schmidt Orthogonalization

Given a basis {v₁, v₂} for a subspace, Gram-Schmidt produces an orthogonal basis {u₁, u₂} that spans the same subspace. Orthogonal means u₁ · u₂ = 0 — the vectors are perpendicular.

u1=v1\mathbf{u}_1 = \mathbf{v}_1
u2=v2v2u1u1u1u1\mathbf{u}_2 = \mathbf{v}_2 - \frac{\mathbf{v}_2 \cdot \mathbf{u}_1}{\mathbf{u}_1 \cdot \mathbf{u}_1}\,\mathbf{u}_1

Dividing each uᵢ by its length gives an orthonormal basis — vectors that are both orthogonal and unit length. Orthonormal bases (like e₁, e₂) make projections and inner product calculations simpler.