Chapter 05
Medium

Determinants

00 — Symbol Glossary


01 — What is the Determinant?

Definition

The determinant of a square matrix A∈Rn×nA\in\mathbb{R}^{n\times n} is a scalar det⁡(A)∈R\det(A)\in\mathbb{R} that encodes the signed scaling factor of the linear transformation represented by AA.

det⁡(A)=signed volume of the parallelepiped spanned by the column vectors of A\det(A) = \text{signed volume of the parallelepiped spanned by the column vectors of } A

Geometrically:

  • ∣det⁡(A)∣\lvert\det(A)\rvert is the factor by which AA scales areas (2-D) or volumes (3-D).
  • det⁡(A)>0\det(A)>0: orientation is preserved.
  • det⁡(A)<0\det(A)<0: orientation is reversed (a reflection is involved).
  • det⁡(A)=0\det(A)=0: the transformation collapses space into a lower dimension — the matrix is singular (non-invertible).
Note

The determinant is defined only for square matrices. For non-square matrices, singular-value decomposition plays an analogous role.

2×2 Determinant

For A=(abcd)A=\begin{pmatrix}a&b\\c&d\end{pmatrix}:

det⁡(A)=ad−bc\det(A)=ad-bc

The formula ad−bcad-bc is the area of the parallelogram formed by the two column vectors (ac)\begin{pmatrix}a\\c\end{pmatrix} and (bd)\begin{pmatrix}b\\d\end{pmatrix}.

Example

Let A=(3214)A=\begin{pmatrix}3&2\\1&4\end{pmatrix}.

det⁡(A)=3⋅4−2⋅1=12−2=10\det(A)=3\cdot4-2\cdot1=12-2=10

The columns (31)\begin{pmatrix}3\\1\end{pmatrix} and (24)\begin{pmatrix}2\\4\end{pmatrix} span a parallelogram of area 1010.

Common mistake

Wrong: det⁡(abcd)=ab−cd\det\begin{pmatrix}a&b\\c&d\end{pmatrix}=ab-cd (multiplying rows instead of diagonals).
Why it happens: Confusing row products with diagonal products.
Correct: Multiply the main diagonal (adad) and subtract the anti-diagonal (bcbc).
Check: det⁡(I)=1⋅1−0⋅0=1\det(I)=1\cdot1-0\cdot0=1. Any other formula gives the wrong answer on the identity.


02 — Cofactor Expansion (3×3 and beyond)

For an n×nn\times n matrix, expand along any row or column. Expanding along row 1:

det⁡(A)=∑j=1na1j C1j=∑j=1n(−1)1+j a1j M1j\det(A)=\sum_{j=1}^{n}a_{1j}\,C_{1j}=\sum_{j=1}^{n}(-1)^{1+j}\,a_{1j}\,M_{1j}

The sign pattern for cofactors is:

(+−+−⋯−+−+⋯+−+−⋯⋮⋱)\begin{pmatrix}+&-&+&-&\cdots\\-&+&-&+&\cdots\\+&-&+&-&\cdots\\\vdots&&&&\ddots\end{pmatrix}
Cofactor expansion of a 3×3 matrix — inputs: $A=\begin{pmatrix}1&2&3\\0&4&5\\1&0&6\end{pmatrix}$

Row 1 signs: +, −, ++,\,-,\,+ (since (−1)1+1=+1(-1)^{1+1}=+1, (−1)1+2=−1(-1)^{1+2}=-1, (−1)1+3=+1(-1)^{1+3}=+1).

M11=det⁡(4506)=4⋅6−5⋅0=24−0=24M_{11}=\det\begin{pmatrix}4&5\\0&6\end{pmatrix}=4\cdot6-5\cdot0=24-0=24 — The 44 is a22a_{22}; the 66 is a33a_{33}; the 55 and 00 are off-diagonal.

M12=det⁡(0516)=0⋅6−5⋅1=0−5=−5M_{12}=\det\begin{pmatrix}0&5\\1&6\end{pmatrix}=0\cdot6-5\cdot1=0-5=-5 — The 00 is a21a_{21}; the 66 is a33a_{33}; the 55 and 11 are off-diagonal.

M13=det⁡(0410)=0⋅0−4⋅1=0−4=−4M_{13}=\det\begin{pmatrix}0&4\\1&0\end{pmatrix}=0\cdot0-4\cdot1=0-4=-4 — The 00s are a21a_{21} and a32a_{32}; the 44 is a22a_{22}; the 11 is a31a_{31}.

