Let $J_n$ be the $n\times n$ matrix with all entries being ones, where $n\geq2$.
(a) Show that the vector of all ones in $\mathbb{R}^n$ is an eigenvector of $J_n$. What is its corresponding eigenvalue?
(b) Show that $0$ is an eigenvalue of $J_n$. What is the geometric multiplicity of this eigenvalue?
(c) For which values of $n\geq2$ is $J_n$ diagonalizable? Justify your answer.
Recall the definition, $$ J\mathrm{x} =\lambda \mathrm{x}, $$ where $\mathrm{x}$ is a non-zero vector from $\mathrm{R}^n$. Note that you have here $n$ equations of the form $$ \sum_{i=1}^n x_i = \lambda x_i. $$ Clearly, $\lambda = 0$ satisfies all the $n$ equations, and you'll have $\sum_{i=1}^n x_i =0$, i.e., $n-1$ degrees of freedom (=geometric multiplicity of $0$). Another option is $\lambda = n$. Try to figure out why it corresponds to eigenvector of the form $(1,...,1)^T$. Another useful property that might help you to get those values is $\det(J) = 0 = \prod_{i=1}^n \lambda_i $ and $tr(J)=n = \sum_{i=1}^n \lambda_i%$.
For the third question - recall that every symmetric real matrix is diagonalizable.