The trace term in 2 Wassersteins metric for Gaussians I was looking at the formula for 2 Wassersteins distance for Gaussian distribution on Wikipedia. https://en.wikipedia.org/wiki/Wasserstein_metric#Normal_distributions
It satisfies all properties of a metric. In order to show that $W\left(\mu_{1},\mu_{2}\right)=W\left(\mu_{2},\mu_{1}\right)$, We need to show that $\mathrm{Tr}((C_{1}^{1/2}C_{2}C_{1}^{1/2})^{1/2})= \mathrm{Tr}((C_{2}^{1/2}C_{1}C_{2}^{1/2})^{1/2})$.
I couldn't convince myself. How to show that the two traces are equal. Can anyone help ? 
 A: Here's one way to prove it:
Fact: let $A$ be a positive definite (PD) matrix with eigendecomposition $A . =Q\Lambda Q^T$. Then $A$ has a unique PD square root given by $Q\Lambda^{1/2}Q^T$. Note that $\Lambda$ is diagonal so the square root is just elementwise.
For the proof, you can verify that $Q\Lambda^{1/2}Q^T$ is PD, and proofs of uniqueness can be found here, for instance.
All matrices under consideration are non-degenerate covariance matrices, i.e. they are PD, so that fact will be very helpful.

Lemma 1: for a PD matrix $A$ with eigendecomposition $A= Q\Lambda Q^T$, $\newcommand{\tr}{\operatorname{tr}}$
$$
\tr(A^{1/2}) = \sum_{i} \sqrt \lambda_i.
$$
Pf :
$$
\tr(A^{1/2}) = \tr(Q\Lambda^{1/2}Q^T) = \tr(\Lambda^{1/2}Q^TQ) = \tr(\Lambda^{1/2}) = \sum_i\sqrt \lambda_i.
$$
$\square$

Lemma 2: $C_1^{1/2}C_2C_1^{1/2}$ and $C_2^{1/2}C_1C_2^{1/2}$ are PD. 
Pf: let $x \neq \vec 0$. Then because $C_2$ is PD we have
$$
x^T C_1^{1/2} C_2C_1^{1/2} x = u^T C_2 u > 0
$$
where we've substituted $u = C_1^{1/2} x$ and made use of the fact that $C_1^{1/2}$ is symmetric.
The proof for $C_2^{1/2}C_1C_2^{1/2}$ is analogous.
$\square$

Lemma 3: the eigenvalues of $A:= C_1^{1/2}C_2C_1^{1/2}$ are the exact same as the eigenvalues of $B:= C_2^{1/2}C_1C_2^{1/2}$.
Pf: let $(\lambda, x)$ be an eigenpair of $A$. Then
$$
C_1^{1/2}C_2C_1^{1/2} x = \lambda x 
$$
$$
\implies C_2^{1/2}C_1^{1/2} C_1^{1/2}C_2C_1^{1/2} x = \underbrace{C_2^{1/2}C_1C_2^{1/2}}_{B} \underbrace{C_2^{1/2}C_1^{1/2} x}_v= \lambda \underbrace{C_2^{1/2}C_1^{1/2} x}_v
$$
$$
\implies Bv = \lambda v
$$
for $v = C_2^{1/2}C_1^{1/2} x$, therefore we have that $\lambda$ is an eigenvalue of $B$. The other direction is analogous.
$\square$

We now know the following things:


*

*the trace of the square root of a PD matrix is the sum of the square roots of its eigenvalues

*$C_1^{1/2}C_2C_1^{1/2}$ and $C_2^{1/2}C_1C_2^{1/2}$ are PD.

*$C_1^{1/2}C_2C_1^{1/2}$ and $C_2^{1/2}C_1C_2^{1/2}$ have the same eigenvalues.


This means that
$$
\tr \,(C_1^{1/2}C_2C_1^{1/2})^{1/2} = \tr\, (C_2^{1/2}C_1C_2^{1/2})^{1/2}
$$
as desired.
