Let $f$ be an irreducible polynomial in $\mathbb{Q}[X] $ of degree $n$. Let $\phi : \mathbb{Q}[X] \to \mathbb{Q}[X]$ be any ring homomorphism. Prove that every irreducible factor of $\phi(f)$ has degree divisible by $n$.
Need some hints will finish the proof.
$\phi(1) = 1$ so that $\phi$ fixes $\mathbb{Q}$ and is fully determined by $\phi(X)= h$ where $h$ can be any element of $\mathbb{Q}[X]$. If $\deg(h) = 0$ then $\deg(\phi(f)) = 0$ and it works using the convention that $\deg(f)\ | \ 0$.
Otherwise, let $g$ be an irreducible factor of $\phi(f)\, (X) = f(h(X)) $ and let $\beta$ be a root of $g$. We have the field : $$\mathbb{Q}(\beta) \cong \mathbb{Q}[X]/(g(X)), \qquad [\mathbb{Q}(\beta):\mathbb{Q}] = \deg(g)$$ Also $h(\beta)$ is a root of $f$ irreducible, so that $$\mathbb{Q}(h(\beta)) \cong \mathbb{Q}[X]/(f(X)), \qquad[\mathbb{Q}(h(\beta)):\mathbb{Q}] = \deg(f)$$ We have the tower of field extensions $\mathbb{Q}(\beta)/\mathbb{Q}(h(\beta))/\mathbb{Q}$ which means that $$\deg(g) = [\mathbb{Q}(\beta):\mathbb{Q}] =[\mathbb{Q}(\beta):\mathbb{Q}(h(\beta))][\mathbb{Q}(h(\beta)):\mathbb{Q}]=[\mathbb{Q}(\beta):\mathbb{Q}(h(\beta))] \deg(f)$$ Therefore $\deg(f) \ | \ deg(g)$.