Transform a set of vectors into an orthogonal basis using the Gram-Schmidt process. Step-by-step linear algebra tool for students and educators.
The Gram-Schmidt process is an algorithm for orthonormalizing a set of vectors in an inner product space, most commonly the Euclidean space ℝⁿ. It takes a finite, linearly independent set of vectors and generates an orthogonal (or orthonormal) basis that spans the same subspace.
Mathematical Definition:
Given vectors v₁, v₂, ..., vₖ, the Gram-Schmidt process computes orthogonal vectors u₁, u₂, ..., uₖ as follows:
u₁ = v₁
u₂ = v₂ - proju₁(v₂)
u₃ = v₃ - proju₁(v₃) - proju₂(v₃)
...
uₖ = vₖ - ∑i=1k-1 projuᵢ(vₖ)
where proju(v) = (⟨v,u⟩/⟨u,u⟩) u is the projection of v onto u.
Dot Product (Inner Product):
⟨a,b⟩ = a·b = ∑i=1n aᵢbᵢ
Vector Projection:
proju(v) = (⟨v,u⟩/⟨u,u⟩) u
Vector Normalization (to unit length):
û = u/‖u‖ where ‖u‖ = √⟨u,u⟩
Orthogonality: Vectors uᵢ and uⱼ are orthogonal if ⟨uᵢ, uⱼ⟩ = 0 for i ≠ j.
Orthonormality: Vectors are orthonormal if they are orthogonal and each has unit length (‖uᵢ‖ = 1).
Linear Independence: Any set of orthogonal nonzero vectors is linearly independent.
Calculator Features:
[1,0], [0,1]
Standard 2D basis
[1,2], [3,4]
General 2D vectors
[1,0,0], [1,1,0], [1,1,1]
3D triangular
[1,2,3], [4,5,6], [7,8,9]
3D dependent
[1,1,0,0], [1,0,1,0], [1,0,0,1]
4D example