Skip to content

Basis and Dimension

A basis is a minimal set of “building blocks” that can construct every vector in a space. The dimension tells you how many building blocks you need. These two ideas are central to everything that follows in linear algebra.

A basis for a vector space VV is a set of vectors that is:

  1. Linearly independent (no redundancy)
  2. Spans the entire space VV (every vector in VV can be written as a linear combination of the basis vectors)

The standard basis in 2D is {1,0,0,1}\{\langle 1, 0 \rangle, \langle 0, 1 \rangle\}, often written as {i,j}\{\mathbf{i}, \mathbf{j}\}. In 3D it’s {i,j,k}\{\mathbf{i}, \mathbf{j}, \mathbf{k}\}.

The dimension of a vector space is the number of vectors in any basis for that space.

  • dim(R2)=2\dim(\mathbb{R}^2) = 2
  • dim(R3)=3\dim(\mathbb{R}^3) = 3
  • The space of all 2×22 \times 2 matrices has dimension 4

Key fact: all bases for the same vector space have the same number of vectors.

The span of a set of vectors is all possible linear combinations of those vectors. If a set of vectors spans the space and is linearly independent, it’s a basis.

Building ⟨3, 2⟩ from a basis e₁ e₂ ⟨3, 2⟩ 3 × e₁ 2 × e₂ e₁ = ⟨1, 0⟩ e₂ = ⟨0, 1⟩ target

In the diagram: the basis vectors e1=1,0\mathbf{e}_1 = \langle 1, 0 \rangle (blue) and e2=0,1\mathbf{e}_2 = \langle 0, 1 \rangle (green) are used to build the vector 3,2\langle 3, 2 \rangle (purple). You scale e1\mathbf{e}_1 by 3 and e2\mathbf{e}_2 by 2, then add them. Any point in the plane can be reached this way, which is why these two vectors form a basis for R2\mathbb{R}^2.

Example 1: Standard Basis

The set {1,0,0,1}\{\langle 1, 0 \rangle, \langle 0, 1 \rangle\} is a basis for R2\mathbb{R}^2 because:

  • They are linearly independent
  • Any vector x,y=x1,0+y0,1\langle x, y \rangle = x\langle 1, 0 \rangle + y\langle 0, 1 \rangle (they span R2\mathbb{R}^2)

Example 2: Non-Standard Basis

Is {2,0,0,3}\{\langle 2, 0 \rangle, \langle 0, 3 \rangle\} a basis for R2\mathbb{R}^2?

Yes. They’re independent (neither is a scalar multiple of the other) and they span the space (you can reach any x,y\langle x, y \rangle as x22,0+y30,3\frac{x}{2}\langle 2, 0 \rangle + \frac{y}{3}\langle 0, 3 \rangle).

Example 3: Not a Basis

The set {1,1,2,2}\{\langle 1, 1 \rangle, \langle 2, 2 \rangle\} is not a basis because the vectors are linearly dependent (the second is 2 times the first). They only span a single line, not all of R2\mathbb{R}^2.

Example 4: Dimension of a Plane in 3D

Any plane through the origin in R3\mathbb{R}^3 has dimension 2. You need exactly two linearly independent vectors to form a basis for that plane, even though the plane lives inside 3D space.

Basis and dimension show up everywhere:

  • Game development: choosing efficient coordinate systems, compressing animation data, working with tangent spaces for normal mapping
  • Computer graphics: changing between coordinate systems (world space, object space, camera space) is a change of basis
  • Machine learning: PCA (Principal Component Analysis) finds the most important “directions” (basis) that explain the data
  • Data compression: reducing dimension means storing less data while keeping the important information

Example: When a game stores character animations, it often uses a reduced basis (fewer independent directions) to save memory while still reconstructing realistic movement. This is dimension reduction in action.

A basis for a vector space must be:
The dimension of $\mathbb{R}^3$ is:
All bases for the same vector space have:
If a set of vectors spans the space but is not linearly independent, it:
In game development, choosing a good basis helps with: