Basis, coordinates and dimension
A set of vectors is a basis of a vector space V if it is linearly independent and spans V, meaning every
vector in V is a combination of them. Then every vector x can be written as a combination in exactly one way,
for a basis (u, v), and the numbers c₁ and c₂ are the coordinates of x relative to the basis. The number of
vectors in a basis is the same for every basis of V. It is the dimension of V, written dim V.
For a basis (u, v) of ℝ² the coordinates are given by the determinants of the vectors as columns:
- c₁ = det[x v] / det[u v] and c₂ = det[u x] / det[u v]
This is Cramer’s rule for the system c₁u + c₂v = x. The
card above gives the pair (c₁, c₂).
Holds when det[u v] is not 0, which is exactly when u and v form a basis of ℝ²: two vectors in the plane are
a basis when they are not parallel.
Worked example
u = (2, 1) and v = (1, 3) are not parallel, and det[u v] = 2·3 − 1·1 = 5. For x = (4, 7):
- c₁ = (4·3 − 1·7) / 5 = 5/5 = 1
- c₂ = (2·7 − 4·1) / 5 = 10/5 = 2
Check: 1·(2, 1) + 2·(1, 3) = (4, 7). The coordinates of x relative to (u, v) are (1, 2). They are not the
components of x, which are (4, 7) relative to the standard basis.
A second example
u = (1, 1) and v = (1, −1) give det[u v] = −1 − 1 = −2. For x = (1, 5):
- c₁ = (1·(−1) − 1·5) / (−2) = (−6)/(−2) = 3
- c₂ = (1·5 − 1·1) / (−2) = 4/(−2) = −2
Check: 3·(1, 1) − 2·(1, −1) = (3 − 2, 3 + 2) = (1, 5).
For u = (1, 2) and v = (2, 4) the determinant is 1·4 − 2·2 = 0. The vectors are parallel, they span only a
line, and are no basis for the plane.
Dimension
| Space |
Dimension |
A basis |
| ℝⁿ |
n |
the standard basis e₁, …, eₙ |
| Polynomials of degree at most n |
n + 1 |
1, x, x², …, xⁿ |
| m×n matrices |
m·n |
the matrices with one entry 1 and the rest 0 |
| The plane x + y + z = 0 in ℝ³ |
2 |
(1, −1, 0) and (0, 1, −1) |
| The space 0, the zero vector alone |
0 |
the empty set |
In a space of dimension n, any n linearly independent vectors are a basis, and any n vectors that span the
space are a basis. More than n vectors are always dependent, and fewer than n vectors do not span. Whether
vectors are independent is decided as on the page on linear independence;
the dimension of a subspace given by equations is n minus the rank of the coefficient matrix, see rank.
Common mistakes
- Reading the coordinates as components. (1, 2) relative to (u, v) means u + 2v. It is the vector
(4, 7) in the example above, not (1, 2).
- Forgetting that the order matters. Relative to (v, u), the same vector x = (4, 7) has the coordinates
(2, 1).
- Assuming any two vectors in the plane are a basis. Parallel vectors are not, and the determinant is
what shows it.
- Putting x in the wrong column. For c₁ the vector x replaces u: det[x v]. For c₂ it replaces v:
det[u x]. The denominator is always det[u v].
Frequently asked questions
Is a basis unique?
No. Every space of dimension 1 or more has infinitely many bases. What is the same for all of them is the
number of vectors.
How do I go back from coordinates to the vector?
Multiply out: x = c₁u + c₂v. As a matrix, x = Pc with u and v as the columns of P; see
change of basis.
What is the dimension of the set of solutions of Ax = 0?
n − rank A, where n is the number of columns. A basis for it comes from the free variables of the echelon
form, which the matrix calculator lists as the null space.