Generalization of the Sherman–Morrison formula to $I_d + u u^T+vv^T$

inversematricesreference-request

I know that, by the Sherman–Morrison formula, under some reasonable assumption on $u\in\mathbb{R}^d$, I we have that
$$
(I_d + u u^T)^{-1} = I_d – \frac{uu^T}{1+\lVert u\rVert_2^2}
$$

In other terms, we have a simple formula for the inverse of the sum of the identity matrix and a rank-1 matrix.

Is there a similar formula when one adds two rank-1 matrices? I.e., an expression for
$$
(I_d + u u^T+ v v^T)^{-1}
$$

where $u,v\in\mathbb{R}^d$, as a function of $u,v$ ("separately")?

Note: $u u^T+ v v^T$ has rank $\leq 2$, of course. However, what I want doesn't seem to follow from the Woodbury matrix identity, which "loses" the separate dependence on $u,v$ (or am I missing something?)

Best Answer

We can use the Woodbury matrix identity, in fact. Note that your matrix can be expressed as $$ I + uu^T + vv^T = I + \pmatrix{u&v}\pmatrix{u&v}^T. $$ That is, with the formula as presented in your link we can set $A = I_d$, $C = I_2$, and $$ U = V^T = \pmatrix{u&v}. $$