A vector is the simplest object in linear algebra and yet the one most people stop thinking about. For our purposes, a vector is a finite ordered list of real numbers — but the deeper view is that it is a point in Rⁿ, a geometric object with a length and a direction, that can be added to other vectors and scaled by real numbers.
Vector operations
u + v = (u₁ + v₁, u₂ + v₂, ..., uₙ + vₙ)αv = (αv₁, αv₂, ..., αvₙ)
Addition and scalar multiplication are componentwise. Geometrically, addition is the parallelogram rule; scaling is stretching or shrinking along the same direction.
Inner product (dot product)
⟨u, v⟩ = uᵀv = Σᵢ uᵢvᵢ
The inner product is the single most important operation in this course. It captures both length and angle, and it is the building block of matrix multiplication.
- Length (Euclidean norm): ‖v‖ = √⟨v, v⟩
- Angle: cos θ = ⟨u, v⟩ / (‖u‖ ‖v‖)
- Orthogonality: u ⟂ v iff ⟨u, v⟩ = 0
- Cauchy-Schwarz: |⟨u, v⟩| ≤ ‖u‖‖v‖, with equality iff u and v are parallel
A portfolio is a vector; a return realisation is a vector
If w ∈ Rⁿ is the weight vector and r ∈ Rⁿ is the realised return vector for n assets, then the portfolio return is simply wᵀr — an inner product. Cauchy-Schwarz says that the best you can do, given fixed weight-norm and return-norm, is when w is parallel to r — i.e., perfect foresight.
Norms beyond Euclidean
- L¹ norm: ‖v‖₁ = Σ |vᵢ|. Used in LASSO regression to induce sparsity (the L¹ ball has corners on axes).
- L² norm: ‖v‖₂ = √Σ vᵢ². The default. Smooth, rotationally invariant, the only one that comes from an inner product.
- L^∞ norm: ‖v‖_∞ = maxᵢ |vᵢ|. Worst-case bounds, e.g., maximum exposure to any single name.
- Equivalence: in finite dimensions all norms are equivalent in the topological sense, but their constants matter enormously in practice.
Vector spaces, subspaces, span, basis
A vector space over R is a set closed under vector addition and scalar multiplication. A subspace is a subset that is itself a vector space — equivalently, it is closed under those two operations and contains the zero vector.
Given vectors v₁,...,vₖ, the span is the set of all linear combinations Σ αᵢvᵢ. A set is linearly independent if no vector in it is a linear combination of the others. A basis is a linearly independent spanning set; every basis of a finite-dimensional space has the same number of elements — the dimension.
Why dimension matters in finance
The number of independent risk factors in a market is the dimension of the subspace those returns span. The market is high-dimensional in raw asset count but often low-dimensional in factor count — typically 3-5 factors explain 80%+ of variance in a broad equity panel. PCA (Module 10) is precisely the procedure that finds this low-dimensional subspace.
Orthonormal bases
An orthonormal basis is one where every basis vector has unit length and any two distinct basis vectors are orthogonal. Decomposing a vector in such a basis is trivial: each coordinate is just the inner product with the corresponding basis vector. This is why orthonormal bases — and the Gram-Schmidt procedure that builds them — appear everywhere from Fourier analysis to QR decomposition.
Exercise
A two-asset portfolio has weights w = (0.6, 0.4). Daily returns of the two assets, observed today, are r = (0.01, -0.02). (1) Compute the portfolio return as an inner product. (2) Compute the angle between w and r. (3) Interpret the sign of cos θ.