TITLE: Inverse matrix of matrix (all rows equal) plus identity matrix
QUESTION [8 upvotes]: Let $A$ be a matrix where all rows are equal, for example,
$$A=\left[\begin{array}{ccc}
a_{1} & a_{2} & a_{3} \\
a_{1} & a_{2} & a_{3} \\
a_{1} & a_{2} & a_{3}
\end{array}\right]$$
Then what is the inverse of the matrix $B=I+A$, where $I$ is the identity matrix? For example,
$$B=\left[\begin{array}{ccc}
a_{1}+1 & a_{2} & a_{3} \\
a_{1} & a_{2}+1 & a_{3} \\
a_{1} & a_{2} & a_{3}+1
\end{array}\right]$$
I have a conjecture, which computation has so far confirmed:
$$B^{-1}=I-\frac{A}{\mbox{tr}(A)+1}$$
Why is this true?

REPLY [2 votes]: The inverse of $B$:
$$B^{-1}=\frac{\text{adj}{(B)}}{\det(B)}.$$
The determinant of $B$:
$$\det(B)=\begin{vmatrix}a_{1}+1 & a_{2} & a_{3} \\
a_{1} & a_{2}+1 & a_{3} \\
a_{1} & a_{2} & a_{3}+1\end{vmatrix}=
\begin{vmatrix}a_{1}+1 & a_{2} & a_{3} \\
-1 & 1 & 0 \\
-1 & 0 & 1\end{vmatrix}=a_1+a_2+a_3+1.$$
The adjugate of $B$:
$$\text{adj}(B)=\text{C}^T=\\
\begin{pmatrix}
(a_2+1)(a_3+1)-a_2a_3 & -a_2(a_3+1)+a_2a_3 & a_2a_3-a_3(a_2+1) \\
-a_1(a_3+1)+a_1a_3 & (a_1+1)(a_3+1)-a_1a_3 & -a_3(a_1+1)+a_1a_3 \\
a_1a_2-a_1(a_2+1) & -a_2(a_1+1)+a_1a_2 & (a_1+1)(a_2+1)-a_1a_2
\end{pmatrix}=\\
\begin{pmatrix}
a_1+a_2+a_3+1-a_1 & -a_2 & -a_3 \\
-a_1 & a_1+a_2+a_3+1-a_2 & -a_3 \\
-a_1 & -a_2 & a_1+a_2+a_3+1-a_3
\end{pmatrix}=\\
\begin{pmatrix}
a_1+a_2+a_3+1 & 0 & 0 \\
0 & a_1+a_2+a_3+1 & 0 \\
0 & 0 & a_1+a_2+a_3+1
\end{pmatrix}-
\begin{pmatrix}
a_1 & a_2 & a_3 \\
a_1 & a_2 & a_3 \\
a_1 & a_2 & a_3
\end{pmatrix}.
$$
Note: $C^T$ is the transpose of the cofactor matrix of $B$.
Hence, the result follows.