det⁡(A)=a11⋅(+1)⋅M11+a12⋅(−1)⋅M12+a13⋅(+1)⋅M13\det(A)=a_{11}\cdot(+1)\cdot M_{11}+a_{12}\cdot(-1)\cdot M_{12}+a_{13}\cdot(+1)\cdot M_{13} =1⋅(+24)+2⋅(−1)(−5)+3⋅(−4)=1\cdot(+24)+2\cdot(-1)(-5)+3\cdot(-4) — The 1,2,31,2,3 are the row-1 entries; the signs +1,−1,+1+1,-1,+1 are cofactor signs; the 24,−5,−424,-5,-4 are the minors.

=24+10−12=22=24+10-12=\boxed{22} — 2424 from step 2, +10+10 from 2⋅(−1)⋅(−5)=102\cdot(-1)\cdot(-5)=10, −12-12 from 3⋅(−4)3\cdot(-4).

Note

Expand along a row or column with the most zeros to minimise computation. If a row has two zeros, only one minor needs to be computed.

Common mistake

Wrong: det⁡(A)=a11M11+a12M12+a13M13\det(A)=a_{11}M_{11}+a_{12}M_{12}+a_{13}M_{13} (all signs positive).
Why it happens: The sign pattern (−1)i+j(-1)^{i+j} is forgotten.
Correct: det⁡(A)=a11M11−a12M12+a13M13\det(A)=a_{11}M_{11}-a_{12}M_{12}+a_{13}M_{13} for row-1 expansion.
Check: det⁡(010100001)\det\begin{pmatrix}0&1&0\\1&0&0\\0&0&1\end{pmatrix} should equal −1-1 (row swap). If your formula gives +1+1, you dropped the signs.


03 — Properties of Determinants

Definition

Let A,B∈Rn×nA,B\in\mathbb{R}^{n\times n}. The following hold:

  1. Row swap: swapping two rows multiplies det⁡\det by −1-1.
  2. Scalar multiple: multiplying one row by kk multiplies det⁡\det by kk.
  3. Row addition: adding a multiple of one row to another leaves det⁡\det unchanged.
  4. Multiplicativity: det⁡(AB)=det⁡(A)det⁡(B)\det(AB)=\det(A)\det(B).
  5. Transpose: det⁡(A⊤)=det⁡(A)\det(A^\top)=\det(A).
  6. Identity: det⁡(I)=1\det(I)=1.
  7. Inverse: If AA is invertible, det⁡(A−1)=1det⁡(A)\det(A^{-1})=\dfrac{1}{\det(A)}.
  8. Triangular matrix: det⁡(A)=∏i=1naii\det(A)=\prod_{i=1}^{n}a_{ii} (product of diagonal entries).
Example

det⁡(3720−15004)=3⋅(−1)⋅4=−12\det\begin{pmatrix}3&7&2\\0&-1&5\\0&0&4\end{pmatrix}=3\cdot(-1)\cdot4=-12 No expansion needed — just multiply the diagonal.

Example

If det⁡(A)=3\det(A)=3 and det⁡(B)=2\det(B)=2, then det⁡(AB)=6\det(AB)=6. This means composing two transformations multiplies their area-scaling factors.

Note

Property 8 is why Gaussian elimination is efficient for computing determinants: reduce to upper triangular form while tracking row-swap signs, then multiply the diagonal.


04 — Determinants via Row Reduction

Row reduction is computationally faster than cofactor expansion for large matrices. Track how each row operation changes the determinant.

Determinant by row reduction — inputs: $A=\begin{pmatrix}2&1&3\\4&5&1\\2&3&7\end{pmatrix}$

det⁡(A)=?\det(A)=?; start with multiplier k=1k=1 (no operations yet).

(21303−5237)\begin{pmatrix}2&1&3\\0&3&-5\\2&3&7\end{pmatrix} — 4−2⋅2=04-2\cdot2=0; 5−2⋅1=35-2\cdot1=3; 1−2⋅3=−51-2\cdot3=-5. Row addition: det⁡\det unchanged, so kk stays 11.

(21303−5024)\begin{pmatrix}2&1&3\\0&3&-5\\0&2&4\end{pmatrix} — 2−2=02-2=0; 3−1=23-1=2; 7−3=47-3=4. Row addition: kk stays 11.

(21303−500223)\begin{pmatrix}2&1&3\\0&3&-5\\0&0&\tfrac{22}{3}\end{pmatrix} — 2−23⋅3=02-\tfrac{2}{3}\cdot3=0; 4−23⋅(−5)=4+103=2234-\tfrac{2}{3}\cdot(-5)=4+\tfrac{10}{3}=\tfrac{22}{3}. Row addition: kk stays 11.

