B.3 Matrix Identities

For square, invertible matrices 𝐀\mathbf{A} and 𝐁\mathbf{B}, the following are equivalent:

𝐁(𝐀+𝐁)-1\mathbf{B}{(\mathbf{A}+\mathbf{B})}^{-1} 𝐈-𝐀(𝐀+𝐁)-1\mathbf{I}-\mathbf{A}{(\mathbf{A}+\mathbf{B})}^{-1}
(𝐈+𝐀𝐁-1)-1{(\mathbf{I}+\mathbf{A}{\mathbf{B}}^{-1})}^{-1} 𝐈-(𝐈+𝐁𝐀-1)-1\mathbf{I}-{(\mathbf{I}+\mathbf{B}{\mathbf{A}}^{-1})}^{-1}
(𝐀-1+𝐁-1)-1𝐀-1{({\mathbf{A}}^{-1}+{\mathbf{B}}^{-1})}^{-1}{\mathbf{A}}^{-1} 𝐈-(𝐀-1+𝐁-1)-1𝐁-1\mathbf{I}-{({\mathbf{A}}^{-1}+{\mathbf{B}}^{-1})}^{-1}{\mathbf{B}}^{-1}

The proofs are by construction:

𝐁=(𝐀+𝐁)-𝐀𝐁(𝐀+𝐁)-1=𝐈-𝐀(𝐀+𝐁)-1𝐁=(𝐀+𝐁)-𝐀𝐈=(𝐀+𝐁)𝐁-1-𝐀𝐁-1(𝐈+𝐀𝐁-1)-1=𝐁(𝐀+𝐁)-1𝐀-1=(𝐀-1+𝐁-1)-𝐁-1(𝐀-1+𝐁-1)-1𝐀-1=𝐈-(𝐀-1+𝐁-1)-1𝐁-1𝐀-1=(𝐀-1+𝐁-1)-𝐁-1𝐁𝐀-1=𝐁(𝐀-1+𝐁-1)-𝐈(𝐈+𝐁𝐀-1)-1=(𝐀-1+𝐁-1)-1𝐁-1𝐈-(𝐈+𝐁𝐀-1)-1=𝐈-(𝐀-1+𝐁-1)-1𝐁-1𝐁-1=(𝐀-1+𝐁-1)-𝐀-1𝐀𝐁-1=𝐀(𝐀-1+𝐁-1)-𝐈(𝐈+𝐀𝐁-1)-1=(𝐀-1+𝐁-1)-1𝐀-1\begin{split}\mathbf{B}=\mathopen{}\mathclose{{}\left(\mathbf{A}+\mathbf{B}}% \right)-\mathbf{A}&\implies\mathbf{B}\mathopen{}\mathclose{{}\left(\mathbf{A}+% \mathbf{B}}\right)^{-1}=\mathbf{I}-\mathbf{A}\mathopen{}\mathclose{{}\left(% \mathbf{A}+\mathbf{B}}\right)^{-1}\\ \mathbf{B}=\mathopen{}\mathclose{{}\left(\mathbf{A}+\mathbf{B}}\right)-\mathbf% {A}&\implies\mathbf{I}=\mathopen{}\mathclose{{}\left(\mathbf{A}+\mathbf{B}}% \right)\mathbf{B}^{-1}-\mathbf{A}\mathbf{B}^{-1}\\ &\implies\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{A}\mathbf{B}^{-1}}% \right)^{-1}=\mathbf{B}\mathopen{}\mathclose{{}\left(\mathbf{A}+\mathbf{B}}% \right)^{-1}\\ \mathbf{A}^{-1}=\mathopen{}\mathclose{{}\left(\mathbf{A}^{-1}+\mathbf{B}^{-1}}% \right)-\mathbf{B}^{-1}&\implies\mathopen{}\mathclose{{}\left(\mathbf{A}^{-1}+% \mathbf{B}^{-1}}\right)^{-1}\mathbf{A}^{-1}=\mathbf{I}-\mathopen{}\mathclose{{% }\left(\mathbf{A}^{-1}+\mathbf{B}^{-1}}\right)^{-1}\mathbf{B}^{-1}\\ \mathbf{A}^{-1}=\mathopen{}\mathclose{{}\left(\mathbf{A}^{-1}+\mathbf{B}^{-1}}% \right)-\mathbf{B}^{-1}&\implies\mathbf{B}\mathbf{A}^{-1}=\mathbf{B}\mathopen{% }\mathclose{{}\left(\mathbf{A}^{-1}+\mathbf{B}^{-1}}\right)-\mathbf{I}\\ &\implies\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{B}\mathbf{A}^{-1}}% \right)^{-1}=\mathopen{}\mathclose{{}\left(\mathbf{A}^{-1}+\mathbf{B}^{-1}}% \right)^{-1}\mathbf{B}^{-1}\\ &\implies\mathbf{I}-\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{B}\mathbf% {A}^{-1}}\right)^{-1}=\mathbf{I}-\mathopen{}\mathclose{{}\left(\mathbf{A}^{-1}% +\mathbf{B}^{-1}}\right)^{-1}\mathbf{B}^{-1}\\ \mathbf{B}^{-1}=\mathopen{}\mathclose{{}\left(\mathbf{A}^{-1}+\mathbf{B}^{-1}}% \right)-\mathbf{A}^{-1}&\implies\mathbf{A}\mathbf{B}^{-1}=\mathbf{A}\mathopen{% }\mathclose{{}\left(\mathbf{A}^{-1}+\mathbf{B}^{-1}}\right)-\mathbf{I}\\ &\implies\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{A}\mathbf{B}^{-1}}% \right)^{-1}=\mathopen{}\mathclose{{}\left(\mathbf{A}^{-1}+\mathbf{B}^{-1}}% \right)^{-1}\mathbf{A}^{-1}\\ \end{split}

