Let $ A$ be $n \times n$ matrix all of whose main diagonal entries are 0 and elsewhere $1,$ Find $A^{-1}$•
For such matrix we can write $A = B - I$ Where $B$ is a matrix with all its entries $1$ and $I$ is identity matrix. Then nullity$( A + I) = n-1$ So algebraic multiplicity corresponding to $-1$ is $≥ n-1$ Since the row sum for $A$ is $n-1$, so this must be an eigen value.
Characteristic equation I got is $ (x+1)^{n-1} (x-(n-1))$ now how to get $A^{-1}$ from here$?$