det⁡(A)=k⋅2⋅3⋅223=1⋅2⋅3⋅223=44\det(A)=k\cdot2\cdot3\cdot\tfrac{22}{3}=1\cdot2\cdot3\cdot\tfrac{22}{3}=44 — The 22 is a11a_{11} after reduction; 33 is the pivot in row 2; 223\tfrac{22}{3} is the pivot in row 3.


05 — Invertibility and Cramer's Rule

Definition

A square matrix A∈Rn×nA\in\mathbb{R}^{n\times n} is invertible (non-singular) if and only if

det⁡(A)≠0\det(A)\neq 0

If det⁡(A)=0\det(A)=0, the system Ax=bA\mathbf{x}=\mathbf{b} either has no solution or infinitely many.

Definition

For a system Ax=bA\mathbf{x}=\mathbf{b} with det⁡(A)≠0\det(A)\neq0 and A∈Rn×nA\in\mathbb{R}^{n\times n}:

xi=det⁡(Ai)det⁡(A)x_i=\frac{\det(A_i)}{\det(A)}

where AiA_i is AA with its ii-th column replaced by b\mathbf{b}.

Example

Solve 2x+y=52x+y=5, x+3y=7x+3y=7.

A=(2113)A=\begin{pmatrix}2&1\\1&3\end{pmatrix}, b=(57)\mathbf{b}=\begin{pmatrix}5\\7\end{pmatrix}.

det⁡(A)=2⋅3−1⋅1=5\det(A)=2\cdot3-1\cdot1=5 x=det⁡(5173)5=15−75=85x=\frac{\det\begin{pmatrix}5&1\\7&3\end{pmatrix}}{5}=\frac{15-7}{5}=\frac{8}{5} y=det⁡(2517)5=14−55=95y=\frac{\det\begin{pmatrix}2&5\\1&7\end{pmatrix}}{5}=\frac{14-5}{5}=\frac{9}{5}

Note

Cramer's Rule is elegant but O(n!)O(n!) in theory — never use it for large systems. Gaussian elimination (O(n3)O(n^3)) is always preferred computationally.

Common mistake

Wrong: proceeding to compute xi=det⁡(Ai)/det⁡(A)x_i=\det(A_i)/\det(A) when det⁡(A)=0\det(A)=0.
Why it happens: forgetting to check invertibility first.
Correct: check det⁡(A)≠0\det(A)\neq0 before applying Cramer's Rule. If det⁡(A)=0\det(A)=0, use row reduction to classify the system.
Check: a zero determinant means the columns are linearly dependent — the system cannot have a unique solution.


06 — Geometric Meaning and Quant Application

Area and Volume

Area of parallelogram spanned by u,v=∣det⁡(u1v1u2v2)∣\text{Area of parallelogram spanned by } \mathbf{u},\mathbf{v} = \left|\det\begin{pmatrix}u_1&v_1\\u_2&v_2\end{pmatrix}\right|

Volume of parallelepiped spanned by u,v,w=∣det⁡(u1v1w1u2v2w2u3v3w3)∣\text{Volume of parallelepiped spanned by } \mathbf{u},\mathbf{v},\mathbf{w} = \left|\det\begin{pmatrix}u_1&v_1&w_1\\u_2&v_2&w_2\\u_3&v_3&w_3\end{pmatrix}\right|

Quant Application — Change of Variables in Probability

When transforming a joint density fX,Y(x,y)f_{X,Y}(x,y) to new variables (u,v)=g(x,y)(u,v)=g(x,y), the Jacobian determinant scales the probability mass:

fU,V(u,v)=fX,Y(x(u,v), y(u,v))⋅∣det⁡J∣f_{U,V}(u,v)=f_{X,Y}(x(u,v),\,y(u,v))\cdot\left|\det\mathbf{J}\right|

where J=∂(x,y)∂(u,v)\mathbf{J}=\dfrac{\partial(x,y)}{\partial(u,v)} is the Jacobian matrix.

In options pricing, converting from the risk-neutral measure Q\mathbb{Q} to the physical measure P\mathbb{P} via a Radon-Nikodym derivative is the infinite-dimensional analogue of this determinant scaling.

In portfolio optimisation, the determinant of the covariance matrix Σ\Sigma measures the "generalised variance" of a portfolio. A near-zero det⁡(Σ)\det(\Sigma) signals near-multicollinearity among assets — the portfolio has essentially fewer degrees of freedom than the number of positions.


