diagonalization and eigenvalues of a matrix Take the matrix 
$$
        \begin{matrix}
        1 & 1 & 1 & 1 \\
        1 & 1 & 1 & 1 \\
        1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
        \end{matrix}
$$
I tried to calculalte the eigenvalues of this matrix and got to a point where I found that the eigenvalues are: 1,0,2. but wolfarm says it has only 4 ad 0. I have no idea why.. wolfarm:
In addition, can this matrix be diagonalized?
Thanks!
my calculations:
I calculated its characteristic polynomial which is the determinant of the matrix A. 
        \begin{matrix}
    1-t & 1 & 1 & 1 \\
    1 & 1-t & 1 & 1 \\
    1 & 1 & 1-t & 1 \\
1 & 1 & 1 & 1-t \\
    \end{matrix} 
I got to det(t * Id - A) = t*(1-t)^2*(t-2) which means that the eigenvalues are 1,0,2 where did I go wrong?
 A: This means that you made a mistake while computing the eigenvalues, so you should check your work and find what you did wrong.
Actually, you can solve this problem pretty easly. We're working on a four-dimensional vector space, and I guess that's $\mathbb{R}^4$ (or $\mathbb{C}^4$, not much difference in this case). If you consider the operator $f\in\mathcal{L}(\mathbb{R}^4)$ which matrix in the canonical basis $(e_1,e_2,e_3,e_4)$ of $\mathbb{R}^4$ is your matrix (call it $A$), we have $$4=\dim{\mathbb{R}^4}=\dim\ker{f}+\dim\text{Im}f$$ 
Notice that all the columns are the same: the image of each vector of the basis is $e_1+e_2+e_3+e_4$, which means that $\text{Im}f=\text{span}\{e_1+e_2+e_3+e_4\}$. Thus $\dim\text{Im}f=1$. Hence $\dim\ker{f}=3$. Thus $0$ is an eigenvalue and there exists three linearly independent vectors $v_1,v_2,v_3\in\mathbb{R}^4$ such that $Av_1=Av_2=Av_3=0$. $v_1$, $v_2$ and $v_3$ form a linearly independent list of eigenvectors corresponding to the eigenvalue $0$.
Finally, by inspection, you can see that $4$ is an eigenvalue. Indeed, notice that $f(e_i)=e_1+e_2+e_3+e_4$ for all $i\in\{1,2,3,4\}$. The image of each $e_i$ contributes by $1$ in the coordinates. So what happens if you take the sum? $f(e_1+e_2+e_3+e_4)=4(e_1+e_2+e_3+e_4)$. This shows that $4$ is an eigenvalue. Call $v_4=e_1+e_2+e_3+e_4$.
$(v_1,v_2,v_3,v_4)$ form a basis of $\mathbb{R}^4$ since there are $4$ vectors that are linearly independent ($v_4$ is linearly independent from the rest because it is an eigenvector with a different eigenvalue). This shows that $0,4$ are the only eigenvalues and that your matrix is diagonalizable.
Edit: As amd said in comments, we can solve the problem more easily: we found three linearly independent vectors that are eigenvalues of $A$ corresponding to the eigenvalue $0$, so there is at most one additional eigenvalue. The trace of $A$ is 4 but the sum of zeros is zeros. So $4$ must be an eigenvalue and thus $0$ and $4$ are the eigenvalues of $A$. Take any eigenvector $v_4$ corresponding to the eigenvalue $4$. $(v_1,v_2,v_3,v_4)$ is linearly independent, thus a basis of $\mathbb{R}^4$. Hence $A$ is diagonalizable.
A: How did you calculate the eigenvalues? 
It is easy to see that Wolfram is correct by multiplying $Av$ for each vector.
More over, you can see that the rank of the matrix is $1$, meaning there are $3$ linearly independent vectors that satisfy
$$Av = 0 = 0v$$
Meaning there needs to be 3 eigenvectors with eigenvalue of $0$, like wolfram suggests. (And in your answer this isn't possible because a matrix with size $n$ has maximum $4$ eigenvectors... you propose $3$ eigenvectors with $\lambda=0$ and at least one with $\lambda = 1$ and at least one with $\lambda = 2$ making it a minimum of 5 eigenvectors.)
Now About your second question, can you diagonalize the matrix, the answer is yes. A matrix is diagonalizable if and only if it has $n$ independent eigenvectors, and here we have $4$, just the correct amount.
