Instability with the Sherman Morrison Woodbury Formula?

69 Views Asked by At

I am currently undertaking research which involves the use of the Sherman Morrison Woodbury formula for matrix inversion. \begin{align*} &(A + UWV^*)^{-1} = A^{-1} - A^{-1}U(W^{-1}+V^*A^{-1}U)^{-1}V^*A^{-1}\\ &(A + UWV^*)^{-1} = A^{-1} - A^{-1}UW(I+V^*A^{-1}UW)^{-1}V^*A^{-1} \end{align*} Where $A\in \mathbb{R}^{n\times n}$, $V^*\in \mathbb{R}^{n\times r}$, $D\in \mathbb{R}^{r\times r}$ and $U\in \mathbb{R}^{n\times r}$.

Curiously, when computing this numerically for say $n=3$ and $r=2$, \begin{align*} (A + UWV^*)^{-1} &\approx A^{-1} - A^{-1}U(W^{-1}+V^*A^{-1}U)^{-1}V^*A^{-1}\\ &\approx A^{-1} - A^{-1}UW(I+V^*A^{-1}UW)^{-1}V^*A^{-1} \end{align*}

However, when increasing $n$ to say 1000, computing $(A + UWV^*)^{-1}$ is vastly different from $A^{-1} - A^{-1}UW(I+V^*A^{-1}UW)^{-1}V^*A^{-1}$ and $A^{-1} - A^{-1}U(W^{-1}+V^*A^{-1}U)^{-1}V^*A^{-1}$.

I was wondering if these are results I should be expecting? If so, is there any relevant material for computing these formulas in numerically stable fashion. Or perhaps my implementation is wrong?