# How to find the Galois group of a polynomial?

I’ve been learning about Galois theory recently on my own, and I’ve been trying to solve tests from my university. Even though I understand all the theorems, I seem to be having some trouble with the technical stuff. A specific example would be how to find the Galois group of a given polynomial. I know some tricks, and I manage to solve some of those questions, but some not.

For example, one of the tests asks to find the Galois group of $x^{4}-4x+2$.

I can see that it is irreducible over $\mathbb Q$ (Eisenstein), but I have no clue as to how to find its Galois group over $\mathbb Q$. Can someone tell me how to do this? General techniques concerning this sort of problems are also welcome :).

Thanks!

This is an attempt to write a canonical answer listing techniques to compute Galois groups of explicit polynomials, primarily over $$Q\mathbb{Q}$$, as described in this meta thread. This answer is CW to encourage others to add techniques.

Computability: Over any reasonable field $$KK$$, such as $$Q\mathbb{Q}$$, $$Fp\mathbb{F}_p$$, $$Q(t)\mathbb{Q}(t)$$, etc, Galois groups are computable. See Computable fields and Galois theory by Russel Miller for a good summary of this subject. Logicians can construct countable fields $$KK$$ where the basic field operations $$++$$, $$−-$$, $$×\times$$, $$÷\div$$ are computable but the question “is $$DD$$ square?” is not computable. In such a field, we cannot compute the Galois group of the splitting field of $$x2−Dx^2-D$$. However, this is not the issue that this answer seeks to address and, as described in the linked article, there are very good criteria for showing that fields encountered in ordinary practice do not exhibit this phenomenon.

Although Galois groups are computable, computation of Galois groups, both by computer systems and by students in Galois theory courses, does not proceed along a single algorithm, but rather involves a smorgasboard of methods which are used to prove facts about the group $$GG$$, until enough facts are accumulated to single out a particular group. The main goal of this entry is to list such techniques. I’ve listed the methods roughly in the order I would pull them out. Some methods are left blank for now; feel free to fill them in before I do!

Several of these methods are either primarily used to prove $$GG$$ is large, or primarily used to prove $$GG$$ is small. In this case, I have put “LARGE” or “SMALL” after the subject heading.

I also plan to put some useful lemmas about permutation subgroups at the end, since the more you know about subgroups of $$SnS_n$$, the fewer facts you need about a group $$GG$$ in order to identify it.

As I assume you understand already, if $$ff$$ is a separable polynomial of degree $$nn$$, with roots $$θ1\theta_1$$, $$θ2\theta_2$$, …, $$θn\theta_n$$, and $$LL$$ is the splitting field of $$ff$$ over $$KK$$, then $$Gal(L/K)Gal(L/K)$$ is a subgroup of $$SnS_n$$, which can be thought of as permutations of the roots.

Noticing obvious additive and multiplicative relations between roots (SMALL) Let $$f(x)=x4+2x2+3f(x) = x^4+2 x^2 + 3$$. Since all the exponents in $$ff$$ are even, if $$θ\theta$$ is a root then so is $$−θ-\theta$$. Let the roots be $$(θ1,−θ1,θ2,−θ2)(\theta_1, -\theta_1, \theta_2, -\theta_2)$$. So any Galois symmetry must take the (unordered) pair $${θ1,−θ1}\{ \theta_1, - \theta_1 \}$$ either to $${θ1,−θ1}\{ \theta_1, - \theta_1 \}$$ or $${θ2,−θ2}\{ \theta_2, - \theta_2 \}$$.

Similarly, let $$f(x)=x4+2x3+5x2+2x+1f(x) = x^4 + 2 x^3 + 5 x^2 + 2 x + 1$$. Since this polynomial is palindromic,
if $$θ\theta$$ is a root, then so is $$θ−1\theta^{-1}$$. Writing the roots as $$(θ1,θ−11,θ2,θ−12)(\theta_1, \theta_1^{-1}, \theta_2, \theta_2^{-1})$$, one obtains similar restrictions on $$GG$$. One can also see more complicated multiplicative relations: If $$θ1\theta_1$$ and $$θ2\theta_2$$ are two roots of $$x5−2=0x^5-2=0$$, then so is $$θ22/θ1\theta_2^2/\theta_1$$; relations of the form $$θ3=θ22/θ1\theta_3 = \theta_2^2/\theta_1$$ quickly restrict the Galois group to be a subgroup of a $$2020$$ element group.

