A basis of a vector space is a set of vectors that does two jobs at once: its vectors span the space, so every vector can be built from them, and they are linearly independent, so none of them is wasted. The number of vectors in a basis is the dimension of the space. A basis is the smallest toolkit that still builds everything, and once you fix one, every vector gets a unique list of coordinates.

Without the fog

Think of a basis as a set of directions plus a promise. The directions are enough to reach any point in the space. The promise is that there is exactly one way to reach each point using them. Too few vectors and some points are out of reach. Too many and some point can be reached in two different ways, which means one of the vectors was redundant.

Margalit and Rabinoff's Interactive Linear Algebra puts it the same way: a subspace has infinitely many spanning sets, and a basis is a spanning set with the smallest possible number of vectors, chosen to avoid redundancy.

The definition

Hefferon's Linear Algebra (Chapter Two, Section III, Definition 1.1) says a basis for a vector space is a sequence of vectors that is linearly independent and that spans the space. In symbols, $\langle \boldsymbol{\beta}_1, \dots, \boldsymbol{\beta}_n \rangle$ is a basis of $V$ when:

  1. It spans: every $\mathbf{v}$ in $V$ can be written as $\mathbf{v} = c_1\boldsymbol{\beta}_1 + \dots + c_n\boldsymbol{\beta}_n$ for some scalars $c_1, \dots, c_n$.
  2. It is independent: the only way to get $c_1\boldsymbol{\beta}_1 + \dots + c_n\boldsymbol{\beta}_n = \mathbf{0}$ is with every $c_i = 0$.

Hefferon writes a basis as a sequence, with angle brackets, so that the vectors come in a fixed order. The order matters once you start writing coordinates.

Why the coordinates are unique

Hefferon's Theorem 1.12 states the key payoff: a subset is a basis exactly when every vector in the space can be written as a linear combination of its members in one and only one way. The proof is short. If $\mathbf{v}$ had two expressions, $\sum c_i\boldsymbol{\beta}_i$ and $\sum d_i\boldsymbol{\beta}_i$, subtracting them gives $\sum (c_i - d_i)\boldsymbol{\beta}_i = \mathbf{0}$. Independence forces every $c_i - d_i$ to be zero, so the two expressions were the same.

The unique weights $c_1, \dots, c_n$ are the coordinates of $\mathbf{v}$ with respect to the basis $B$, written as a column $\operatorname{Rep}_B(\mathbf{v})$. This is how an abstract space, such as a space of polynomials, turns into ordinary columns of numbers you can row reduce.

What dimension means

A space has many bases, but Hefferon's Theorem 2.4 shows that in a finite dimensional space all of them have the same number of vectors. That shared number is the dimension (Definition 2.5). Some standard values:

  • $\mathbb{R}^n$ has dimension $n$, because the standard basis $\mathbf{e}_1, \dots, \mathbf{e}_n$ has $n$ vectors.
  • The polynomials of degree at most $n$, called $\mathcal{P}_n$, have dimension $n + 1$, with basis $\langle 1, x, \dots, x^n \rangle$.
  • The functions $a\cos\theta + b\sin\theta$ form a space of dimension 2, with basis $\langle \cos\theta, \sin\theta \rangle$.
  • The trivial space $\{\mathbf{0}\}$ has dimension 0. Its basis is empty.

Dimension also explains why the subspaces of $\mathbb{R}^3$ are only the origin, lines through the origin, planes through the origin and the whole space. Dimension is a whole number no bigger than 3, so nothing sits in between (Hefferon, Example 2.11).

Worked example 1: a basis of the plane that is not the standard one

This is Hefferon's Example 1.2. Take $B = \left\langle \begin{pmatrix} 2 \\ 4 \end{pmatrix}, \begin{pmatrix} 1 \\ 1 \end{pmatrix} \right\rangle$ in $\mathbb{R}^2$.

Independent: $c_1(2,4) + c_2(1,1) = (0,0)$ means $2c_1 + c_2 = 0$ and $4c_1 + c_2 = 0$. Subtracting gives $2c_1 = 0$, so $c_1 = 0$ and then $c_2 = 0$.

