# A Linear Algebra Problem on Twitter

Problem: Let $A$ and $B$ be $n\times n$ matrices such that their sum $A+B$ is invertible. Then show that $$A(A+B)^{-1}B=B(A+B)^{-1}A$$ (Hat tip: Sam Walters)

Solution. \begin{aligned}I&=(A+B)(A+B)^{-1}\\&=A(A+B)^{-1}+B(A+B)^{-1}\end{aligned}\label{eq:matrix} Multiply \eqref{eq:matrix} by $B$ from the right $$\label{eq:matrix2}B=A(A+B)^{-1}B+B(A+B)^{-1}B$$ Also multiply \eqref{eq:matrix} by $A$ from the left $$\label{eq:matrix3}A=A(A+B)^{-1}A+B(A+B)^{-1}A$$ Subtract \eqref{eq:matrix3} from \eqref{eq:matrix2}. $$\label{eq:matrix4}B-A=A(A+B)^{-1}B-B(A+B)^{-1}A+B(A+B)^{-1}B-A(A+B)^{-1}A$$ In a similar manner from $I=(A+B)^{-1}(A+B)$, we obtain $$\label{eq:matrix5}A-B=A(A+B)^{-1}B-B(A+B)^{-1}A+A(A+B)^{-1}A-B(A+B)^{-1}B$$ \eqref{eq:matrix4}+\eqref{eq:matrix5} results $$A(A+B)^{-1}B=B(A+B)^{-1}A$$

A mathematician who Twitter username is Manifoldless beat me to it by a few minutes :). But not just that. His solution is shorter (so better) than mine: \begin{align*}A(A+B)^{-1}B&=(A+B-B)(A+B)^{-1}(A+B-A)\\&=[I-B(A+B)^{-1}](A+B-A)\\&=A+B-A-B+B(A+B)^{-1}A\\&=B(A+B)^{-1}A\end{align*}

## 2 thoughts on “A Linear Algebra Problem on Twitter”

1. Denis

For the linear algebra twitter problem use a substitution A+B =C and so B=C-A,
Rewrite the problem in terms of A and C and it becomes trivial.

This site uses Akismet to reduce spam. Learn how your comment data is processed.