I'm trying to find the splitting field of $x^6-1$ over $\mathbb{Q}$.
I have seen similar examples of questions like this on Stackexchange, but the ones I've seen have all been irreducible polynomials, like $x^5-1$. I'm new to Galois theory and I'm a bit confused how to deal with it.
What I've tried:
My first instinct was to use the sixth roots of unity, and say that $\mathbb{Q}(\zeta_6)$ is the splitting field, where $\zeta_6=e^\frac{2\pi i}{6}$. Then $[\mathbb{Q}(\zeta_6) : \mathbb{Q}]=6$ (I think? Am I wrong here? If so, why?).
But then, $x^6-1=(x^3-1)(x^3+1)=(x-1)(x^2+x+1)(x+1)(x^2-x+1)$.
Two of these roots are already in $\mathbb{Q}$, and the quadratic factors are irredicuble.
Then $L:=\mathbb{Q}[x]/(x^2+x+1)$ is a field, and $[L:\mathbb{Q}]=2$.
Also, $M:=L[y]/(y^2-y+1)$ is a field, and $[M:L]=2$. Thus $[M:\mathbb{Q}]=2\cdot 2=4$.
Is this wrong? Where am I making my mistakes?
It is true that $L=\mathbb{Q}(e^{2\pi i/6})$ is the splitting field of $x^6-1$ (after all the sixth roots of unity must lie in the splitting field almost by definition). Your mistake is jumping to the conclusion that $L$ has degree $6$ over $\mathbb{Q}$. Recall that the degree of a field extension $\mathbb{Q}(\zeta)$ over $\mathbb{Q}$ is the degree of the minimal polynomial of $\zeta$ over $\mathbb{Q}$. Indeed, $\zeta=e^{2\pi i/6}$ satisfies $\zeta^2+\zeta+1=0$ so the degree of the field extension is at most $2$. Since it cannot be $1$ (note $\zeta \notin \mathbb{Q}$), we have $[L:\mathbb{Q}]=2$.
As for your second method, note that $M$ is equal to $L$ since the polynomial $y^2-y+1$ already splits in $L=\mathbb{Q}[x]/(x^2+x+1)$. Indeed, if $\zeta\in L$ is a root of $x^2+x+1$ then $-\zeta$ is a root of $x^2-x+1$. Thus $[M:L]=1$ and so $[M:\mathbb{Q}] = 2$.