My daughter set me this question and I have no idea how to solve it.It's a long time since I did any algebra.
Let $B$ be an invertible $n \times n$ matrix and $g$ and $h$ be $n$-dimensional column vectors (that is $n\times 1$ matrices) that satisfy $1+h^{T}B^{-1}g\ne0$. Show that $C=B+gh^T$ is invertible and the inverse is given by $D=B^{-1}-(B^{-1}gh^TB^{-1})/(1+h^TB^{-1}g)$ Be careful that all products that you write down/use in the process are indeed valid. Hint: What dimension is the quantity in the denominator of the formula for $D$? Hint 2: Note that for matrices $A,B,C,D$ (assuming that the dimensions are such that the products and sums are defined) we have $ABD+ACD=A(B+C)D$ (Just distribution applied twice).