# Question about the minimal polynomial for a type of matrices.

Consider the following matrices :

Let $n$ be a positive integer. Define $A_{2n}$ as the $n X n$ matrix :

$\begin{pmatrix} \exp\left(\frac{1 \pi i}{2n}\right) & 0 & \cdots & 0 \\ 0 & \exp\left(\frac{2 \pi i}{2n}\right) & \cdots& 0\\ \vdots & \vdots & \ddots & 0\\ 0 & 0 & 0 & \exp\left(\frac{n \pi i}{2n}\right) \end{pmatrix}$

Define $A_{2n+1}$ as the $n X n$ matrix :

$\begin{pmatrix} \exp\left(\frac{1 \pi i}{2n+1}\right) & 0 & \cdots & 0 \\ 0 & \exp\left(\frac{2 \pi i}{2n+1}\right) & \cdots& 0\\ \vdots & \vdots & \ddots & 0\\ 0 & 0 & 0 & \exp\left(\frac{n \pi i}{2n+1}\right) \end{pmatrix}$

Is it true that the minimal polynomial for $A_n$ is the same as its characteristic polynomial ?

Yes, it is true, since the eigenvalues are the diagonal elements, all of which are different for both matrices. Since every eigenvalue is a root of the minimal polynomial, the degree of the minimal polynomial is $n.$
If $D=\operatorname{diag}(d_1,...,d_n)$ is diagonal, and $p$ is a polynomial, we have $p(D) = \operatorname{diag}(p(d_1),...,p(d_n))$.
Since the minimal polynomial satisfies $\psi_D(D) = 0$ , we must have $\psi_D(d_k) = 0$ for all $k$. Since the $d_k$ are distinct in the examples above we must have $\partial \psi_D = n$, and since $\psi_D \mid \chi_D$, we have $\psi_D = \chi_D$.