# Uniqueness and invariance of the LDLT decomposition

A real symmetric positive semi-definite matrix $A$ can be decomposed in the form

$A = P^TLDL^TP$,

where $P$ is a permutation matrix, $L$ is a lower unit triangular matrix and $D$ is a diagonal matrix.

Questions

(a) Is this decomposition unique?

(b) Let $B = \Pi^TA\Pi$, where $\Pi$ is a permutation matrix. It follows that

$B = \Pi^TP^TLDL^TP\Pi = Q^TLDL^TQ$,

where $Q = \Pi P$ is a permutation matrix, too. If the LDLT decomposition is unique, this means that it is invariant to simultaneous permutations of rows and columns of a matrix, right?

No, it is not unique. For instance, for $A=I$, $L=D=I$, and any $P$ work. Or $A=0$, and then $D=0$ and any $L,P$ work.
• Thanks. Actually, what is important to me is uniqueness up to a permutation. This is the purpose of question (b). $A = 0$ is kind of pathological example. Is $LDL^T$, or $L$ or $D$ unique for positive semi-definite matrices (except for $A = 0$)? I mean, $P$ is obviously not unique because of (b), so the question is what about the other matrices? – user3749105 Feb 14 '16 at 21:54
• @user3749105 There are non-zero counterexamples as well. For instance, take $\begin{bmatrix}0 &0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}$. – Federico Poloni Feb 14 '16 at 22:04
• @Poloni: $D$ seems unique, or not? – user3749105 Feb 14 '16 at 22:17
• @user3749105 No -- just take a random positive definite matrix, and different choices for $P$ will give different factors $D$. I don't really think there is any meaningful uniqueness result, apart from the one I have stated in my answer ($LDL^\top$ without permutation, positive definite $A$). – Federico Poloni Feb 14 '16 at 22:29