# minimal polynomial of $n$ by $n$ matrix

I want to know if $x^{n-1}-1$ can be a minimal polynomial of n by n matrix with real entries. If yes, find the matrix. If no, why so? I am thinking that when we subtract something from diagonal element and expand the matrix to get characteristic polynomial, the eigenvalue must be in the expression. So the minimal polynomial in the question gives roots of unity as eigenvalue, which are complex. So no such matrix. Am I correct?

• Just where those roots of unity came from? There is no unity in $x^{n-1}=0$. Or did you mean $x^{n-1}=1$? That would be quite a different story. – Ivan Neretin Jun 5 '16 at 10:54
• @Ivan neretin I meant the second case. I have to edit my question. – low iq Jun 5 '16 at 10:57
• Fine. Now consider the matrix $\left(\begin{matrix}0&1&0 \\ 1&0&0 \\ 0&0&1 \\ \end{matrix}\right)$. Isn't it the example for $n=3$? – Ivan Neretin Jun 5 '16 at 10:58
• @Ivan neretin what would be the matrix for first case? – low iq Jun 5 '16 at 10:58
• For the first case, consider $\left(\begin{matrix} 0&1&0&0 \\ 0&0&1&0 \\ 0&0&0&0 \\ 0&0&0&0 \\ \end{matrix}\right)$. – Ivan Neretin Jun 5 '16 at 11:01

## 2 Answers

Any monic polynomial can be the minimal polynomial of a matrix. If $$p(x) = a_0 +a_1x + \cdots + a_{n-1}x^{n-1} + x^n.$$

then $p$ is the minimal and characteristic polynomial of the $n \times n$ matrix $$C(p) = \begin{pmatrix} 0 & 0 & \dots & 0 & -a_0\\ 1 & 0 & \dots & 0 & -a_1\\ 0 & 1 & \dots & 0 & -a_1\\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & \dots & 1 & -a_{n-1}\\ \end{pmatrix}_.$$

$C(p)$ is called the "Companion Matrix" of $p(x)$.

I just realized that your question asked about $x^{n-1}-1$ as the minimal polynomial of a matrix of size $n$. In that case you can take a block diagonal matrix:

$$\begin{pmatrix} 1 & 0 \\ 0 & C(x^{n-1}-1)\\ \end{pmatrix}$$

To answer your question of a matrix "satisfying" a polynomial, I will answer your question with the specific polynomial in your question.

To say that a matrix $A$ satisfies the polynomial $x^{n-1}-1$ means that $A^{n-1}-I = \textbf{0}$. Where $I$ denotes the identity matrix and $\textbf{0}$ denotes the zero matrix.

$\textbf{Example:}$ Let $p(x) = x^3 + 2x^2 - x + 4$. Then $$C(p) = \begin{pmatrix} 0 & 0 & -4\\ 1 & 0 & 1 \\ 0 & 1 & -2\\ \end{pmatrix}_.$$

To see that $C(p)$ satisfies $p(x)$,

\begin{align*} C(p)^3 &= \begin{pmatrix} -4 & 8 & -20\\ 1 & -6 & 13\\ -2 & 5 & -16\\ \end{pmatrix}\\ C(p)^2 &= \begin{pmatrix} 0 & -4 & 8 \\ 0 & 1 & -6 \\ 1 & -2 & 5\\ \end{pmatrix} \end{align*}

So \begin{align*} p(C(p)) &= C(p)^3 + 2 C(p)^2 - C(p) + 4I\\ &= \begin{pmatrix} -4 & 8 & -20\\ 1 & -6 & 13\\ -2 & 5 & -16\\ \end{pmatrix} + 2 \begin{pmatrix} 0 & -4 & 8 \\ 0 & 1 & -6 \\ 1 & -2 & 5\\ \end{pmatrix} - \begin{pmatrix} 0 & 0 & -4\\ 1 & 0 & 1 \\ 0 & 1 & -2\\ \end{pmatrix} + \begin{pmatrix} 4 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 4 \\ \end{pmatrix} \\ &= \begin{pmatrix} -4 & 8 & -20\\ 1 & -6 & 13\\ -2 & 5 & -16\\ \end{pmatrix} + \begin{pmatrix} 0 & -8 & 16 \\ 0 & 2 & -12 \\ 2 & -4 & 10\\ \end{pmatrix} + \begin{pmatrix} 0 & 0 & 4\\ -1 & 0 & -1 \\ 0 & -1 & 2\\ \end{pmatrix} + \begin{pmatrix} 4 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 4 \\ \end{pmatrix}\\ &= \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ \end{pmatrix}_. \end{align*}

• can you give one easy example of polynomial and it's companion matrix, so that I can learn how to write companion matrix – low iq Jun 5 '16 at 15:58

You want an $n$ by $n$ matrix with minimal polynomial $x^{n-1} -1$. It is sufficient (and necessary if $n$ is even) that the matrix has the invariant factors: $x-1, x^{n-1} - 1$. This means that all such matrices must have the rational canonical form: $C(x -1) \oplus C(x^{n-1} - 1)$ (which means that we can take this matrix as an example), where $C(p(x))$ is the Fröbenius Companion Matrix of a monic polynomial.

For instance, if $n=5$, you get the following:

$$\begin{bmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \end{bmatrix}$$

• but how do you write it? Trial and error? Or some rule/logic? – low iq Jun 5 '16 at 11:58
• @lowiq of course not trial and error; that's lame. This is based on theorems. I might expand my answer later, but if you are interested, you may want to read about the invariant factors and rational canonical forms of matrices – user258700 Jun 5 '16 at 12:05
• In Wikipedia, it is written that companion matrix has minimal polynomial P.what does it mean? Minimal polynomial should satisfy the matrix. How does p satisfies the matrix? – low iq Jun 5 '16 at 12:20