Quant Memo
Foundational

Vector Spaces and Bases

The idea that any collection of vectors that can be added and scaled has a minimal 'coordinate system' — a basis — that describes every vector in it uniquely.

A factor model describes a stock's return as a combination of market, size, and value exposures — three numbers that, together, pin down the stock's behavior. Why three, and why those three? The answer lives in the idea of a vector space and its basis: the minimal set of "directions" needed so that every object of interest can be written as a unique combination of them, with no redundancy and nothing missing.

An analogy: giving directions on a grid

To describe any location in a flat city laid out on a grid, you only need two directions — say, "blocks east" and "blocks north." Every address is some combination of these two: "3 east, 2 north." You don't need a third direction like "northeast" because it's already expressible as a mix of the first two, and you can't get by with just one direction because some addresses aren't purely east or purely north. Two independent directions are exactly enough to reach anywhere on the grid, and every address has one, and only one, correct pair of coordinates in that system.

The mathematics, one symbol at a time

A vector space is a set of objects (vectors) that can be added together and scaled by numbers, with the results staying inside the set — combinations never "escape" the space. A basis is a set of vectors {v1,,vn}\{v_1, \ldots, v_n\} in that space such that every vector xx in the space can be written as exactly one combination

x=c1v1+c2v2++cnvn,x = c_1 v_1 + c_2 v_2 + \cdots + c_n v_n,

for some unique numbers c1,,cnc_1, \ldots, c_n called the coordinates of xx in that basis. In words: the basis vectors are a minimal toolkit — mixing them in the right proportions builds any vector in the space, and for each vector there's only one right recipe of proportions. The number of vectors in a basis, nn, is called the dimension of the space; every basis for the same space has exactly the same number of vectors, so dimension is a well-defined property of the space itself, not of any particular basis you happened to choose.

Worked example 1: two bases, same vector, different coordinates

In the plane, take the standard basis e1=(1,0)e_1 = (1,0), e2=(0,1)e_2 = (0,1). The vector x=(5,3)x = (5, 3) has coordinates (5,3)(5,3) in this basis, trivially: x=5e1+3e2x = 5e_1 + 3e_2. Now use a different basis, v1=(1,1)v_1 = (1,1), v2=(1,1)v_2 = (1,-1). Solve x=c1v1+c2v2x = c_1 v_1 + c_2 v_2: 5=c1+c25 = c_1 + c_2 and 3=c1c23 = c_1 - c_2, giving c1=4c_1 = 4, c2=1c_2 = 1. Check: 4(1,1)+1(1,1)=(5,3)4(1,1) + 1(1,-1) = (5,3). Same underlying vector, same dimension (2), but different coordinate numbers — a reminder that "coordinates" are always relative to a chosen basis, not an intrinsic property of the vector.

Worked example 2: a three-factor return basis

A stock's monthly excess return is modeled as r=βMKTfMKT+βSMBfSMB+βHMLfHMLr = \beta_{MKT} \cdot f_{MKT} + \beta_{SMB} \cdot f_{SMB} + \beta_{HML} \cdot f_{HML}, where fMKT,fSMB,fHMLf_{MKT}, f_{SMB}, f_{HML} are the market, size, and value factor returns treated as a basis for the space of explainable returns, and the betas are the stock's unique coordinates in that basis. Suppose a stock has βMKT=1.1\beta_{MKT}=1.1, βSMB=0.3\beta_{SMB}=0.3, βHML=0.2\beta_{HML}=-0.2, and in a given month fMKT=2%f_{MKT}=2\%, fSMB=1%f_{SMB}=1\%, fHML=0.5%f_{HML}=0.5\%. Its factor-explained return is 1.1(2)+0.3(1)0.2(0.5)=2.2+0.30.1=2.4%1.1(2) + 0.3(1) - 0.2(0.5) = 2.2 + 0.3 - 0.1 = 2.4\% — one unique combination of the three basis directions, exactly as the definition requires.

Matrix explorer
dashed = before · solid = after
det 1.25trace 2.50λ 1.81, 0.69area scales by 1.25×

Drag the transform above and notice that the two arrows shown are always enough to describe where every other point in the plane lands — they form a basis for the 2-dimensional space the transform acts on, and their new positions alone determine the whole picture.

v1 v2 x = 1.5 v1 + 1.2 v2
Every vector x in the plane, including the dashed one, is one unique mix of the two basis vectors v1 and v2 — no basis vector is redundant, and none is missing.

What this means in practice

Factor models, PCA components, and the "features" fed into a regression are all, formally, bases (or approximate bases) for some space of interest — choosing a basis is choosing which combinations of underlying directions you'll use to describe every observation. A model with too few basis directions can't represent everything it needs to (underfitting the structure); one with redundant, non-independent directions (see Linear Independence and Rank) wastes effort and can make coordinates non-unique or numerically unstable to compute.

A basis is a minimal set of vectors whose combinations reach every vector in a space, with each vector having exactly one valid combination (its coordinates); the number of basis vectors is the space's dimension, and it's the same no matter which valid basis you pick.

Don't assume "more basis vectors is safer." If you throw in an extra vector that's already a combination of the others, the set is no longer a valid basis at all — vectors would have infinitely many valid coordinate representations instead of exactly one, because you could always trade some of the redundant vector's contribution for an equivalent combination of the others. A basis must be exactly the right size for the space: independent enough to give uniqueness, and complete enough to reach everything.

Related concepts

Practice in interviews

Further reading

  • Strang, Introduction to Linear Algebra, ch. 3
  • Axler, Linear Algebra Done Right, ch. 2
ShareTwitterLinkedIn