# A matrix with the same entries in each row

Let a matrix $A\in \mathbb{R}^{n\times n}$ with the same entries in each row. Then $n-1$ eigenvalues of matrix $A$ is equal to $0$ and one eigenvalue of matrix $A$ is the sum of entries on column. For example, $A\in \mathbb{R}^{n\times n}$ so that $a_{11}=a_{12}=a_{13}=3$, $a_{21}=a_{22}=a_{23}=4$ and $a_{31}=a_{32}=a_{33}=1$. Then the eigenvalues of $A$ is $\lambda_1=\lambda_2=0$ and $\lambda_3=8$. How we can show this result theoretically?

Look at the transpose $A^T$ of $A,$ which has the same eigenvalues, and note that $$A^T \cdot (1,1,\dots,1)^T = (\mu,\mu,\dots,\mu)^T = \mu \cdot (1,1,\dots,1)^T,$$ with $\mu$ being the sum of all elements in one (any) row.
As the rank of $A^T$ is at most one (regarding $A^T$ as a linear map, it clearly maps every vector to a multiple of $(1,1,\dots,1)^T$), all other eigenvalues have to be zero.
You consider a matrix $0\neq A\in\mathbb R^{n\times n}$ of the form $$A=\begin{pmatrix}a_1 & a_1 & \ldots &a_1\\a_2 & a_2 & \ldots &a_2\\ \vdots&\vdots&&\vdots\\a_n & a_n & \ldots &a_n\end{pmatrix}.$$ First, you can directly see that $$u_1=\begin{pmatrix}1\\-1\\0\\0\\\vdots\\0\end{pmatrix},~ u_2=\begin{pmatrix}1\\0\\-1\\0\\\vdots\\0\end{pmatrix},~ u_3=\begin{pmatrix}1\\0\\0\\-1\\\vdots\\0\end{pmatrix},~\ldots~, u_{n-1}=\begin{pmatrix}1\\0\\0\\\vdots\\0\\-1\end{pmatrix}$$ are linear independent and $Au_k=0$, so $u_k$ are all eigenvectors to the eigenvalue $0$ and the corresponding eigenspace has dimension $n-1$.
For the last eigenvalue we define $\alpha=\sum_{k=1}^na_k$ and $$u_n=\begin{pmatrix}a_1\\a_2\\\vdots\\a_n\end{pmatrix}.$$ If $\alpha\neq 0$ then $u_1,\ldots,u_n$ are linear independent and and see $$Au_n=\begin{pmatrix}a_1^2+a_1a_2+a_1a_3+\ldots+a_1a_n\\a_2a_1+a_2^2+a_2a_3+\ldots+a_2a_n\\ \vdots\\ a_na_1+a_na_2+a_na_3+\ldots+a_n^2\end{pmatrix}=\alpha u_n.$$ So you see $u_n$ is an eigenvector to the eigenvalue $\alpha$ and we are done, since we found $n$ linear independent eigenvectors of $A$.
But if $\alpha=0$, you have just $0$ an eigenvalue and the $n-1$-dimensional eigenspace is spanned by $u_1,\ldots,u_{n-1}$. From $A^2=0$ we can conclude that there are no other eigenvalues beside $0$.
(Assume there is an eigenvalue $\lambda\neq 0$ and $v\neq 0$ an eigenvector to $\lambda$, then we get $$0=A^2v = AAv=A\lambda v=\lambda Av=\lambda^2v$$ which yields $\lambda=0$ or $v=0$ which is a contradiction.)