Explore modules

Symmetric Positive-Definite Matrix Logarithm

Find the logarithm of a positive-definite matrix and verify that exponentiating it returns the original transformation.

Free theory article

Find the logarithm of a positive-definite matrix and verify that exponentiating it returns the original transformation.

Concept & interpretation

The matrix logarithm is the inverse operation of the matrix exponential. For a given matrixA, its logarithm L is a matrix such that exp(L) = A. While not all matrices have a real logarithm, every real Symmetric Positive-Definite (SPD) matrix has a unique real symmetric principal logarithm. This can be found using the spectral theorem, by taking the natural logarithm of the strictly positive eigenvalues.

Interactive Experiment

You can visualize this exact mapping and test boundaries in the real module:
https://riano.app/module/matrix-logarithm

  1. Set A11 to 3, A22 to 3, and A12 to 1. The interface confirms "SPD logarithm defined".
  2. Observe the computed logarithm matrix L entries matching our worked example.
  3. Observe the actual reconstruction row-sum residual ‖exp(L) − A‖∞, calculated by exponentiating L rather than copying A.
  4. Set A12 to 0. The eigenvalues become 3 and 3, representing a repeated eigenvalue branch. The off-diagonal entries of L become exactly 0.
  5. Set A22 to 0. The matrix A becomes singular (determinant = 0), and the module correctly identifies this as "Outside SPD logarithm domain".
Read the full free theory article