Basis and Coordinates
A basis is a minimal set of vectors that spans a space; coordinates express every vector uniquely in that set.
Definition
A basis of a vector space is a set of vectors that is both linearly independent and spanning. These two conditions together guarantee that every vector in the space can be written as a linear combination of the basis vectors in exactly one way. Those unique coefficients are the vector's coordinates relative to that basis.
The standard basis
In R^n the standard basis consists of the vectors e1, e2, ..., en, where ei has a 1 in position i and zeros elsewhere. The coordinates of a vector in the standard basis are just its ordinary components. Most vectors are quietly assumed to be written in this basis unless another is specified.
Why choose a different basis
A well-chosen basis makes a problem simpler. Diagonalization finds a basis of eigenvectors in which a transformation acts by simple scaling. The Fourier basis turns differentiation into multiplication. Principal component analysis picks a basis aligned with the directions of greatest variation in data. The art of applied linear algebra is often the choice of basis.
Dimension is well defined
A fundamental theorem guarantees that every basis of a given space has the same number of vectors; that number is the dimension. This lets us speak of the dimension of a space without ambiguity, and it underlies the rank-nullity theorem and the counting arguments throughout linear algebra.
import numpy as np
# Coordinates of v in a nonstandard basis B (columns)
B = np.array([[1.0, 1.0], [1.0, -1.0]])
v = np.array([3.0, 1.0])
coords = np.linalg.solve(B, v)
print(coords) # [2. 1.] so v = 2*b1 + 1*b2
Spectral and modal bases are central to physics simulation, where expressing a state in eigenmodes turns coupled equations into independent scalar equations that are far cheaper to advance in time.