In a scientific paper, I've seen the following
$$\frac{\delta K^{-1}}{\delta p} = -K^{-1}\frac{\delta K}{\delta p}K^{-1}$$
where $K$ is a $n \times n$ matrix that depends on $p$. In my calculations I would have done the following
$$\frac{\delta K^{-1}}{\delta p} = -K^{-2}\frac{\delta K}{\delta p}=-K^{-T}K^{-1}\frac{\delta K}{\delta p}$$
Is my calculation wrong?
Note: I think $K$ is symmetric.