I am having trouble proving this theorem:
For a field $k$, let $f \in k[x]$ be irreducible, and $g \in k[x]$ be a polynomial. Let $h\in k[x]$ be an irreducible factor of $f\circ g$. Show that $\deg f \mid \deg h$.
My attempt so far was to prove this:
Let $\mathrm{Sq}(n,k)$ be the set of square $n\times n$ matrices with entries in $k$. Let $A\in > \mathrm{Sq}(n,k)$ which has an irreducible characteristic polynomial $f\in k[x]$. Let $g \in k[x]$. Then there exists a $B\in \mathrm{Sq}(n,k)$ satisfying $A=g(B)$ iff $f\circ g$ has a factor in $k[x]$ of degree $n$.
And here's my proof.
Proof. ($\Rightarrow$) Suppose $B$ exists and let $p$ be the minimal polynomial of $B$. Since $k[B]$ contains $k[A]$, $\deg p = n$. Since $f(g(B)) = f(A) = > 0$, we have $p \mid f\circ g$.
($\Leftarrow$) Let $h\mid f\circ g$ and $\deg h = n$. Let $C$ be the companion matrix of $h$. Then $f(g(C)) = 0$, and since $f$ is irreducible with $\deg f = n$, $g(C)$ is similar to the companion matrix of $f$. Therefore $g(C)$ is similar to $A$. As such, $A = T^{-1} g(C) T$ for some $T\in\mathrm{GL}(n,k)$. Then $g(T^{-1}CT)=A$, so $B=T^{-1}CT$. $\blacksquare$
I'm not sure where to go from here. Is this even relevant? Is there a better way to go about this? Hints would be helpful, a proof even more appreciated.