# Uniqueness (up to isometries) of a $L^TL$ factorization of a PSD matrix.

I'm trying to see that measuring in $\mathbb{R}^d$ with a metric given by a PSD matrix s equivalent to measuring with the usual euclidean metric after making a linear transformation. This is consequence from a result about PSD matrices that says that every PSD matrix $M$ of dimension $d$ can be decomposed as $M = L^TL$, where $L$ is a square matrix of order $d$. I can prove this by taking a spectral decomposition of $M$, $M = U^TDU$, with $U$ orthogonal, and taking $L = U^TD^{1/2}U$, where $D^{1/2}$ denotes the matrix with the square root of the (non negative) elements of the diagonal matrix $D$ (in fact, this $L$ is symmetric).

I was wondering about the uniqueness of the decompositions $M = L^TL$. As $M$ defines a metric, it seems logic that all the linear maps that define that decomposition must be equal up to an isometry, that is, if $M = L^TL = K^TK$, exists an orthogonal matrix $O$ so that $K = OL$. I'm trying to prove this, but I don't know how should I start. Any hints?

I think I have found an answer, making use of the polar decomposition and the uniqueness of the square root of positive semidefinite matrices. Every matrix $L \in \mathcal{M}_d(\mathbb{R})$ can be decomposed as $L = U|L|$, where $U$ is orthogonal, and $|L| = (L^TL)^{1/2}$ is a PSD matrix. So, if we have $M = L^TL = K^TK$, and polar decompositions $L = U|L|, K = V|K|$, with $U$ and $V$ orthogonal matrices, then
so we have two PSD matrices whose squares are equal. By the uniqueness of the square root of positive matrices, we have $|L| = |K|$. We call that matrix $N$. Going back, we have $$N = U^TL = V^TK \implies K = VU^TL.$$ So taking $O = VU^T$, we have the orthogonal matrix we looked for. However, I find the polar decomposition a too powerful tool for a result like this. So if anyone finds a simple way to prove this I'm still interested.