Determinant of $I-aa^T+bb^T$ Are there any nice formulas for exactly computing the determinant of identity - rank 2 matrix, e.g.
$$\det(M) = \det(I-aa^T+bb^T)?$$
Here we cannot assume that $a$ and $b$ are orthogonal. ($a^Tb > 0$.)
I think it is ok to use projections on range spaces, e.g. 
$$
proj_{range(a)} = \frac{1}{a^Ta} aa^T, \quad proj_{range(a)^\perp} = I - \frac{1}{a^Ta} aa^T.
$$
But the answer is still not clear to me.
Thanks!
 A: You can get there by just going through the rank-1-update formulas for determinants and inverses: the matrix determinant lemma and the Woodbury matrix identity.
In particular, we first need to find $(\mathbf I - \mathbf a \mathbf a^{\mathsf T})^{-1}$, which by the Woodbury identity (or by some of its special cases) is $\mathbf I + \frac{\mathbf a \mathbf a^{\mathsf T}}{1 - \mathbf a \boldsymbol{\cdot} \mathbf a}$. Next, plug this into
$$
   \det(\mathbf I - \mathbf a \mathbf a^{\mathsf T} + \mathbf b \mathbf b^{\mathsf T}) = (1 + \mathbf b^{\mathsf T}(\mathbf I - \mathbf a \mathbf a^{\mathsf T})^{-1} \mathbf b) \det(\mathbf I - \mathbf a \mathbf a^{\mathsf T})
$$
and apply the matrix determinant lemma to $\det(\mathbf I - \mathbf a \mathbf a^{\mathsf T})$. The final answer should be
$$
  \det(\mathbf I - \mathbf a \mathbf a^{\mathsf T} + \mathbf b \mathbf b^{\mathsf T}) = (1 + \mathbf b \boldsymbol\cdot \mathbf b)(1-\mathbf a\boldsymbol\cdot \mathbf a) + (\mathbf a \boldsymbol\cdot \mathbf b)^2.
$$
