For $P_1$ and $P_2$ symmetric matrices, the geodesic $P(t)$ such that $P(0) = P_1$ and $P(1) = P_2$ satisfies $$\dot{P}(0) = P_1^{1/2} Log(P_1^{-1/2} P_2 P_1^{-1/2}) P_1^{1/2}$$ and is thus given by $$ P(t) = P_1^{1/2} e^{t Log(P_1^{-1/2} P_2 P_1^{-1/2})} P_1^{1/2}$$

It follows that $P(t)^{-1} \dot{P}(t) = P_1^{-1/2} Log(P_1^{-1/2} P_2 P_1^{-1/2}) P_1^{1/2}$.

The length of the geodesic is given by equation (2.7) as $$ \int_0^1 \sqrt{Tr[Log(P_1^{-1/2} P_2 P_1^{-1/2})]^2} dt = \| Log(P_1^{-1/2} P_2 P_1^{-1/2})\|_I$$

so that $$ d_{\mathcal P(n)}(P_1,P_2) = \sqrt{Tr[Log(P_1^{-1/2} P_2 P_1^{-1/2})]^2}.$$

Write the diagonalization of the symmetric real matrix $P_1^{-1/2} P_2 P_1^{-1/2} $ as

$$ P_1^{-1/2} P_2 P_1^{-1/2} = A^{-1} D A.$$

Then equation (2.4) leads to $$d_{\mathcal P(n)}^2(P_1,P_2) = Tr[A^{-1} Log(D)^2 A] = Tr[Log(D)^2]$$

Again by equation (2.4) one has $$ Log(P_1^{-1} P_2) = P_1^{-1/2} Log(P_1^{-1/2} P_2 P_1^{-1/2}) P_1^{1/2}$$

so finally $$d_{\mathcal P(n)}(P_1,P_2) = \|Log(P_1^{-1} P_2)\|_{I} = \sqrt{Tr[Log(D)^2]}.$$

On the other hand, $$\|Log(P_1^{-1} P_2)\|^2_ F = Tr[P_1 Log(P_1^{-1/2} P_2 P_1^{-1/2}) P_1^{-1} Log(P_2^{1/2} P_1^{-1} P_2^{1/2})] .$$

For general symmetric positive definite matrices $P_2$ and $W$ not commuting, $Tr(P_2 W P_2^{-1} W) \ne Tr(W^2)$. For instance, if $W = \left(\begin{array}{cc} 1 & 0 \\ 0 & 2 \\ \end{array}\right)$ and $P_2 = \left(\begin{array}{cc} 2 & 1 \\ 1 & 2 \\ \end{array}\right)$, then $Tr(P_2 W P_2^{-1} W) = 16/3$ and $Tr(W^2) = 5$.