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
Vector Inputs
Presets
Linear Combination Scalars
Linear Independence
No vector is a linear combination of the others.
Span and Dimension
Basis
Linear Combination
Using the scalars from the control panel
Gram-Schmidt Basis
Orthogonal basis for the span (shown on graph as dashed arrows)
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.
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.
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:
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.
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.
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.