Let $\omega = e^{\frac{i2\pi}{n}}$.
I am trying to show that the minimal polynomial of $\omega$ over $\mathbb{Q}$ is the cyclotomic polynomial, that is the polynomial whose roots are the primitve $\text{nth}$ roots of unity.
My attempt
Let $f(x)$ be the minimal polynomial we are looking for.
Now it is clear that $\mathbb{Q[\omega]}=\mathbb{Q}[\omega^{k}]$ iff $\text{gcd}(k, n)=1$
(Edit: THe next line is incorrect and basically that is the entire problem of irreducbility)
So, $\omega \to \omega^{k}$ for $\text{b}$ as above, gives rise to a field automorphism of $\mathbb{Q}[w]$ which fixes $\mathbb{Q}$. So, $f(\omega^{k})=0$
now we also know that these are the only possible possible field automorphisms that preserve $\mathbb{Q}$.
Also, if $f(\beta)=0$
then $\mathbb{Q}[\omega]=\mathbb{Q}[x]/ f(x) = \mathbb{Q}[\beta]$ where equality is upto field isomorphism.
However here I am stuck. I am not able to show that $\beta$ is a primitive nth root of unity.
I wanted to prove the irreducibility of cyclotomic polynomial from scratch so if someone can help me along the lines of my attempt or point out that my attempt is wrong or not fruitful please do so. I know there are several proofs of this fact but I am trying to do one myself.