Irreducibility of polynomials and transitive group actions The polynomial $$ff$$ is irreducible if and only if the Galois group is transitive. Wolfram alpha, Mathematica, Maple, SAGE, etc. will factor polynomials for you.

To prove polynomials are irreducible by hand, one can use Eisenstein’s criterion or can try to find a prime $$pp$$ such that $$ff$$ does not factor modulo $$pp$$. However, there are polynomials which are irreducible but for which neither of these tests will prove them so.

Complex conjugation (LARGE) Suppose that $$KK$$ is a subfield of $$R\mathbb{R}$$ (such as the rationals). Let $$θ1\theta_1$$, $$θ2\theta_2$$, …, $$θn\theta_n$$ be the roots of $$ff$$, thought of as complex numbers. Again, Wolfram alpha or any computer algebra system will find the $$θ\theta$$‘s for you.

If there are $$rr$$ real roots and $$2s2s$$ complex roots among the $$θ\theta$$‘s, then $$GG$$ contains a permutation of conjugacy class $$(1 2)(3 4)⋯(2s−1 2s)(1\ 2) (3\ 4) \cdots (2s-1 \ 2s)$$

Discriminants Define $$β=∏i and $$Δ=β2\Delta = \beta^2$$. Since $$Δ\Delta$$ is symmetric in the $$θ\theta$$'s, it is in the ground field $$KK$$ and is quite reasonable to compute. The number $$Δ\Delta$$ is called the discriminant of $$ff$$.
The Galois group $$GG$$ is contained in $$AnA_n$$ if and only if $$β\beta$$ is in $$KK$$; in other words, if and only if $$Δ\Delta$$ is square in $$KK$$.

Here is a sample Wolfram alpha session, verifying that the Galois group of the splitting field of $$−1−2x+x2+x3-1 - 2 x + x^2 + x^3$$ is contained in $$A3A_3$$.

Recognizing $$SnS_n$$ and $$AnA_n$$ (LARGE) A random polynomial over $$Q\mathbb{Q}$$ has very high probability of having Galois group $$SnS_n$$. (See this paper of Cohen for a precise bound.) So it is worth being able to recognize the Galois group $$SnS_n$$ early in the process. Keith Conrad has good notes on how to do so. Galois groups appearing on problem sets in Galois theory courses have a lower probability of being $$SnS_n$$. 🙂

Reduction modulo $$pp$$/Chebotarev's density theorem (LARGE, but useful both ways) Suppose that $$pp$$ does not divide the discriminant of $$ff$$. Let $$ff$$ factor modulo $$pp$$ into factors of degrees $$(h1,h2,…,hd)(h_1, h_2, \ldots, h_d)$$. Then $$GG$$ contains an element with cycles of length $$h1h_1$$, $$h2h_2$$, ..., $$hdh_d$$. Conversely, by the Cebatarov density theorem, if $$GG$$ contains an element of cycle type $$(h1,h2,…,hd)(h_1, h_2, \ldots, h_d)$$, then there is a prime $$pp$$ such that $$ff$$ factors modulo $$pp$$ with factors of that size. See David Speyer's blogpost, Hendrik Lenstra's exposition or Keith Conrad's notes.

Here is an example:

Table[Factor[X^4 + 4 X^3 + 12 X^2 + 24 X + 24, Modulus -> Prime[n]], {n, 3, 10}]


produces

{(4 + X) (1 + 2 X + X^3), (5 + X) (2 + 3 X + 6 X^2 + X^3),
(3 + X) (8 + 9 X + X^2 + X^3), (12 + X) (2 + 4 X + 5 X^2 + X^3),
(16 + X + X^2) (10 + 3 X + X^2), (14 + 11 X + X^2) (18 + 12 X + X^2),
(17 + X) (19 + 3 X + 10 X^2 + X^3), (22 + X) (9 + 2 X + 11 X^2 + X^3)}


All the polynomials have cycle type $$(3,1)(3,1)$$ or $$(2,2)(2,2)$$, proving that $$GG$$ contains those cycle types, and producing strong evidence that $$GG$$ is contained in a group which only has cycles of that type. That can't quite be right, because $$GG$$ contains the identity with cycle type $$(1,1,1,1)(1,1,1,1)$$; searching up to $$p=71p=71$$ finds such a factorization. But even running the search that far, we only see cycle types $$(1,1,1,1)(1,1,1,1)$$, $$(3,1)(3,1)$$, $$(2,2)(2,2)$$, suggesting that $$G=A4G = A_4$$. Indeed,