Exercises

EXERCISE 5.1

Use det⁡(abcd)=ad−bc\det\begin{pmatrix}a&b\\c&d\end{pmatrix}=ad-bc. Identify a,b,c,da,b,c,d carefully — do not multiply row entries.

A=(−352−1)A=\begin{pmatrix}-3&5\\2&-1\end{pmatrix}.

Step 1 — Identify: a=−3a=-3, b=5b=5, c=2c=2, d=−1d=-1.

Step 2 — Apply formula: det⁡(A)=(−3)(−1)−(5)(2)=3−10=−7\det(A)=(-3)(-1)-(5)(2)=3-10=-7.

The determinant is −7-7. The negative sign means the transformation reverses orientation.

Compute det⁡(−352−1)\det\begin{pmatrix}-3&5\\2&-1\end{pmatrix}.

EXERCISE 5.2

Expand along row 1 with signs +,−,++,-,+. Look for the column with a zero to skip one minor.

B=(10231−1024)B=\begin{pmatrix}1&0&2\\3&1&-1\\0&2&4\end{pmatrix}.

Expand along row 1 (signs +,−,++,-,+):

M11=det⁡(1−124)=4−(−2)=6M_{11}=\det\begin{pmatrix}1&-1\\2&4\end{pmatrix}=4-(-2)=6.

M12=det⁡(3−104)=12−0=12M_{12}=\det\begin{pmatrix}3&-1\\0&4\end{pmatrix}=12-0=12. (Multiplied by a12=0a_{12}=0, so this term vanishes.)

M13=det⁡(3102)=6−0=6M_{13}=\det\begin{pmatrix}3&1\\0&2\end{pmatrix}=6-0=6.

det⁡(B)=1⋅(+1)⋅6+0⋅(−1)⋅12+2⋅(+1)⋅6=6+0+12=18\det(B)=1\cdot(+1)\cdot6+0\cdot(-1)\cdot12+2\cdot(+1)\cdot6=6+0+12=\boxed{18}.

Compute det⁡(10231−1024)\det\begin{pmatrix}1&0&2\\3&1&-1\\0&2&4\end{pmatrix} using cofactor expansion.

EXERCISE 5.3

The matrix is upper triangular. The determinant of a triangular matrix is the product of its diagonal entries — no expansion needed.

C=(53−210−2740039000−1)C=\begin{pmatrix}5&3&-2&1\\0&-2&7&4\\0&0&3&9\\0&0&0&-1\end{pmatrix}.

Upper triangular: det⁡(C)=5⋅(−2)⋅3⋅(−1)\det(C)=5\cdot(-2)\cdot3\cdot(-1).

=5⋅(−2)=−10=5\cdot(-2)=-10; then −10⋅3=−30-10\cdot3=-30; then −30⋅(−1)=30-30\cdot(-1)=30.

det⁡(C)=30\det(C)=\boxed{30}.

Compute det⁡(53−210−2740039000−1)\det\begin{pmatrix}5&3&-2&1\\0&-2&7&4\\0&0&3&9\\0&0&0&-1\end{pmatrix}.

EXERCISE 5.4

Use properties: det⁡(A−1)=1/det⁡(A)\det(A^{-1})=1/\det(A); det⁡(kA)=kndet⁡(A)\det(kA)=k^n\det(A) for n×nn\times n; det⁡(AB)=det⁡(A)det⁡(B)\det(AB)=\det(A)\det(B); det⁡(A⊤)=det⁡(A)\det(A^\top)=\det(A). Apply each one in turn.

Given AA is 3×33\times3 with det⁡(A)=4\det(A)=4.

(a) det⁡(A−1)=1/det⁡(A)=1/4\det(A^{-1})=1/\det(A)=1/4.

(b) det⁡(2A)=23det⁡(A)=8⋅4=32\det(2A)=2^3\det(A)=8\cdot4=32. (Each of 3 rows is scaled by 2, so det⁡\det is multiplied by 232^3.)

(c) det⁡(A2)=det⁡(A)det⁡(A)=4⋅4=16\det(A^2)=\det(A)\det(A)=4\cdot4=16.

(d) det⁡(A⊤)=det⁡(A)=4\det(A^\top)=\det(A)=4. The transpose does not change the determinant.

