# Meaning of Extension option in Factor

I would like to ask about the Extension option in Factor function.

In the reference, there is the following example. Factor a polynomial over $$\mathbb{Q}[\sqrt{2}]$$:

Factor[x^2 - 2, Extension -> Sqrt[2]]
(* -(Sqrt[2] - x) (Sqrt[2] + x) *)


In this example, each polynomial has coefficients that are rational combinations of the algebraic number $$\sqrt{2}$$. As it is stated in the reference.

Now, consider the polynomial $$x^2 + \sqrt{2}\,x - 1$$. It has the roots $$-\tfrac12(\sqrt{2} \pm \sqrt{6})$$. Let's factor it over $$\mathbb{Q}[\sqrt{6}]$$:

Factor[x^2 + Sqrt[2]*x - 1, Extension -> Sqrt[6]]
(* -(1/4) (-Sqrt[2] + Sqrt[6] - 2 x) (Sqrt[2] + Sqrt[6] + 2 x) *)


But here, the constant term $$\sqrt{2}$$ is not a rational combination of $$\sqrt{6}$$. It seems it has been factored over $$\mathbb{Q}[\sqrt{2},\sqrt{6}]$$.

How exactly does the Extension option work?

• But $\sqrt2$ is in the domain of coefficient of your original polynomial which is $\mathbb{Q[\sqrt2]}$. Coefficients are not rational numbers. Oct 10, 2022 at 13:04
• @OkkesDulgerci Yes, this is correct. But the reference mentions that Extension extends the rationals with a list of elements. Oct 10, 2022 at 13:09
• The documentation is a bit loose on the matter of what is the field being extended. It is the rationals plus algebraic numbers appearing in the input. Offhand I'm not sure if it also includes algebraic conjugates of those when they give a nontrivial further extension. Oct 10, 2022 at 14:23