Home

logdeterminant

Log-determinant, or logdet, of a square matrix A is the natural logarithm of its determinant, written as log det(A). It is real-valued when det(A) > 0, and is most commonly defined for symmetric positive definite matrices, for which det(A) > 0. If A is singular, det(A) = 0 and log det is undefined in the real sense; in some contexts a pseudodeterminant or a complex-valued extension may be used.

Equivalences: if A has eigenvalues λ_i, then det(A) = ∏ λ_i and log det(A) = ∑ log λ_i. If A

Computation: for SPD A, a stable method is Cholesky decomposition A = L L^T and log det(A) =

Differentiation and gradients: the derivative with respect to A is ∂ log det A / ∂ A = (A^{-T}); for

Applications: the log-determinant appears in Gaussian log-likelihoods, Bayesian statistics, Gaussian processes, and various optimization problems, providing

See also: determinant, matrix logarithm, Cholesky decomposition, LU decomposition.

is
positive
definite,
log
det(A)
also
equals
tr(log
A),
where
log
A
is
the
matrix
logarithm.
These
forms
connect
det
and
the
eigenstructure
or
the
matrix
logarithm.
2
∑_i
log
L_ii.
In
general
invertible
A,
log
det
A
can
be
obtained
from
LU
decomposition
as
log
det
A
=
∑
log|U_ii|
+
log|P|,
where
P
is
a
permutation
matrix.
In
numerical
practice,
direct
det
computation
is
avoided
in
favor
of
these
decompositions
for
stability.
symmetric
A
this
reduces
to
A^{-1}.
This
makes
log
det
A
a
smooth,
differentiable
function
on
the
space
of
invertible
matrices,
with
a
gradient
aligned
with
the
inverse
of
A.
a
scale-invariant
measure
of
volume
and
improving
numerical
stability
in
high-dimensional
settings.