The Woodbury inversion lemma.

For any “conformable” matrices 𝐌\mathbf{M} and 𝐍\mathbf{N}, it is clearly the case that

𝐌(𝐈+𝐍𝐌)=(𝐈+𝐌𝐍)𝐌(𝐈+𝐌𝐍)-1𝐌=𝐌(𝐈+𝐍𝐌)-1.\begin{split}\mathbf{M}\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{N}% \mathbf{M}}\right)=\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{M}\mathbf{% N}}\right)\mathbf{M}\implies\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{M% }\mathbf{N}}\right)^{-1}\mathbf{M}=\mathbf{M}\mathopen{}\mathclose{{}\left(% \mathbf{I}+\mathbf{N}\mathbf{M}}\right)^{-1}.\end{split}

We now find an alternative expression for (𝐈+𝐌𝐍)-1\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{M}\mathbf{N}}\right)^{-1} using the above equation and the fact that (𝐈+𝐌𝐍)\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{M}\mathbf{N}}\right) is its inverse:

𝐈=(𝐈+𝐌𝐍)-1(𝐈+𝐌𝐍)=(𝐈+𝐌𝐍)-1+(𝐈+𝐌𝐍)-1𝐌𝐍(𝐈+𝐌𝐍)-1=𝐈-(𝐈+𝐌𝐍)-1𝐌𝐍=𝐈-𝐌(𝐈+𝐍𝐌)-1𝐍.\begin{split}\mathbf{I}&=\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{M}% \mathbf{N}}\right)^{-1}\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{M}% \mathbf{N}}\right)=\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{M}\mathbf{% N}}\right)^{-1}+\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{M}\mathbf{N}}% \right)^{-1}\mathbf{M}\mathbf{N}\\ \implies\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{M}\mathbf{N}}\right)^% {-1}&=\mathbf{I}-\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{M}\mathbf{N}% }\right)^{-1}\mathbf{M}\mathbf{N}\\ &=\mathbf{I}-\mathbf{M}\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{N}% \mathbf{M}}\right)^{-1}\mathbf{N}.\end{split}

Finally, let 𝐌=set𝐀-1𝐔\mathbf{M}\stackrel{{\scriptstyle\text{set}}}{{=}}\mathbf{A}^{-1}\mathbf{U} and 𝐍=set𝐂𝐕\mathbf{N}\stackrel{{\scriptstyle\text{set}}}{{=}}\mathbf{C}\mathbf{V} in the above equation. Then

(𝐈+𝐀-1𝐔𝐂𝐕)-1=𝐈-𝐀-1𝐔(𝐈+𝐂𝐕𝐀-1𝐔)-1𝐂𝐕(𝐀+𝐔𝐂𝐕)-1=𝐀-1-𝐀-1𝐔(𝐂-1+𝐕𝐀-1𝐔)-1𝐕𝐀-1.\begin{split}\mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{A}^{-1}\mathbf{U% }\mathbf{C}\mathbf{V}}\right)^{-1}&=\mathbf{I}-\mathbf{A}^{-1}\mathbf{U}% \mathopen{}\mathclose{{}\left(\mathbf{I}+\mathbf{C}\mathbf{V}\mathbf{A}^{-1}% \mathbf{U}}\right)^{-1}\mathbf{C}\mathbf{V}\\ \implies\mathopen{}\mathclose{{}\left(\mathbf{A}+\mathbf{U}\mathbf{C}\mathbf{V% }}\right)^{-1}&=\mathbf{A}^{-1}-\mathbf{A}^{-1}\mathbf{U}\mathopen{}\mathclose% {{}\left(\mathbf{C}^{-1}+\mathbf{V}\mathbf{A}^{-1}\mathbf{U}}\right)^{-1}% \mathbf{V}\mathbf{A}^{-1}.\end{split} (B.14)

This final form is known as the Woodbury matrix-inversion lemma. Notice that we have assumed squareness and invertibility for 𝐀\mathbf{A} and 𝐂\mathbf{C}, but not 𝐔\mathbf{U} or 𝐕\mathbf{V}.

The special case in which 𝐔\mathbf{U} and 𝐕\mathbf{V} are vectors, 𝒖\bm{u} and 𝒗T\bm{v}^{\text{T}}, and (without further loss of generality) 𝐂=1\mathbf{C}=1, is known as the Sherman-Morrison formula:

(𝐀+𝒖𝒗T)-1=𝐀-1-𝐀-1𝒖𝒗T𝐀-11+𝒗T𝐀-1𝒖\mathopen{}\mathclose{{}\left(\mathbf{A}+\bm{u}\bm{v}^{\text{T}}}\right)^{-1}=% \mathbf{A}^{-1}-\frac{\mathbf{A}^{-1}\bm{u}\bm{v}^{\text{T}}\mathbf{A}^{-1}}{1% +\bm{v}^{\text{T}}\mathbf{A}^{-1}\bm{u}} (B.15)
matricessquare matricesinvertiblediagonalizabledefectivenormalsymmetricpos. def.
Figure B.1: A taxonomy of matrices.