Inverse of a matrix having zeroes in diagonal and one elsewhere Could any one help me to find inverse of such matrix? I observed that $A=  J-I$, where J is a matrix having all entries 1.
Thanks for helping.
Note that the rank of $J$ is 1 because its range is spanned by $(1, \cdots, 1)$. Moreover $(1, \cdots, 1)$ is an eigenvector with eigenvalue $n$. Thus  eigenvalues of $J$ are $n$ and $0$ (with multiplicity $n-1$). So the eigenvalues of $A$ are $n-1$ and $-1$ (with multiplicity $n-1$). The minimal polynomial of $A$ is then 
\begin{align*} (A-(n-1)I)(A+I)&amp;=0\\
 A^2-(n-2)A-(n-1)I&amp;=0\\
 A(A-(n-2)I)&amp;=(n-1)I \\
 A^{-1} &amp;=\frac{1}{n-1}(A-(n-2)I)\end{align*}
If your $A$ is an $n\times n$ matrix, for $n\geq2$, the inverse is
$$
\frac{1}{n-1}(A-(n-2)I)
$$