Discriminant[X^4 + 4 X^3 + 12 X^2 + 24 X + 24, X]


outputs $$331776=5762331776=576^2$$ so we know $$G⊆A4G \subseteq A_4$$, and the above data shows that $$GG$$ contains a $$33$$-cycle and contains an element of type $$(2,2)(2,2)$$, so $$G=A4G = A_4$$.

Distinguishing $$D4D_4$$ and $$C4C_4$$ Let $$f(x)=x4−5x2+5f(x) = x^4 - 5 x^2 + 5$$. Since $$f(x)f(x)$$ is even, if $$θ\theta$$ is a root, so is $$−θ- \theta$$. This shows that $$GG$$ is a subgroup of $$D4D_4$$, the dihedral symmetries of a square. Since the polynomial is irreducible, the action on a $$44$$ element set is transitive, which makes $$GG$$ either $$D4D_4$$, the cyclic group $$C4C_4$$, or $$C2×C2C_2 \times C_2$$ with the generators $$(12)(34)(12)(34)$$ and $$(13)(24)(13)(24)$$. Since the discriminant is $$20002000$$, which is not square, it is not contained in $$A4A_4$$, which rules out $$C2×C2C_2 \times C_2$$.

Factoring modulo $$pp$$ finds no factors with cycle type $$(1,1,2)(1,1,2)$$, which strongly suggests $$GG$$ is $$C4C_4$$. But that isn't a proof. This particular case comes up enough (especially on exams!) that there are special methods for it, see Keith Conrad's notes or my answer here.

Testing for $$kk$$-transitivity (LARGE)
More generally, let $$β=θ1+2θ2+⋯+kθk\beta = \theta_1 + 2 \theta_2 + \cdots + k \theta_k$$ and let $$g(x)g(x)$$ be the minimal polynomial of $$β\beta$$. If $$g(x)g(x)$$ has degree $$n(n−1)⋯(n−k+1)n(n-1) \cdots (n-k+1)$$, then $$GG$$ is $$kk$$-transitive on $$(θ1,…,θn)(\theta_1, \ldots, \theta_n)$$. If there is some number of the form $$θs1+2θs2+⋯+kθsk\theta_{s_1} + 2 \theta_{s_2} + \cdots + k \theta_{s_k}$$ which is not a root of $$gg$$, then the group $$GG$$ is not $$kk$$-transitive. Since the $$kk$$-transitive groups have been classified for $$k≥3k \geq 3$$ (see previous link), this can be very useful in identifying $$GG$$.

Here is a small example. Take $$f(x)=x4−4x3+2x2+4x−6f(x) = x^4-4 x^3+2 x^2+4 x-6$$. We check that $$ff$$ is irreducible:

f = x^4 - 4 x^3 + 2 x^2 + 4 x - 6;
Factor[f]


We store the roots of $$ff$$ in variables t1, t2, t3, t4. (Mathematica can actually solve this polynomial exactly, but this is just meant as an example.)

{t1, t2, t3, t4} = x /. Solve[f == 0, x];

b = t1 + 2 t2;

g = MinimalPolynomial[b, x]
(* Output is 42 - 84 x + 50 x^2 - 12 x^3 + x^4 *)


Since $$gg$$ has degree $$44$$, we conclude that the group $$GG$$ probably has an orbit of size $$44$$ acting on ordered pairs of distinct $$θi\theta_i$$'s. For a careful proof, we need to make sure that we don't have accidental equalities of the form $$θi+2θj=θk+2θℓ\theta_i+2 \theta_j = \theta_k + 2 \theta_{\ell}$$. In particular, we check that $$g(θ1+2θ3)≠0g(\theta_1+2 \theta_3) \neq 0$$, so $$(1,2)(1,2)$$ and $$(1,3)(1,3)$$ are in different orbits for the $$GG$$-action. This example is small enough for Mathematica to do exactly, but I'll do the computation numerically because that is good practice for larger examples:

N[g /. x -> t1 + 2 t3]
(* Output is 198.996 + 220.833 I *)


Relative resultants

Installing PARI, GAP or MAGMA This section is about which computer algebra systems have implemented general algorithms to do this, and where to get them.

Useful lemmas about subgroups of $$SnS_n$$