Vector Spaces
Jim Hefferon ยท GFDL + CC BY-SA 2.5 ยท Linear Algebra
A vector space is a set with addition and scalar multiplication that obey ten axioms. Subspaces, linear independence, span, basis, and dimension all follow from this definition. Every vector space has a basis, and every basis has the same number of elements.
Definition and examples
A vector space over a field F is a set V with two operations: vector addition and scalar multiplication. The ten axioms guarantee closure, associativity, commutativity of addition, existence of zero and additive inverses, and compatibility of scalar multiplication. The real numbers R^n, the set of polynomials of degree at most n, and the set of m-by-n matrices are all vector spaces.
Linear independence
Vectors v1, ..., vn are linearly independent if the only solution to c1*v1 + ... + cn*vn = 0 is c1 = ... = cn = 0. If there is a nontrivial solution, the vectors are dependent: at least one can be written as a combination of the others. Independence means no redundancy.
Basis and dimension
A basis for a vector space V is a linearly independent set that spans V. Every element of V can be written as a unique linear combination of basis vectors. The number of vectors in any basis is always the same: that number is the dimension of V.
Subspaces
A subspace is a subset of a vector space that is itself a vector space under the same operations. You only need to check: it contains the zero vector, and it is closed under addition and scalar multiplication. Lines and planes through the origin are subspaces of R^3.
Notation reference
| Symbol | Scheme | Python | Meaning |
|---|---|---|---|
| v + w | (vec-add v w) | [a+b for a,b in zip(v,w)] | Vector addition |
| c * v | (scalar-mult c v) | [c*x for x in v] | Scalar multiplication |
| span(S) | all linear combos | all linear combos | Set of all linear combinations |
| dim(V) | basis size | len(basis) | Number of basis vectors |
| R^n | lists of length n | lists of length n | n-dimensional real space |
Neighbors
Adjacent chapters
- Ch.1 Linear Systems โ the computational backbone
- Ch.3 Maps Between Spaces โ structure-preserving functions between vector spaces
- ๐ Abstract Algebra Ch.1 — vector spaces are modules over a field; groups are nearby
- ๐ค ML Ch.6 — PCA lives in the subspace structure of vector spaces
- ๐ฐ Probability Ch.7 — probability distributions form a vector space
Foundations (Wikipedia)
Translation notes
Hefferon proves the dimension theorem (any two bases have the same size) via the Replacement Lemma. The chapter also covers coordinates, change of basis, and the row space / column space distinction. This page focuses on definitions and intuition. For the proofs, see the original text.