Let AA be a 3×33\times3 matrix with det⁡(A)=4\det(A)=4. Compute: (a) det⁡(A−1)\det(A^{-1}), (b) det⁡(2A)\det(2A), (c) det⁡(A2)\det(A^2), (d) det⁡(A⊤)\det(A^\top).

EXERCISE 5.5

The columns are linearly dependent if and only if det⁡=0\det=0. Check whether one column is a linear combination of the others, or compute the determinant directly.

D=(123246011)D=\begin{pmatrix}1&2&3\\2&4&6\\0&1&1\end{pmatrix}.

Notice: row 2 =2×= 2\times row 1. A row operation R2←R2−2R1R_2\leftarrow R_2-2R_1 gives a zero row.

A matrix with a zero row has det⁡=0\det=0 by linearity of the determinant in each row.

Therefore det⁡(D)=0\det(D)=0 and DD is singular — not invertible.

Geometrically, the three column vectors are coplanar (they lie in a 2-D subspace), so the parallelepiped they span has zero volume.

Determine whether (123246011)\begin{pmatrix}1&2&3\\2&4&6\\0&1&1\end{pmatrix} is invertible. Explain the geometric meaning.

EXERCISE 5.6

A 2×22\times2 covariance matrix Σ=(σ12ρσ1σ2ρσ1σ2σ22)\Sigma=\begin{pmatrix}\sigma_1^2&\rho\sigma_1\sigma_2\\\rho\sigma_1\sigma_2&\sigma_2^2\end{pmatrix}. Compute det⁡(Σ)=σ12σ22−ρ2σ12σ22\det(\Sigma)=\sigma_1^2\sigma_2^2-\rho^2\sigma_1^2\sigma_2^2 and factor.

Σ=(σ12ρσ1σ2ρσ1σ2σ22)\Sigma=\begin{pmatrix}\sigma_1^2&\rho\sigma_1\sigma_2\\\rho\sigma_1\sigma_2&\sigma_2^2\end{pmatrix}.

det⁡(Σ)=σ12σ22−(ρσ1σ2)2=σ12σ22−ρ2σ12σ22=σ12σ22(1−ρ2)\det(\Sigma)=\sigma_1^2\sigma_2^2-(\rho\sigma_1\sigma_2)^2=\sigma_1^2\sigma_2^2-\rho^2\sigma_1^2\sigma_2^2=\sigma_1^2\sigma_2^2(1-\rho^2).

When ρ=0\rho=0: det⁡(Σ)=σ12σ22>0\det(\Sigma)=\sigma_1^2\sigma_2^2 > 0 — full 2-D spread, assets independent.

When ∣ρ∣→1|\rho|\to1: det⁡(Σ)→0\det(\Sigma)\to0 — perfect correlation means both assets move on a 1-D line; the covariance matrix is singular.

In portfolio construction, det⁡(Σ)≈0\det(\Sigma)\approx0 means the portfolio's effective dimension is less than 2 — there is no diversification benefit from holding both assets.

A two-asset portfolio has return covariance matrix Σ=(σ12ρσ1σ2ρσ1σ2σ22)\Sigma=\begin{pmatrix}\sigma_1^2&\rho\sigma_1\sigma_2\\\rho\sigma_1\sigma_2&\sigma_2^2\end{pmatrix}. Compute det⁡(Σ)\det(\Sigma) and explain what happens as ∣ρ∣→1|\rho|\to1.


Chapter Summary

ConceptFormula / Rule
2×22\times2 determinantdet⁡(abcd)=ad−bc\det\begin{pmatrix}a&b\\c&d\end{pmatrix}=ad-bc
CofactorCij=(−1)i+jMijC_{ij}=(-1)^{i+j}M_{ij}
Cofactor expansion (row ii)det⁡(A)=∑jaijCij\det(A)=\sum_j a_{ij}C_{ij}
Triangular shortcutdet⁡(A)=∏iaii\det(A)=\prod_i a_{ii}
Row swapMultiplies det⁡\det by −1-1
Row scalingMultiplies det⁡\det by the scalar
Row additionNo change to det⁡\det
Multiplicativitydet⁡(AB)=det⁡(A)det⁡(B)\det(AB)=\det(A)\det(B)
InvertibilityAA invertible   ⟺  \iff det⁡(A)≠0\det(A)\neq0
Geometric meaning∣det⁡(A)∣\lvert\det(A)\rvert = area/volume scaling factor

Next chapter: Chapter 06 — Eigenvalues & Eigenvectors, where the determinant plays a central role in computing the characteristic polynomial det⁡(A−λI)=0\det(A-\lambda I)=0.