TITLE: Inversion of n x n matrix.
QUESTION [5 upvotes]: What is the inverse of this $n \times n$ matrix, which is an $n \times n$ matrix of $1$s minus the $n \times n$ identity matrix.

REPLY [2 votes]: Use the Sherman-Morrison formula:
$(A + B)^{-1} = A^{-1} - {1 \over 1 + Tr[B A^{-1}]} A^{-1} B A^{-1}$, where $B$ is an $n \times n$ matrix of $1$s and $A$ is the negative of the $n \times n$ identity matrix $I$.
Of course, here $A^{-1} = -I$.
Thus $(A + B)^{-1} = -I - {1 \over 1 + Tr[B]} B$.
Also, the trace of $B$ is $Tr[B] = n$.
Thus:  $(A + B)^{-1} = -I - {1 \over 1 + n} B$.