Suppose we have a field $K$, $f \in K[x]$ is an irreducible polynomial and $0 \neq g \in K[x]$, how can I prove that either $\gcd(f, g) = 1$ or $f$ divides $g$.

I've tried both ways, assuming that $f$ doesn't divide $g$ and trying to prove that $\gcd(f, g) = 1$ and that $\gcd(f, g) \neq 1$ and $f \mid g$, but haven't made any progress.

## Best Answer

Because $\gcd(f,g)$ divides $f$ there exists $h\in K[x]$ such that $f=h\cdot\gcd(f,g)$. Because $f$ is irreducible this implies that either $h$ or $\gcd(f,g)$ is a unit. Then either $\gcd(f,g)=1$ or $\gcd(f,g)=uf$ for some unit $u\in K[x]$. Because $\gcd(f,g)$ divides $g$ this shows that either $\gcd(f,g)=1$ or $f$ divides $g$.