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 ?
 A: 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$).
A: Denote the matrix as $M$.
Let $J$ be the matrix with all entries $1$. 
The matrix $J$ has rank $1$ therefore only one non  zero eigenvalue which is $n$ with corresponding eigenvector $(1,1,\ldots,1)^T$ (what are the eigenvectors corresponding to the eigenvalue(s) $0$?).
Now note that $M=J+(d-1)I_n$ and that for any matrix $A\in\mathbb R^{n\times n}, \ x\in\mathbb R^n$ and $r\in\mathbb R$ if $Ax=\lambda x $ then $(A+rI_n)x=(\lambda+r)x$.
A: Just use row reduction to get the matrix into row echelon form. The entries on the diagonal will be the eigenvalues. If you have to do this for the general case, you'll probably get something that looks like $\lambda_1 = a_{1,1}$, $\lambda_2 = a_{2,2,} - 1/a_{1,1}$, etc.. The eigenvectors should be easy to get from there.
A: The value of your eigenvalues and diagonal elements are the same!
