# Does $\log(\det(A))$ equals sum of log of diagonal elements of D in LDLT decomposition?

For a large matrix $A$, I need to evaluate the $\log(\det(A))$. I already have it's LDLT decomposition.

Is it possible to evaluate the $\log\det$ with the elements of the diagonal $D$ of the LDLT decomposition?

Thanks!

Yes, it is possible. By construction, the $L$ matrix is lower triangular with all its diagonal entries equal to one. Therefore, $\det(L) = \det(L^T) = 1$ and, consequently, $\det(L D L^T) = \det(L) \, \det(D) \, \det(L^T) = \det(D)$. From this, you can conclude that $\log(\det(A)) = \log(\det(D)) = \log(\prod_{i = 1}^n D_{ii}) = \sum_{i = 1}^n \log(D_{ii})$.