What are the conditions on $a_1, a_2, \dots, a_n$ so that $A$ will not be diagonalizable? Let $A$ be an $n \times n$ matrix in which all the rows are equal:
$$\begin{bmatrix}
    a_{1} & a_{2} & \dots & a_{n} \\
    a_{1} & a_{2} & \dots & a_{n} \\
    \vdots  &\vdots & \ddots &\vdots \\
    a_{1} & a_{2} & \dots & a_{n} \\
    \end{bmatrix}$$
what are the conditions on $a_1, a_2, \dots, a_n$ so that $A$ will not be diagonalizable?
 A: If $(a_1,\ldots,a_n)=(0,\ldots,0)$, then $A$ is the zero matrix, which is diagonal and hence diagonalizable.
Assume then that $(a_1,\ldots,a_n)\neq 0$. Then the matrix has rank $1$, so the nullspace has rank $n-1$; that means that the eigenvalue $0$ has at least $n-1$ linearly independent eigenvalues. At this point, it is just a question of the remaining eigenvalue.
Note that since every row has the same sum, the vector $(1,1,\ldots,1)^T$ is an eigenvector corresponding to the eigenvalue $a_1+\cdots+a_n$. If $a_1+a_2+\cdots+a_n\neq 0$, then this eigenvector is linearly independent from those corresponding to $0$, giving you $n$ distinct linearly independent eigenvectors, and $A$ is diagonalizable.
Note as well that the eigenvalues add up to the trace, $a_1+\cdots+a_n$. That means that in addition to the eigenvalue $0$ with mulitiplicity $n-1$, the only other eigenvalue is in fact $a_1+\cdots+a_n$. Thus, if $a_1+\cdots+a_n=0$, then $A$ has eigenvalue $0$ with algebraic multiplicity $n$, but geometric multiplicity $n-1$, so $A$ is not diagonalizable.
In summary, $A$ is not diagonalizable if and only if $(a_1,\ldots,a_n)\neq (0,0,\ldots,0)$ and $a_1+\cdots+a_n =0$.
