Basis, Span, and Dimension

Part 1, Chapter 1: Linear Algebra Toolkit

Learning objectives

  • Define a basis as a linearly independent spanning set and the dimension as the size of any basis
  • Compute the dimension of a subspace via row reduction (number of pivots)
  • Express any vector in coordinates relative to a chosen basis
  • Recognise that every basis of a finite-dimensional space has the same size

A basis is the most efficient possible description of a vector space, just enough vectors to span it, no redundancy. The miracle of finite-dimensional linear algebra is that every basis of a given space has exactly the same size. That shared number is the dimension, and it is the single most useful invariant of a vector space. With a basis in hand, every vector becomes a tuple of coordinates, and every linear map becomes a matrix, concrete, computable, manipulable.

The definition

A basis for a vector space VV is a set of vectors that is both linearly independent and spans VV. The cardinality of any basis is the dimension, denoted dimV\dim V. The Replacement Theorem guarantees that every basis has the same size, so dimension is well-defined.

The standard basis of mathbbRn\mathbb{R}^n is mathbfe1,ldots,mathbfen\{\mathbf{e}_1, \ldots, \mathbf{e}_n\} with mathbfei\mathbf{e}_ii the unit vector in the ii-th coordinate. Hence dimmathbbRn=n\dim \mathbb{R}^n = n. But infinitely many other bases exist, for example, (1,1),(1,1)\{(1, 1), (1, -1)\} is a basis of mathbbR2\mathbb{R}^2.

Computing dimension by row reduction

To find a basis for the span of vectors mathbfv1,ldots,mathbfvk\mathbf{v}_1, \ldots, \mathbf{v}_kk in mathbbRn\mathbb{R}^n, place them as rows of a matrix and row-reduce. The non-zero rows after reduction form a basis for the row space, and their count is the dimension of the span. Equivalently, place the vectors as columns and identify the pivot columns, those columns (in their original form) are a basis for the column space.

Coordinates

Given a basis B=mathbfb1,ldots,mathbfbnB = \{\mathbf{b}_1, \ldots, \mathbf{b}_n\}, every vector mathbfvinV\mathbf{v} \in V can be written uniquely as mathbfv=c1mathbfb1+cdots+cnmathbfbn\mathbf{v} = c_1 \mathbf{b}_1 + \cdots + c_n \mathbf{b}_nnmathbfbn. The scalars (c1,ldots,cn)(c_1, \ldots, c_n)n) are the coordinates of mathbfv\mathbf{v} in the basis BB, written [\mathbf{v}]_B. Changing the basis changes the numerical coordinates but never the abstract vector.

Where this shows up
  • Principal Component Analysis (PCA): Given high-dimensional data, PCA finds an orthonormal basis aligned with the directions of maximum variance. Projecting onto the top kk basis vectors reduces dimensionality while keeping most of the information, the workhorse of every data-science toolkit.
  • JPEG image compression: The Discrete Cosine Transform changes basis from pixel coordinates to a basis of cosine-frequency functions. Most natural images have small coordinates in the high-frequency directions, so dropping those produces strong compression with little visible loss.
  • Quantum mechanics: The eigenbasis of a Hamiltonian operator is the "energy basis", expressing a state in those coordinates makes time evolution diagonal and trivial. Choosing the right basis can turn a hard problem into a one-line answer.

Pause and think: Why is the empty set a basis for the trivial vector space mathbf0\{\mathbf{0}\}? Vacuously independent and vacuously spanning, how does this reconcile with the formal definitions, and what does it force dim(mathbf0)\dim(\{\mathbf{0}\}) to equal?

Try it

  • Predict whether (1,1),(1,1)\{(1, 1), (1, -1)\} is a basis for mathbbR2\mathbb{R}^2. Verify by checking the determinant \det \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}.
  • Before computing, predict the dimension of the subspace W=(x,y,z)inmathbbR3:x+y+z=0W = \{(x, y, z) \in \mathbb{R}^3 : x + y + z = 0\}. (One linear constraint cuts dimension by one.) Then find an explicit basis.
  • Express (5,3)(5, 3) in the basis (1,1),(1,0)\{(1, 1), (1, 0)\}. Predict the coordinates by inspection, then verify by solving the linear system.
  • Extend the single vector (1,1,0)\{(1, 1, 0)\} to a basis of mathbbR3\mathbb{R}^3. Predict two additional vectors before computing the determinant of the candidate basis matrix.
  • Predict: what is the dimension of the space of all 3times33 \times 3 symmetric matrices? Verify by counting independent entries.

A trap to watch for

Students sometimes assume that any nn vectors in mathbbRn\mathbb{R}^n form a basis, "right count, must be a basis". This is false. The set (1,0),(2,0)\{(1, 0), (2, 0)\} has the right count (two vectors in mathbbR2\mathbb{R}^2) but is dependent and spans only the xx-axis. Conversely, if you find nn vectors in mathbbRn\mathbb{R}^n that are linearly independent, then they DO automatically span (this is a non-obvious consequence of the dimension theorem). The trap is in only checking the count: you must verify either independence (which then implies spanning) or spanning (which then implies independence).

What you now know

You can identify a basis, compute the dimension of a subspace via row reduction, express vectors in arbitrary coordinates, and extend independent sets to full bases. The next section (§1.5) introduces the determinant, the scalar that summarises whether a square matrix is invertible and by how much it scales volumes.

Mark section complete →

References

  • Garrity, T. (2002). All the Mathematics You Missed. Cambridge University Press, ch. 1, §1.4.
  • Axler, S. (2015). Linear Algebra Done Right (3rd ed.). Springer, ch. 2 (bases, dimension).
  • Strang, G. (2016). Introduction to Linear Algebra (5th ed.). Wellesley-Cambridge, ch. 3 (vector spaces and subspaces).
  • Halmos, P. R. (1958). Finite-Dimensional Vector Spaces (2nd ed.). Van Nostrand, ch. 1 (basis and dimension).
  • Hoffman, K., Kunze, R. (1971). Linear Algebra (2nd ed.). Prentice-Hall, ch. 2.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.