Woodbury Matrix Identity
Theorem 1: Woodbury matrix identity
\[
(A + UBV)^{-1} = A^{-1} - A^{-1} U (B^{-1} + VA^{-1}U)^{-1} VA^{-1}
\]
where \(A \in \mathbb{R}^{n \times n}\), \(U \in \mathbb{R}^{n \times k}\),
\(V \in \mathbb{R}^{k \times n}\), and \(B \in \mathbb{R}^{k \times k}\).
Proof:
\[
\begin{align*}
&(A + UBV)\{A^{-1} - A^{-1} U (B^{-1} + VA^{-1}U)^{-1} VA^{-1}\} \\\\
&= I + UBVA^{-1} -U(B^{-1} + VA^{-1}U)^{-1}VA^{-1} -UBVA^{-1}U(B^{-1} + VA^{-1}U)^{-1}VA^{-1}\\\\
&= I + UBVA^{-1} -U \{(B^{-1} + VA^{-1}U)^{-1} - BVA^{-1}U(B^{-1} + VA^{-1}U)^{-1}\}VA^{-1} \\\\
&= I + UBVA^{-1} -U \{(I - BVA^{-1}U)(B^{-1} + VA^{-1}U)^{-1}\}VA^{-1} \\\\
&= I + UBVA^{-1} -U \{(BB^{-1} - BVA^{-1}U)(B^{-1} + VA^{-1}U)^{-1}\}VA^{-1} \\\\
&= I + UBVA^{-1} -UB \{(B^{-1} - VA^{-1}U)(B^{-1} + VA^{-1}U)^{-1}\}VA^{-1} \\\\
&= I + UBVA^{-1} -UBVA^{-1} \\\\
&= I
\end{align*}
\]
In addition, when \(k = 1\), \(U\) and \(V\) are just vectors, then we obtain Sherman-Morrison formula.
Theorem 2: Sherman-Morrison formula
Suppose \(A \in \mathbb{R}^{n \times n}\) is invertible, and \(u, v \in \mathbb{R}^n\).
Then \((A + uv^T)\) is invertible if and only if \(1 + v^T A^{-1} u \neq 0\). In this case,
\[
(A + uv^T)^{-1} = A^{-1} - \frac{A^{-1} uv^T A^{-1}}{1 + v^T A^{-1} u}.
\]
Note:
\[
(A - uv^T)^{-1} = A^{-1} + \frac{A^{-1} uv^T A^{-1}}{1 - v^T A^{-1} u}.
\]