# Transforming an inverse covariance matrix

I have a linear map, $J$, from one space to another. I can transform a covariance matrix, $P$, from one space to another by using:

$P' = JPJ^{T}$

However, in my situation I have an inverse covariance matrix, $P^{-1}$

The simplest way that I can think of transforming this is:

$P'^{-1} = (J(P^{-1})^{-1}J^{T})^{-1}$

which then using

$(A*B*C)^{-1} = C^{-1}B^{-1}A^{-1}$

should give

$P'^{-1} = (J^{T})^{-1}P^{-1}J^{-1}$

however, when I try this in MATLAB I do not find that these two representations are equal.

$(J(P^{-1})^{-1}J^{T})^{-1} = (J^{T})^{-1}P^{-1}J^{-1}$

$(J(P^{−1})^{−1}J^{T})^{−1} = (J^{T})^{−1}P^{−1}J^{−1} = (JPJ^{T})^{-1}$