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?
$A=ea^T$ where $a=\begin{bmatrix} a_1 \\ a_2 \\ a_3 \end{bmatrix}$ and $e = \begin{bmatrix} 1 \\ 1 \\ 1\end{bmatrix}.$
Now, we can use the Sherman-Morrison formula, which states that a matrix $C$ is invertible, then $C+uv^T$ is invertible if $1+v^TC^{-1}u \ne 0$ and $$(C+uv^T)^{-1}=C^{-1}-\frac{C^{-1}uv^TC^{-1}}{1+v^TC^{-1}u}.$$ $B=I+ea^T$, hence $B$ is invertible if $1+a^Te=1+\sum_{i=1}^3a_i=1+trace(A) \ne 0.$ and $$B^{-1}=I-\frac{ea^T}{1+trace(A)}=I-\frac{A}{1+trace(A)}$$