Find the eigenvalues and eigenvectors of the matrix with all diagonal elements as $d$ and rest $1$ A matrix has all elements 1 except the diagonal elements. It is an $n\times n$ matrix. What are the eigenvectors and eigenvalues ?
Solving book problems in Strang book and stuck on this one and I have no idea where to begin ?

An obvious eigenvector is $(1,\ldots,1)^T$ with eigenvalue $d+n-1$.
Other almost as obvious eigenvectors are $(1,0,\ldots,0,-1,0,\ldots,0)^T$ with eigenvalue $d-1$. Since this gives $n$ linearly independant eigenvectors, we are done. (In fact, any vector orthogonal to $(1,\ldots,1)^T$ is an eigenvector with eigenvalue $d-1$).
