# Revision history [back]

Firstly there is the reference manual section on Algebraic Numbers and Number Fields.

As you mentioned, there is the Bordeaux lecture (thematic tutorial) on number fields.

There is the book by William Stein: Algebraic Number Theory, A Computational Approach.

There is also an introductory worksheet for the Mastermath course taught in Leiden, the Netherlands.

It would also make sense to go through a book or lecture notes and to do the computations that are suggested.

Lastly you are welcome to ask more specific questions here. Answering your example question: to find if your number field $K$ contains a square root of two, you can find the roots of $X^2 - 2$ in $K$:

sage: K.<a> = NumberField(x^4 - 6*x^2 + 7)
sage: R.<X> = PolynomialRing(K)
sage: rootsof2 = (X^2 - 2).roots(multiplicities=False); rootsof2
[a^2 - 3, -a^2 + 3]


Note that this $K$ is an abstract number field, with several different embeddings into $\mathbb{C}$, so the question of which one is "the" (positive) square root of two depends on the embedding you want to use:

sage: [map(phi, rootsof2) for phi in K.embeddings(CC)]
[[1.41421356237310, -1.41421356237310],
[-1.41421356237309, 1.41421356237309],
[-1.41421356237309, 1.41421356237309],
[1.41421356237310, -1.41421356237310]]


Firstly there is the reference manual section on Algebraic Numbers and Number Fields.

. As you mentioned, there is the Bordeaux lecture (thematic tutorial) on number fields.

fields. There is the also an introductory worksheet for the Mastermath course taught in Leiden, the Netherlands. It would also make sense to go through a book or lecture notes and to do the computations that are suggested. In this spirit, you would probably appreciate:

The book by William Stein: Algebraic Number Theory, A Computational Approach.

There is also an introductory worksheet for the Mastermath

Of course taught in Leiden, the Netherlands.

It would also make sense to go through a book or lecture notes and to do the computations that are suggested.

Lastly you are welcome to ask more specific questions here. Answering your example question: to find if your number field $K$ contains a square root of two, you can find the roots of $X^2 - 2$ in $K$:

sage: K.<a> = NumberField(x^4 - 6*x^2 + 7)
sage: R.<X> = PolynomialRing(K)
sage: rootsof2 = (X^2 - 2).roots(multiplicities=False); rootsof2
[a^2 - 3, -a^2 + 3]


Note that this $K$ is an abstract number field, with several different embeddings into $\mathbb{C}$, so the question of which one is "the" (positive) square root of two depends on the embedding you want to use:

sage: [map(phi, rootsof2) for phi in K.embeddings(CC)]
[[1.41421356237310, -1.41421356237310],
[-1.41421356237309, 1.41421356237309],
[-1.41421356237309, 1.41421356237309],
[1.41421356237310, -1.41421356237310]]


Firstly there is the reference manual section on Algebraic Numbers and Number Fields. As you mentioned, there is the Bordeaux lecture (thematic tutorial) on number fields. There is also an introductory worksheet for the Mastermath course taught in Leiden, the Netherlands. It would also make sense to go through a book or lecture notes and to do the computations that are suggested. In this spirit, you would probably appreciate:

The book by William Stein: Algebraic Number Theory, A Computational Approach.

Of course you are welcome to ask more specific questions here. Answering your example question: to find if your number field $K$ contains a square root of two, you can find the roots of $X^2 - 2$ in $K$:

sage: K.<a> = NumberField(x^4 - 6*x^2 + 7)
sage: R.<X> = PolynomialRing(K)
sage: rootsof2 = (X^2 - 2).roots(multiplicities=False); rootsof2
[a^2 - 3, -a^2 + 3]


Note that this $K$ is an abstract number field, with several different embeddings into $\mathbb{C}$, so the question of which one is "the" (positive) square root of two depends on the embedding you want to use:

sage: [map(phi, rootsof2) for phi in K.embeddings(CC)]
[[1.41421356237310, -1.41421356237310],
[-1.41421356237309, 1.41421356237309],
[-1.41421356237309, 1.41421356237309],
[1.41421356237310, -1.41421356237310]]


Or, with some more precision:

sage: [[phi(r).radical_expression() for r in rootsof2] for phi in K.embeddings(QQbar)]
[[sqrt(2), -sqrt(2)],
[-sqrt(2), sqrt(2)],
[-sqrt(2), sqrt(2)],
[sqrt(2), -sqrt(2)]]