In all cases, we assume that inverses.

Basic Matrix Identities

A useful identity involving matrix inverse is the following

$$ \begin{aligned} (\bold P^{-1}+\bold B^{\text T}\bold R^{-1}\bold B)^{-1}\bold B^{\text T}\bold R^{-1}&=\bold P\bold B^{\text T}(\bold B\bold P\bold B^{\text T}+\bold R)^{-1}\\ (\bold I+\bold A\bold B)^{-1}\bold A&=\bold A(\bold I+\bold B\bold A)^{-1}\\ (\bold A+\bold B\bold D^{-1}\bold C)^{-1}&=\bold A^{-1}-\bold A^{-1}\bold B(\bold D+\bold C\bold A^{-1}\bold B)^{-1}\bold C\bold A^{-1} \end{aligned} $$

Traces and Determinants

Trace and determinant apply to square matrices. Note that

$$ \text{Tr}(\bold A\bold B)=\text{Tr}(\bold B\bold A)\\ \text{Tr}(\bold A\bold B\bold C)=\text{Tr}(\bold C\bold A\bold B)=\text{Tr}(\bold B\bold C\bold A)\\ \begin{aligned} |\bold A\bold B|&=|\bold A||\bold B|\\ \left|\bold A^{-1}\right|&=\frac{1}{|\bold A|} \end{aligned} $$

If $\bold A$ and $\bold B$ are matrices of size $N\times M$, then

$$ \left|\bold I_N+\bold A\bold B^{\text T}\right|=\left|\bold I_M+\bold A^{\text T}\bold B\right| $$

This gives a useful case

$$ \left|\bold I_N+\bold a\bold b^{\text T}\right|=1+\bold a^{\text T}\bold b $$

where $\bold a$ and $\bold b$ are $N$-dimensional column vectors.

Matrix Derivatives

The derivative of vector $\bold a$ with respect to a scalar $x$ is a vector whose components are given by

$$ \left(\frac{\partial \bold a}{\partial x}\right)_i=\frac{\partial a_i}{\partial x} $$

with an analogous definition for the derivative. Derivatives with respect to vectors and matrices can be defined

$$ \begin{aligned} \left(\frac{\partial x}{\partial \bold a}\right)i&=\frac{\partial x}{\partial a_i}\\ \left(\frac{\partial \bold a}{\partial \bold b}\right){ij}&=\frac{\partial a_i}{\partial b_j} \end{aligned} $$

This gives

$$ \begin{aligned} \frac{\partial}{\partial\bold x}(\bold x^{\text T}\bold a)&=\frac{\partial}{\partial\bold x}(\bold a^{\text T}\bold x)=\bold a\\ \frac{\partial}{\partial\bold x}(\bold A\bold B)&=\frac{\partial\bold A}{\partial\bold x}\bold B+\bold A\frac{\partial\bold B}{\partial\bold x}\\ \frac{\partial}{\partial x}(\bold A^{-1})&=-\bold A^{-1}\frac{\partial\bold A}{\partial x}\bold A^{-1} \end{aligned} $$

Note that