Spans: to reach any $(x, y)$, solve $2c_1 + c_2 = x$ and $4c_1 + c_2 = y$. Subtracting gives $c_1 = (y - x)/2$, and then $c_2 = 2x - y$.

Check with a number: for $\mathbf{v} = (3, 5)$, the formulas give $c_1 = 1$ and $c_2 = 1$, and indeed $(2,4) + (1,1) = (3,5)$. For $\mathbf{v} = (1, 0)$ they give $c_1 = -\tfrac12$ and $c_2 = 2$: $(-1,-2) + (2,2) = (1,0)$. The coordinates depend on the basis: in the standard basis the same vector $(1,0)$ has coordinates $(1,0)$.

Worked example 2: three vectors in three dimensional space

Are $(1,1,0)$, $(0,1,1)$ and $(1,0,1)$ a basis of $\mathbb{R}^3$? Put them as the columns of a matrix and take the determinant:

$$\det\begin{pmatrix} 1 & 0 & 1 \\ 1 & 1 & 0 \\ 0 & 1 & 1 \end{pmatrix} = 1(1\cdot 1 - 0\cdot 1) - 0(1\cdot 1 - 0\cdot 0) + 1(1\cdot 1 - 1\cdot 0) = 1 + 1 = 2.$$

The determinant is not zero, so the columns are independent. Here a shortcut applies. Hefferon's Corollary 2.14 (Interactive Linear Algebra states the same idea as its basis theorem) says that in an $n$ dimensional space a set of exactly $n$ vectors is independent if and only if it spans. Three independent vectors in $\mathbb{R}^3$ therefore form a basis, with no separate spanning check needed.

Worked example 3: a basis for a plane through the origin

The plane $x + 3y + z = 0$ is a subspace of $\mathbb{R}^3$ (it appears as a worked example in what is a vector space?). Solve for $x$: $x = -3y - z$, with $y$ and $z$ free. Then

$$\begin{pmatrix} x \\ y \\ z \end{pmatrix} = y\begin{pmatrix} -3 \\ 1 \\ 0 \end{pmatrix} + z\begin{pmatrix} -1 \\ 0 \\ 1 \end{pmatrix}.$$

Both vectors lie in the plane: $-3 + 3 + 0 = 0$ and $-1 + 0 + 1 = 0$. They span it, because every solution has this form. They are independent, because neither is a multiple of the other (look at the second and third entries). So $\langle(-3,1,0), (-1,0,1)\rangle$ is a basis and the plane has dimension 2, as a plane should. Interactive Linear Algebra states this recipe as a theorem: the vectors attached to the free variables in the parametric form of the solutions of $A\mathbf{x} = \mathbf{0}$ form a basis of the null space.

Worked example 4: a basis for a column space

Take $A = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 7 \end{pmatrix}$. Row reduce: replace row 2 by row 2 minus 2 times row 1 to get $\begin{pmatrix} 1 & 2 & 3 \\ 0 & 0 & 1 \end{pmatrix}$. The pivots are in columns 1 and 3.

Interactive Linear Algebra's rule is that the pivot columns of the original matrix form a basis for the column space. So a basis is $\langle(1,2), (3,7)\rangle$, and the column space has dimension 2, which is all of $\mathbb{R}^2$. Column 2, $(2,4)$, is twice column 1, which is why it got no pivot. Do not take columns from the reduced matrix: row operations change the column space even though they keep the pivot positions. The RREF calculator will show the pivots for larger matrices.

Worked example 5: coordinates in a polynomial space

Hefferon's Example 1.14 works in $\mathcal{P}_3$ with the basis $B = \langle 1, 2x, 2x^2, 2x^3 \rangle$. Since $x + x^2 = 0\cdot 1 + \tfrac12\cdot 2x + \tfrac12\cdot 2x^2 + 0\cdot 2x^3$, the coordinates of $x + x^2$ are

