Let A be the complex square matrix of size $2018 $ whose diagonal entries are all $−2018$ and off-diagonal entries are all $1$. What are the eigenvalues of A and their geometric multiplicities?
My solutions : First i construct the matrix $$A= \begin{pmatrix} -2018 & 1 & \cdots & 1 \\ 1 & -2018 & \cdots & 1 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & \cdots & -2018 \end{pmatrix}_{2018 \times 2018}$$
After that i find $(\lambda I-A_{2018}) =(\lambda+2019)^{2017}(\lambda +4037)$
as eigenvalue are $\lambda = -2019 $ with geometric multiplicity $2017$
And $\lambda = -4037$ with geometric multiplicity $ 1$
Is my solution is correct or not ? Pliz tell me
If my solution is not correct then any hints/solution will be appreciated
thanks in advance