I want to invert the following matrix: $$ I_m - B (B^T B)^{-1} B^T $$ where $B$ is $m \times n$ with $m > n$ and $B$ has full column rank. The Woodbury matrix inverse identity states: $$ (A + UCV)^{-1} = A^{-1} - A^{-1} U (C^{-1} + V A^{-1} U)^{-1} V A^{-1} $$ Now if we identify: \begin{align} A &= I_m \\ U &= B \\ C &= -(B^T B)^{-1} \\ V &= B^T \end{align} then we have \begin{align} (I_m - B (B^T B)^{-1} B^T)^{-1} &= I_m - B (-B^T B + B^T B)^{-1} B^T \end{align} but this leads to the inverse of a singular matrix. So this seems to indicate that the Woodbury formula won't work on my matrix.
Does anyone know of another way to invert my matrix?