Calculating the minimal polynomial of this matrix 
Given $\begin{pmatrix} 1 & 1 & \cdots & 1 \\ 2 & 2 & \cdots & 2 \\ \cdot & \cdot & \cdots & \cdot \\  n & n & \cdots & n \end{pmatrix}$, calculate the minimal polynomial.

I know that the characteristic polyomial is:
$$P_A(x) = x^{n-1} \cdot (x - \frac{n(n+1)}{2}) $$
But how do I exactly know the minimal polynomial? I am sensing that it is by using the Cayley-Hamilton theory!
 A: If 
$$
A=\begin{pmatrix} 1 & 1 & ... & 1 \\ 2 & 2 & ... & 2 \\ . & . & ... & . \\  n & n & ...& n \end{pmatrix},
$$
then it is not hard to check that 
$$
A^2=\frac{n(n+1)}2\,A.
$$
So $p(A)=0$, where $p(x)=x\left(x-\frac{n(n+1)}2\right)$. This polynomial is divided by the minimal polynomial $m_a(x)$. As the minimal polynomial has degree at least two (if $n\geq2$, because otherwise $A$ would be zero or a scalar multiple of the identity), we get 
$$
m_a(x)=x\left(x-\frac{n(n+1)}2\right).
$$
A: This matrix is
$$
A=\begin{bmatrix}1\\2\\3\\\vdots\\n\end{bmatrix}\overbrace{\begin{bmatrix}1&1&1&\cdots&1\end{bmatrix}}^{1\times n}\tag{1}
$$
According to this answer,
$$
\begin{align}
\det(I_n\lambda-A)
&=\lambda^{n-1}\det\left(I_1\lambda-\begin{bmatrix}\frac{n(n+1)}{2}\end{bmatrix}\right)\\
&=\lambda^{n-1}\left(\lambda-\frac{n(n+1)}{2}\right)\tag{2}
\end{align}
$$
However, as Martin Argerami notes, and is easily shown using $(1)$,
$$
A^2=\frac{n(n+1)}{2}A\tag{3}
$$
So the minimal polynomial of A would be $\lambda\left(\lambda-\frac{n(n+1)}{2}\right)$ if $n\gt1$. If $n=1$ then the minimal polynomial would be $\lambda-1$.
A: Here is a more mechanical, more general (but less slick) approach:
Think about the linear map $\alpha$ that the matrix $A$ represents. First we find the matrix of $\alpha$ in Jordan Normal Form. It is then well known (and relatively easy to see by drawing out the matrix) that the if we write $p_\alpha(x)=\prod_{i=1}^k(x-\lambda_i)^{n_i}$ then $n_i$ is the size of the largest $\lambda_i$ block. We can also see that $\dim\big(\ker(\alpha-\lambda_i)\big)$ is the number of $\lambda_i$ blocks.
In this example, we have $0$ as an eigenvalue, since the determinant is zero as the columns are not linearly independent. If $e_i$ is the usual basis of $\mathbb{R}^n$ then $\dim\big(\ker(\alpha-0)\big) = \dim\big(\langle e_1-e_2,\dots,e_1-e_n\rangle\big) = n-1$ and $\dim\big(\ker(\alpha-\frac{n(n-1)}{2}\big)=1$. Thus all $0$ blocks are size $1$ and there is only one $\frac{n(n-1)}{2}$ block, also of size 1. Thus each root of the minimal polynomial appears only once.
In fact, we can in this case do something a little quicker (but in the same spirit). It is always true that the sum of the eigenspaces of a linear map is direct, here the eigenspaces have dimension $n-1$ and $1$ as shown above, so their sum is direct and has dimension $n$ so must be $\mathbb{R}^n$. Thus the matrix is diagonal, so all Jordan Blocks are size $1$ so each root of the minimal polynomial appears only once.
