2 Quadratic Fields 151
In the present case we must havea=2,c=1and
b(b− 1 )≡(d− 1 )/4mod2 ifd≡1mod4.
Sinceb(b− 1 )is even, it follows thatd≡5 mod 8.
This proves that ifd≡5 mod 8, then we must be in case (ii) of Proposition 21.
Proposition 22 uses only Legendre’s definition of the Legendre symbol. What
does the law of quadratic reciprocity tell us? By Proposition 4, ifpandqare dis-
tinct odd primes anddan integer not divisible bypsuch thatq≡pmod 4d,then
(d/p)=(d/q). Consequently, by Proposition 22, whether (i) or (ii) holds in Propo-
sition 21 depends only on the residue class ofpmod 4d. Thus, for givend, we need
determine the behaviour of only finitely many primesp.
We mention without proof some further properties of the ringOd. We say that
two nonzero idealsA,A ̃inOdareequivalent, and we writeA∼A ̃,ifthereexist
nonzero principal ideals(α),(α) ̃ such that(α)A=(α) ̃ A ̃.Itiseasilyverifiedthatthis
is indeed an equivalence relation. Moreover, ifA∼A ̃andB∼B ̃,thenAB∼A ̃B ̃.
Consequently, if we call an equivalence class of ideals anideal class, we can without
ambiguity define the product of two ideal classes. The set of ideal classes acquires in
this way the structure of a commutative group, the ideal class containing the conjugate
A′ofAbeing the inverse of the ideal class containingA. It may be shown that this
ideal class groupis finite. The order of the group, i.e. the number of different ideal
classes, is called theclass numberof the quadratic fieldQ(
√
d)and is traditionally
denoted byh(d). The ringOdis a principal ideal domain if and only ifh(d)=1. (It
may be shown thatOdis a factorial domain only if it is a principal ideal domain.)
The theory of quadratic fields has been extensively generalized. Analgebraic num-
ber field Kis a field containing the fieldQof rational numbers and of finite dimen-
sion as a vector space overQ.Analgebraic integeris a root of a monic polynomial
xn+a 1 xn−^1 +···+anwith coefficientsa 1 ,...,an∈Z. The set of all algebraic inte-
gers in a given algebraic number fieldKis a ringO(K). It may be shown that, also in
O(K), any nonzero proper ideal can be represented as a product of prime ideals and the
representation is unique except for the order of the factors. One may also construct the
ideal class groupofKand show that it is finite, its order being theclass numberofK.
Some of the motivation for these generalizations came from ‘Fermat’s last theo-
rem’. Fermat (c. 1640) asserted that the equationxn+yn=znhas no solutions in posi-
tive integersx,y,zifn>2. In Proposition 12 we proved Fermat’s assertion forn=3.
To prove the assertion in generalit is sufficient to prove it whenn=4andwhenn=p
is an odd prime, since ifxkm+ykm=zkm,then(xk)m+(yk)m=(zk)m. Fermat himself
gave a proof forn=4, which is reproduced in Chapter XIII. Proofs forn= 3 ,5and7
were given by Euler (1760–1770), Legendre (1825) and Lam ́e (1839) respectively.
Kummer (1850) made a remarkable advance beyond this by proving that the asser-
tion holds whenevern=pis a ‘regular’ prime. Here a primepis said to beregular
if it does not divide the class number of thecyclotomic fieldQ(ζp), obtained by
adjoining toQap-th root of unityζp. Kummer converted his result into a practical
test by further proving that a primep>3 is regular if and only if it does not divide
the numerator of any of theBernoulli numbers B 2 ,B 4 ,...,Bp− 3.
The only irregular primes less than 100 are 37, 59 and 67. Other methods for deal-
ing with irregular primes were devised by Kummer (1857) and Vandiver (1929). By