TITLE: Help me prove or disprove $v^T(A+vv^T)^{-1}v=1$ for singular A
QUESTION [5 upvotes]: Given arbitrary singular square matrix $A$ deficient in rank by $1$, and vector $v$, in numerical experiments with numerous values of the variables, I always get $v^T(A+vv^T)^{-1}v=1$.  Why does $A$ cancel out like this?  (And when not, aside from obvious zero situations?)
EDIT: My $A$ matrices have been symmetric positive semidefinite (so far).  And the relation keeps holding when many or all elements of $v$ are tiny.  (It takes around 6 orders of magnitude smaller than the A elements to break down).

REPLY [2 votes]: In general, over any field, if $A$ is singular but $A+uv^T$ is nonsingular, then $v^T(A+uv^T)^{-1}u=1$.
Let $(A+uv^T)x=u$. Then $Ax=(1-v^Tx)u$. Since $A$ is singular but $A+uv^T$ is nonsingular, $u$ lives outside the column space of $A$. The equality $Ax=(1-v^Tx)u$ thus implies that $Ax=0$ and $v^Tx=1$. Therefore $v^T(A+uv^T)^{-1}u=v^Tx=1$.
In terms of matrices, let $A=UV^T$ be a rank factorisation. Since $A$ is singular but $A+uv^T$ is nonsingular, the augmented matrices $\pmatrix{U&u}$ and $\pmatrix{V&v}$ are nonsingular. Therefore
\begin{aligned}
v^T(A+uv^T)^{-1}u
&=v^T\left[\pmatrix{U&u}\pmatrix{V&v}^T\right]^{-1}u\\
&=\left[\pmatrix{V&v}^{-1}v\right]^T\left[\pmatrix{U&u}^{-1}u\right]\\
&=e_n^Te_n=1,
\end{aligned}
where $e_n=(0,\ldots,0,1)^T$.