$$\operatorname{Rep}_B(x + x^2) = \begin{pmatrix} 0 \\ \tfrac12 \\ \tfrac12 \\ 0 \end{pmatrix}_B.$$

With the ordinary basis $\langle 1, x, x^2, x^3 \rangle$ the same polynomial has coordinates $(0, 1, 1, 0)$. Different basis, different column, same vector. Four coordinates, because $\mathcal{P}_3$ has dimension 4.

Growing and shrinking to a basis

Two of Hefferon's corollaries give a practical way to find a basis from whatever you have.

  • Shrink a spanning set (Corollary 2.13). The set $\{(1,2), (2,4), (0,1)\}$ spans $\mathbb{R}^2$, but $(2,4) = 2(1,2)$ is redundant. Drop it. The remaining $\{(1,2), (0,1)\}$ are independent, so they form a basis.
  • Grow an independent set (Corollary 2.12). The single vector $(1,0,0)$ is independent but does not span $\mathbb{R}^3$. Add a vector outside its span, such as $(0,1,0)$, then one outside the span of both, such as $(0,0,1)$. Each addition keeps independence, and you stop when the set spans.

Corollary 2.10 sets the ceiling: no independent set can have more vectors than the dimension. So four vectors in $\mathbb{R}^3$ are always dependent, and two vectors can never span $\mathbb{R}^3$.

Where basis and dimension show up next

The same vector gets different coordinates in different bases, and the matrix that converts between them is always invertible because a basis is never redundant. Read change of basis explained next for that matrix, worked by hand.

The rank nullity theorem is a statement about dimensions: for an $m \times n$ matrix, the dimension of the column space plus the dimension of the null space equals $n$. In worked example 4, the column space has dimension 2 and the null space has dimension $3 - 2 = 1$. Eigenvectors are useful because, when there are enough of them, they form a basis in which a matrix acts by simple stretching. And the Gram Schmidt calculator turns any basis of a subspace into an orthonormal one, where coordinates are just dot products.

Gilbert Strang's MIT 18.06 Lecture 9 (Independence, basis and dimension) summarises the idea in one line: a basis is a set of vectors, as few as possible, whose combinations produce all vectors in the space, and the number of basis vectors equals the dimension.

Common mistakes

  • Checking only one condition. Spanning alone allows redundancy, and independence alone allows gaps. You need both, unless you already know the dimension and have exactly that many vectors.
  • Saying "the" basis. Every nonzero space has infinitely many bases. Only the count, the dimension, is fixed.
  • Taking pivot columns from the RREF. Use the matching columns of the original matrix for a column space basis.
  • Including the zero vector. Any set containing $\mathbf{0}$ is dependent, so it cannot be a basis.
  • Calling a plane in $\mathbb{R}^3$ "three dimensional" because its vectors have three entries. Dimension counts basis vectors, not entries. The plane in worked example 3 has dimension 2.

Related reading

Related tools

The RREF calculator finds pivot columns, which give a column space basis, and free variables, which give a null space basis. The Gram Schmidt calculator turns a basis into an orthonormal basis. Work the small examples on this page by hand first, then check.

Sources

Last reviewed: 14 November 2026.

Common questions

What is a basis in simple terms?

A basis is a set of vectors that can build every vector in the space through linear combinations, with no redundant vectors. Because nothing is redundant, every vector has exactly one set of coordinates with respect to the basis.

Can a vector space have more than one basis?

Yes. Every nonzero vector space has infinitely many bases. For example, both the standard basis (1,0), (0,1) and the pair (2,4), (1,1) are bases of the plane. What every basis shares is its size, which is the dimension.

What is the dimension of a vector space?

The dimension is the number of vectors in any basis of the space. R^n has dimension n, polynomials of degree at most n have dimension n + 1, and the space containing only the zero vector has dimension 0.

What is the difference between a span and a basis?

The span of a set is everything you can build from it. A basis is a spanning set with no redundancy: its vectors span the space and are linearly independent. Removing any vector from a basis makes the span smaller.