How do you understand matrices under a fraction?

59 Views Asked by At

I was trying to understand the derivation of the Sherman-Morrison formula when I saw this question/answer and the formula

$ (A+uv^T)^{-1} = A^{-1}-\frac{A^{-1}uv^TA^{-1}}{1+v^TA^{-1}u} $

It's my understanding that you cannot divide matrices. Instead you have to multiply by the inverse. So how do you interpret the right hand side of the equation? When rewriting the equation where do you put the denominator? You could write it as

$ (A+uv^T)^{-1} = A^{-1}-(1+v^TA^{-1}u)^{-1} \ * \ A^{-1}uv^TA^{-1} $

or

$ (A+uv^T)^{-1} = A^{-1}- A^{-1}uv^TA^{-1} \ * \ (1+v^TA^{-1}u)^{-1} $

which I assume would result in a different answer because matrix multiplication is not commutative. Can anyone explain what is happening here?