I have a matrix of size $n \times n$, where diagonal entries are $n-1$ and non-diagonal entries are $2n-2$. I have solved for $2 \times 2$ and $3 \times 3$ matrices, but not getting for $n \times n$ matrix. Now I want to find its characteristic equation and it's polynomial. Please, any suggestions.
For the matrix $n \times n$, where diagonal entries zero and non-diagonal entries are $2n-2$, I have got the value $4(n-1)^2$.
Let's try a simpler looking problem:
Consider the matrix $$A = \begin{pmatrix} 2 & 1 & 1 & 1 \\ 1 & 2 & 1 & 1 \\ 1 & 1 & 2 & 1 \\ 1 & 1 & 1 & 2 \end{pmatrix}.$$
We know that if $\lambda_1, \dots, \lambda_m$ are the eigenvalues of $A$ then its characteristic polynomial looks something like $f(x) = (x - \lambda_1)^{k_1} \cdots (x-\lambda_m)^{k_m}$.
Some suggestions: 1. Find what the eigenvalues are.
Find what dimensions that the eigenspaces are (i.e. how many linearly independent eigenvectors you have for a given eigenvalue).
Hopefully the eigenspaces give you enough information so you can try to construct the characteristic polynomial from that.