The square matrix that leaves every input unchanged: diagonal ones, off-diagonal zeros, compatible dimensions, inverse checks and the meaning of identity covariance.
Identity matrix
An identity matrix is a square matrix with ones on its main diagonal and zeros everywhere else. Multiplying by it leaves every compatible vector or matrix unchanged. It plays the role that the number one plays in ordinary multiplication:
I2=[1001],I3=100010001.
The subscript gives the number of rows and columns. More generally, (In)ij=1 when i=j and 0 otherwise. Identity matrices are a special case of a diagonal matrix; having a diagonal shape alone is insufficient, because every diagonal entry must be one.
A risk report that changes nothing
Suppose a scenario report records two dimensionless factor shocks, each measured relative to its own reference volatility, in the fixed order equity factor, rates factor:
x=[3−2].
A pass-through stage should preserve both values and their order. Row-by-column multiplication gives
I2x=[1(3)+0(−2)0(3)+1(−2)]=[3−2].
Each row selects exactly its matching input. The zeros prevent cross-mixing. Replacing the zeros by ones does something quite different:
Jx=[1111][3−2]=[11].
The all-ones matrix adds the inputs and repeats their sum. It destroys the distinction between the two shocks. Standardizing coordinates does not itself make the factors independent or turn this sum into a portfolio risk measure.
The identity map leaves the dimensionless shock vector (3, minus 2) unchanged. The all-ones matrix maps it to (1, 1); every output of that matrix lies on the line where both coordinates are equal.
Original synthetic example. Dashed grey arrows show the input; blue arrows show the output. Both plots use identical scales. The identity output lies exactly over its input; the all-ones map collapses the plane onto a line.
Preserving one vector is not enough to identify the identity matrix. A map might leave the equity axis unchanged while altering other directions. The defining property is Inx=x for everyn-component vector. Equivalently, it preserves each standard basis vector, so its columns must be those basis vectors in their original order.
The size on each side matters
For an m×n matrix A,
ImA=A,AIn=A.
On the left, identity preserves the m output coordinates; on the right, it preserves the n input coordinates. For example,
A=[2013−14]⟹I2A=AI3=A.
Here AI2 is undefined: its inner dimensions would be three and two. An identity matrix never repairs a dimension mismatch. It also cannot repair a mismatch of asset labels, factor order or measurement units; those must agree before the algebra is meaningful.
Why it keeps appearing in quant work
An inverse matrix undoes a square invertible map: A−1A=AA−1=In. The identity is therefore the target when checking whether two maps undo each other. With computed floating-point matrices, an approximately identity product is a numerical diagnostic; the size and interpretation of the residual still matter.
An identity covariance matrix means every coordinate has variance one and every pair of distinct coordinates has covariance zero. For standardized factors this is a useful reference model, but zero covariance does not generally imply statistical independence (Bertsekas and Tsitsiklis, §4.2). Nor does the algebraic fact Inx=x say anything about the distribution of the input shocks.
For a first pass through the arithmetic, Vectors and Matrices develops ordered financial inputs and matrix–vector products. Vectors, Matrices and Linear Systems connects compatible matrix operations to inverses and small replication systems. Both have public previews; full lessons require membership.
Sources
Stephen Boyd and Lieven Vandenberghe, Introduction to Applied Linear Algebra: Vectors, Matrices, and Least Squares, Cambridge University Press, 2018, §§6.2 and 10.1. Authors' book page.
Lieven Vandenberghe, UCLA ECE133A, Fall 2025, Matrices, slide 3.7: identity matrix and standard basis columns. University lecture notes.
Dimitri P. Bertsekas and John N. Tsitsiklis, Introduction to Probability, second edition, §4.2. MIT selected summary material.