# Proving the inverse of a matrix equals $I_n-\frac{1}{n-1}A$

Question: Let $A$ be a matrix whose elements are all $1$. Prove that $$(I_n-A)^{-1}=I_n - \frac 1{n-1}A.$$

Thought:

I tried using this identity, but couldn't get any further (computing the adjoint looks pretty nasty):

$$(I_n-A)^{-1}=\frac 1{\det(I_n-A)}\operatorname{Adj}(I_n-A)$$

-
OVERKILL: You can use the Sherman-Morrison formula: $\left(I_n-\begin{bmatrix}1\\1\\\vdots \\1\end{bmatrix}_{n\times 1}\begin{bmatrix} 1 & 1 & \cdots & 1\end{bmatrix}_{1\times n}\right)=\\I_n^{-1}-\frac{1}{1+\begin{bmatrix} 1 & 1 & \cdots & 1\end{bmatrix}_{1\times n}I_n \begin{bmatrix}1\\1\\\vdots \\1\end{bmatrix}_{n\times 1}}\left(I_n^{-1}\begin{bmatrix}1\\1\\\vdots \\1\end{bmatrix}_{n\times 1}\begin{bmatrix} 1 & 1 & \cdots & 1\end{bmatrix}_{1\times n}I^{-1}\right)=\cdots$ – Git Gud Jul 11 '13 at 19:06
@GitGud You're gonna hurt someone with that. :-P – Vedran Šego Jul 11 '13 at 19:11

How about just checking: $$\left( {\rm I}_n - \frac{1}{n-1}A \right)({\rm I}_n - A) = {\rm I}_n - \frac{1}{n-1} A - A + \frac{1}{n-1}A^2 = {\rm I}_n - \frac{n}{n-1} A + \frac{n}{n-1}A = {\rm I}_n.$$ Here, we use that $A^2 = nA$, which is easy to verify.

-
Can you explain the last step please – Paze Mar 6 '14 at 11:21
And how do you get rid of -A in the middle? – Paze Mar 6 '14 at 11:24
@Paze $\frac 1 {n-1} A + A = \frac A {n - 1} + \frac {An - A} {n - 1} = \frac {An} {n - 1} = \frac n {n - 1} A$ – DanielV Mar 6 '14 at 11:27
@Paze What do you mean by "the last step"? This is just $-xA + xA = 0$ for $x = n/(n-1)$. – Vedran Šego Mar 6 '14 at 12:55

Since $A$ is symmetric and real then it's diagonalizable and it's pretty simple to see (since $\dim\ker A=n-1$) that $0$ is an eigenvalue of $A$ with multiplicity $n-1$ and the last eigenvalue is $\mathrm{tr}(A)=n$ so there's $P$ invertible such that: $$A=P\mathrm{diag}(0,\ldots,0,n)P^{-1}$$ so $$I-A=P\mathrm{diag}(1,\ldots,1,1-n)P^{-1}$$ hence we can see that \begin{align}(I-A)^{-1}&=P\mathrm{diag}(1,\ldots,1,\frac{1}{1-n})P^{-1}\\&=P(I-\mathrm{diag}(0,\ldots,0,\frac{n}{n-1}))P^{-1}=I-\frac{1}{n-1}A\end{align}

-
(+1) The only answer so far that shows how to find the inverse instead of just checking. – Ragib Zaman Jul 11 '13 at 19:58

Observe that $$A^2 = nA$$ and multiply out $$(I_n-A)(I_n - \frac{1}{n-1}A)$$.

-