Contents · Linear Algebra
Part 0 · Orientation
Part 1 · Vectors & Spaces
- Vectors, Spaces, and Basis
Part 2 · Matrices as Maps
Part 3 · Solving Systems
Part 4 · Orthogonality
Part 5 · Eigenvalues
Part 6 · Singular Value Decomposition
Part 7 · Spectral & Positive Definite
Part 8 · Numerical Linear Algebra
Part 1 · Vectors & Spaces
Vectors, Spaces, and Basis
A vector is an arrow, but the real content of linear algebra is what you can build from a handful of them using only two operations: scaling and adding. The set of everything you can build is a span, an independent set that wastes nothing is a basis, and its size is the dimension. This part makes those four words precise.
Linear combinations and span
Given vectors , a linear combination is any weighted sum
Their span is the set of all such combinations,
A span is never a stray collection of points: it always passes through the origin (take all ) and is closed under addition and scaling. Any set with that closure property, meaning and imply and , is a subspace. Spans are exactly the subspaces of .1
Independence
A set is linearly independent when the only way to write the zero vector is the trivial way:
Equivalently, no vector in the set is a linear combination of the others. If one of them were, say , it would contribute nothing new to the span, and moving it to one side gives a nontrivial relation equal to . Dependence means redundancy.2
Basis and dimension
A basis of a subspace is an independent set that spans . Independence and spanning pull in opposite directions: spanning wants enough vectors to reach everything, independence forbids any wasted ones, and a basis is the exact balance. Its payoff is uniqueness. If is a basis, every has one and only one coordinate tuple with .
Every basis of has the same number of elements; that number is the dimension . So has dimension , a line through the origin has dimension , and the trivial subspace has dimension .
The 2D test: a determinant
In the whole story reduces to a single number. Stack and as columns and take the determinant,
Then if and only if are independent, if and only if , so the pair is a basis. When the vectors are parallel: one is a multiple of the other, and the span collapses from the whole plane down to a single line through the origin (or to if both are zero). Drag the two arrows and watch the shaded span switch between the plane and a line as the determinant crosses zero:
- v
- (1.00, 0.00)
- w
- (1.00, 1.00)
- det [v w]
- 1.00
- relation
- independent
- span
- ℝ²
Drag the arrowheads. The green point is c₁v + c₂w. When det ≠ 0 the combination can reach the whole plane; when det = 0 it is trapped on the line.
Worked example
Take and . The determinant is
so the pair is dependent, which we can see directly: . Their span adds nothing beyond alone,
a one-dimensional line, not the plane. Now take and :
This pair is independent, so and is a basis. Uniqueness is concrete here: solving gives , hence
the one coordinate pair that reproduces any target . For instance is , and nothing else works.