## Count the similarity classes of 3×3 matrices over an extension of QQ

Prove that the number of similarity classes of $3 \times 3$ matrices over $\mathbb{Q}$ which have a given characteristic polynomial $c(x)$ in $\mathbb{Q}[x]$ is the same as the number of similarity classes having characteristic polynomial $c(x)$ in $F[x]$, where $F$ is any extension of $\mathbb{Q}$. Demonstrate that the analogous result does not hold for $4 \times 4$ matrices.

Let $c(x) \in \mathbb{Q}[x]$ be a degree 3 polynomial, and suppose $c(x)$ is the characteristic polynomial of a $3 \times 3$ matrix over $\mathbb{Q}$. There are five distinct possibilities for the irreducible factorization of $c(x)$.

1. $c(x) = (x-\alpha)^3$ for some $\alpha \in \mathbb{Q}$. Now $(x-\alpha)^3$ is the irreducible factorization of $c(x)$ over any extension $F$ of $\mathbb{Q}$. Over both $F$ and $\mathbb{Q}$, the possible lists of invariant factors whose product is $c(x)$ are $x-\alpha$, $x-\alpha$, $x-\alpha$; $x-\alpha$, $(x-\alpha)^2$, and $(x-\alpha)^3$. Thus over both $F$ and $\mathbb{Q}$ there are 3 similarity classes of matrices having characteristic polynomial $c(x)$.
2. $c(x) = (x-\alpha)^2(x-\beta)$ for some distinct $\alpha,\beta \in \mathbb{Q}$. Similarly, this is the irreducible factorization of $c(x)$ over any extension $F$ of $\mathbb{Q}$. Over both fields, the possible lists of invariant factors whose product is $c(x)$ are $x-\alpha$, $(x-\alpha)(x-\beta)$ and $(x-\alpha)^2(x-\beta)$. Thus over both $F$ and $\mathbb{Q}$ there are 2 similarity classes of matrices having characteristic polynomial $c(x)$.
3. $c(x) = (x-\alpha)(x-\beta)(x-\gamma)$ for some distinct $\alpha,\beta,\gamma \in \mathbb{Q}$. Again this is the irreducible factorization of $c(x)$ over any extension $F$ of $\mathbb{Q}$. Over both fields, there is only one possible list of invariant factors whose product is $c(x)$, and that is $(x-\alpha)(x-\beta)(x-\gamma)$. Thus over both $F$ and $\mathbb{Q}$ there is only one similarity class of matrices having characteristic polynomial $c(x)$.
4. $c(x) = (x-\alpha)(x^2-\beta x - \gamma)$ for some $\alpha, \beta, \gamma \in \mathbb{Q}$. Now over any extension $F$ of $\mathbb{Q}$, the polynomial $r(x) = x^2 - \beta x - \gamma$ is either irreducible or factors as a product of linear polynomials. We claim that $r(x)$ is not a perfect square. To see this, suppose we have $r(x) = (x-\eta)^2$ for some $\eta \in F$. Now $r(x) = x^2 -2 \eta x + \eta^2$, but comparing coefficients, we see that $\eta = \beta/2$ is rational- a contradiction since $r(x)$ is irreducible over $\mathbb{Q}$. So in both cases, over both $F$ and $\mathbb{Q}$ any list of invariant factors whose product is $c(x)$ must include, as divisors of its largest term, all factors of $r(x)$ as well as $x-\alpha$. Thus over both $F$ and $\mathbb{Q}$ there is only one similarity class of matrices having characteristic polynomial $c(x)$.
5. $c(x) = x^3 - \alpha x^2 - \beta x - \gamma$ is irreducible in $\mathbb{Q}[x]$. There is then only one similarity class of matrices over $\mathbb{Q}$ having characteristic polynomial $c(x)$. Now let $F$ be an extension of $\mathbb{Q}$. There are five possibilities for the irreducible factorization of $c(x)$ over $F$.
1. $c(x)$ is irreducible in $F[x]$. In this case, there is only one similarity class of matrices over $F$ having characteristic polynomial $c(x)$, as desired.
2. $c(x)$ factors into one linear and one irreducible quadratic. In any list of irreducible factors whose product is $c(x)$, both of these factors must appear in the largest term. Thus there is only one similarity class of matrices over $F$ having characteristic polynomial $c(x)$, as desired.
3. $c(x)$ factors into three distinct linear terms. Again, in any list of irreducible factors whose product is $c(x)$, all three factors must appear in the largest term. So there is only one similarity class of matrices over $F$ having characteristic polynomial $c(x)$, as desired.
4. $c(x) = (x-a)(x-b)^2$ for some distinct $a,b \in F$. We claim that in fact $a,b \in \mathbb{Q}$. To see this, note that by comparing coefficients, we have (1) $a+2b = \alpha$, (2) $2ab + b^2 = -\beta$, and (3) $ab^2 = \gamma$. Substituting (1) into (2) for $a$, we have (I) $b^2 - \frac{2}{3} \alpha b - \frac{1}{3}\beta = 0$. Substituting (1) into (3) for $a$, we have (II) $b^3 - \frac{1}{2} \alpha b^2 + \frac{1}{2} \gamma = 0$. Multiplying (2) by $b$ and then substituting (3), we have (III) $b^3 + \beta b + 2 \gamma = 0$. Now $(III) - (II) - \frac{1}{2} \alpha (I) = 0$, and thus $b = -\frac{9 \gamma + \alpha \beta}{18 \beta + 2\alpha^2}$. So $b \in \mathbb{Q}$, and thus $a \in \mathbb{Q}$. But then $c(x)$ is reducible over $\mathbb{Q}$, a contradiction.
5. $c(x) = (x-a)^3$ for some $a \in F$. Comparing coefficients, we see that $a = \alpha/3$ is rational, a contradiction since $c(x)$ is irreducible over $\mathbb{Q}$.

Now consider $c(x) = x^4 + 2x^2 + 1$. Over $\mathbb{Q}$, $c(x)$ factors into irreducibles as $c(x) = (x^2+1)^2$, but over $\mathbb{C}$, it factors into irreducibles as $c(x) = (x+i)^2(x-i)^2$. Over $\mathbb{Q}$ there are two similarity classes of matrices having characteristic polynomial $c(x)$, but over $\mathbb{C}$ there are 4 such classes.