Skip to content

Dimension

Count independent directions and portfolio degrees of freedom, distinguishing ambient dimension, affine dimension, stored coordinates and matrix rank.

Dimension counts the independent coordinates needed to describe an object within a specified mathematical space. For a finite-dimensional real vector space, it is precisely the number of vectors in any basis. A portfolio can store three asset weights while leaving only two independent allocation choices: a budget equation determines the third.
The basis may change, but its size does not. MIT's Independence, Basis and Dimension session develops this connection between spanning a space and removing redundant directions. Dimension is a property of the space being described, rather than the length of a particular list of instruments.

Three weights do not always mean three choices

Consider a synthetic portfolio with real-valued weights

w=(wA,wB,wC)∈R3.\mathbf{w}=(w_A,w_B,w_C)\in\mathbb{R}^3.
Each weight is a fraction of portfolio net asset value. Before imposing restrictions, the ambient dimension is three: the surrounding coordinate space is R3\mathbb{R}^3. Negative weights are allowed at this stage.
A fully invested budget constraint requires
wA+wB+wC=1.w_A+w_B+w_C=1.

Choose wA=sw_A=s and wB=tw_B=t freely; then wC=1−s−tw_C=1-s-t. Equivalently,

w=(001)+s(10−1)+t(01−1),s,t∈R.\mathbf{w} =\begin{pmatrix}0\\0\\1\end{pmatrix} +s\begin{pmatrix}1\\0\\-1\end{pmatrix} +t\begin{pmatrix}0\\1\\-1\end{pmatrix}, \qquad s,t\in\mathbb{R}.
The two adjustment directions are linearly independent, so the budget leaves two degrees of freedom. All vectors still contain three entries. The allowed set is a two-dimensional affine plane inside a three-dimensional ambient space.
An affine plane is a shifted vector subspace. This budget plane is not itself a vector subspace: it excludes the zero vector, and adding two fully invested weight vectors produces weights summing to two. Its dimension is the dimension of its parallel adjustment subspace. Boyd and Vandenberghe, §2.1.2, formalise this affine-set distinction.

Now require zero exposure to one toy factor whose asset loadings are (1,−1,0)(1,-1,0):

wA−wB=0.w_A-w_B=0.

This is a second, independent equation. Together the equations give

Aw=b,A=(1111−10),b=(10).A\mathbf{w}=\mathbf{b},\qquad A=\begin{pmatrix}1&1&1\\1&-1&0\end{pmatrix}, \qquad \mathbf{b}=\begin{pmatrix}1\\0\end{pmatrix}.
The matrix rank is two. Setting wA=wB=tw_A=w_B=t yields the complete family
w=(t,t,1−2t),t∈R.\mathbf{w}=(t,t,1-2t),\qquad t\in\mathbb{R}.
There is one free parameter. For example, t=0.25t=0.25 gives (0.25,0.25,0.50)(0.25,0.25,0.50), with budget one and factor exposure zero. This is neutrality to the specified factor only; it does not eliminate all financial risk.
Two-dimensional coordinate chart of three-asset budget weights. Long-only allocations form a two-dimensional triangle; adding wA equals wB gives the one-dimensional segment from (0,0,1) to (0.5,0.5,0), containing (0.25,0.25,0.5). The ambient space remains three-dimensional.
Two-dimensional coordinate chart of three-asset budget weights. Long-only allocations form a two-dimensional triangle; adding wA equals wB gives the one-dimensional segment from (0,0,1) to (0.5,0.5,0), containing (0.25,0.25,0.5). The ambient space remains three-dimensional.
Original synthetic allocation example. Axes show asset A and B weights, each a fraction of NAV; the third weight is 1 minus their sum. The filled triangle adds long-only bounds. The dashed line extends the exposure-neutral family when shorting is allowed.

Count independent restrictions, then check feasibility

For a consistent real linear system with nn unknowns,
dim⁡{x:Ax=b}=n−rank⁡(A).\dim\{\mathbf{x}:A\mathbf{x}=\mathbf{b}\} =n-\operatorname{rank}(A).
This is an affine dimension. A particular solution supplies the offset; the null space supplies the directions along which it can vary. With a zero right-hand side, the solution set is itself a vector subspace.

Two checks prevent the usual counting errors:

  • Repeated equations do not remove extra freedom. Adding 2wA+2wB+2wC=22w_A+2w_B+2w_C=2 to the budget adds a row but leaves rank one and dimension two.
  • Contradictory equations remove every solution. Replacing that right-hand side by three conflicts with the budget. The feasible set is empty; reporting 3−1=23-1=2 as its dimension would misdescribe the problem. Check consistency before applying the formula.
Inequalities need their own examination. Adding wA,wB,wC≥0w_A,w_B,w_C\ge0 bounds the budget plane to a filled triangle whose affine dimension remains two. Adding these long-only bounds to the exposure-neutral line restricts tt to [0,0.5][0,0.5]: a one-dimensional segment. Endpoints do not make the whole segment zero-dimensional.

Bounds can also collapse the set. Budget one, long-only weights and wC≥1w_C\ge1 together force (wA,wB,wC)=(0,0,1)(w_A,w_B,w_C)=(0,0,1), a single point of affine dimension zero. Thus “an inequality never changes dimension” is false.

For these nonempty convex feasible sets, affine dimension means the dimension of the smallest affine set containing them, their affine hull. This is the convention in Boyd and Vandenberghe, §2.1.3. General nonlinear sets require care: their intrinsic dimension need not equal their affine dimension.

Coordinate count, matrix shape and rank answer different questions

A matrix can map three input coordinates to two output coordinates while producing only one independent output direction. For example,
B=(123246),Bx=(u,2u),u=x1+2x2+3x3.B=\begin{pmatrix}1&2&3\\2&4&6\end{pmatrix}, \qquad B\mathbf{x}=(u,2u),\quad u=x_1+2x_2+3x_3.
CountValue hereWhat it describes
Input ambient dimension3Coordinates in each input vector
Output ambient dimension2Coordinates in each output vector
Rank1Dimension of the reachable output space

Counting assets, columns or reported exposures alone does not establish the dimension of their span. In a numerical application, near dependence also requires a stated tolerance and sensible scaling; the exact ranks above concern the stated exact coefficients.

Finally, physical dimension has a different meaning: currency, time or currency per share describe units, rather than the number of independent directions. A one-dimensional price variable can carry USD units; portfolio weights can be dimensionless fractions while ranging over a two-dimensional feasible set.
For the basis argument and payoff-space examples, see Linear Independence, Basis, and Dimension. For offsets, null-space freedom and consistency, see The Complete Solution to Ax = b. Both have a public preview; their full lessons require membership.

Sources

Last updated
  • linear algebra
  • dimension
  • basis
  • rank
  • portfolio constraints
← Back to the glossaryBack to top ↑