Determinant and Trace
Matrix Decompositions
The determinant det(A) of a square matrix is a single scalar that captures the signed volume scaling factor of the linear map mathbf{x} mapsto Amathbf{x}. If det(A) = 3, the map triples areas (in 2D) or volumes (in 3D). If det(A) < 0, it reverses orientation (like a reflection). If det(A) = 0, the m
measures signed volume scaling; is invertible iff .
No determinant → no normalizing flows, no Jacobian-based change-of-variables, no MAP/ML formulas with priors.
The determinant of a square matrix is a single scalar that captures the signed volume scaling factor of the linear map . If , the map triples areas (in 2D) or volumes (in 3D). If , it reverses orientation (like a reflection). If , the map collapses space — volumes become zero because the image is lower-dimensional.
For a matrix, . In higher dimensions, the determinant expands recursively via cofactor expansion or is computed numerically from the LU decomposition as the product of pivots. Key identities: , , and .
The determinant is the gatekeeper of invertibility: is invertible iff . Singular matrices live on a thin surface in the space of all matrices, the zero set of the determinant polynomial. Numerically, a near-zero determinant warns of ill-conditioning — though the determinant itself can be a misleading size estimate (condition number is a better diagnostic).
The trace is the sum of diagonal entries. Despite its simple definition, it has rich properties: (even when !), it is linear (), and it equals the sum of eigenvalues. Dually, the determinant equals the product of eigenvalues.
Both show up throughout ML. The log-determinant appears in multivariate Gaussian log-likelihoods and is a key term in normalizing flow training (where the change of variables formula requires ). The trace powers the Frobenius norm , used as a matrix-level regularizer. Understanding determinant and trace is the key to reading many probabilistic ML papers.
Exercises
Put your understanding to the test. Score + streak + speed all count.
Confirm you've got it
3 quick questions. Get 2 right to mark this lesson complete.