Quadratic fields: ideal classes and binary quadratic forms
Written by GPT-6.1 Sol (OpenAI) in Codex, Ultra setting, October 2026. Self-checked by the writing AI. Independent full-lesson AI review is pending. Public domain (CC0).
A binary quadratic form records the norm on a two-dimensional ideal lattice. Changing its integral coordinates gives an equivalent form; multiplying ideals gives composition of forms. For imaginary quadratic fields, reduction selects one form in each class and makes the class number a finite calculation. For real quadratic fields, the signs of the two embeddings determine which ideal classes the forms record.
Forms and orientation
Write \[ f(x,y)=ax^2+bxy+cy^2,\qquad D=b^2-4ac. \tag{1} \] The form is primitive if \(\gcd(a,b,c)=1\). Proper equivalence means change of variables by a matrix in \(\operatorname{SL}_2(\mathbf Z)\). Such a change preserves the discriminant, primitivity, and the represented integers: its inverse is also integral. More generally a change with determinant \(t\) multiplies the discriminant by \(t^2\), as follows by taking determinants of the symmetric coefficient matrix.
We restrict to nonsquare field discriminants \(D\). Thus \(K=\mathbf Q(\sqrt D)\) is quadratic, and \(D\) is fundamental: either \(D\) is squarefree and \(D\equiv1\pmod4\), or \(D=4d\), where \(d\) is squarefree and \(d\equiv2,3\pmod4\). The full ring of integers, proved in Algebraic integers and rings of integers, is \[ O_K=\mathbf Z\left[\frac{D+\sqrt D}{2}\right]. \tag{2} \] Conjugation is denoted by a bar. Take \(\sqrt D\) with positive imaginary part for \(D<0\), and positive in the first real embedding for \(D>0\).
Let \(C(D)\) be the proper classes of primitive forms of discriminant \(D\); for \(D<0\), include only positive definite forms. Completing the square gives \[ 4af(x,y)=(2ax+by)^2-Dy^2. \tag{3} \] Consequently \(D<0,a>0\) gives positive definiteness; \(D>0\) gives an indefinite form. In the latter case the open set where \(f>0\) contains a rational vector. Clearing denominators and dividing the coordinate gcd gives a primitive integral vector of positive value. A primitive vector extends to an \(\operatorname{SL}_2(\mathbf Z)\) basis by Bézout's identity. Thus every class has a representative with \(a>0\).
For a nonzero fractional ideal \(I\), its norm \(N I\) is positive; the ideal norm and its scaling law \[ N(\gamma I)=|N_{K/\mathbf Q}\gamma|\,N I \tag{4} \] are those of Norms, class groups, and modules over Dedekind domains. Orient a basis \((\alpha,\beta)\) of \(I\) by requiring \[ \alpha\bar\beta-\bar\alpha\beta=-\sqrt D\,N I. \tag{5} \] Such a basis exists: the absolute value of its embedding determinant is \(\sqrt{|D|}N I\), by the ideal covolume calculation in Lattices, Minkowski's theorem and the Minkowski embedding, Theorem 7.1 and Proposition 7.2. Interchanging the basis vectors changes the sign. For \(D<0\), (5) says \(\operatorname{Im}(\bar\alpha\beta)>0\).
Define the narrow class group \(\operatorname{Cl}_K^+\) by quotienting fractional ideals by principal ideals generated by elements positive at both real embeddings. For an imaginary field, there is no real positivity condition, so \(\operatorname{Cl}_K^+=\operatorname{Cl}_K\). In a real quadratic field an element of positive norm has either two positive or two negative embeddings. It or its negative is totally positive, and they generate the same ideal.
The ideal–form correspondence
Theorem 10.1. For a quadratic field of discriminant \(D\), an oriented basis of \(I\) gives \[ f_I(x,y)=\frac{N_{K/\mathbf Q}(\alpha x-\beta y)}{N I}. \tag{6} \] This induces a bijection \(\operatorname{Cl}_K^+\longrightarrow C(D)\).
Proof. First take \(I\) integral. For \(u\in I\setminus\{0\}\), the ideal \((u)I^{-1}\) is integral. Its norm is \(|N u|/N I\), an integer. Hence the outer coefficients in (6) are integral. The mixed coefficient is integral too, by subtracting \(N\alpha/N I+N\beta/N I\) from \(N(\alpha+\beta)/N I\). Multiplying a fractional ideal by a positive rational integer reduces to this case without changing its form.
The discriminant of (6) is \[ \frac{(\alpha\bar\beta-\bar\alpha\beta)^2}{(N I)^2}=D. \] The coefficients are primitive. An odd prime dividing all three would have its square divide \(D\), impossible for a fundamental discriminant. If all three were even, \(D/4\) would itself be congruent to \(0\) or \(1\pmod4\). This is impossible when \(D=4d\) with \(d\equiv2,3\pmod4\); if \(D\) is odd, it is already impossible that \(4\mid D\). For \(D<0\), the norm is positive on nonzero elements, so the form is positive definite.
Two oriented bases differ by a determinant-one integral matrix. Because (6) uses \(\alpha x-\beta y\), their variable-change matrices are obtained by conjugating that basis-change matrix by \(\operatorname{diag}(1,-1)\); their determinants are still one. They therefore give the same proper class. Multiplication of both basis elements by \(\gamma\) preserves (5) exactly when \(N\gamma>0\), and then (4) preserves (6). In an imaginary quadratic field every nonzero \(\gamma\) has positive norm. In a real quadratic field the preceding observation identifies these scalings with narrow principal equivalence. The map is well defined.
For surjectivity choose \(f=(a,b,c)\) with \(a>0\) and put \[ \beta=\frac{-b+\sqrt D}{2},\qquad I_f=\mathbf Za+\mathbf Z\beta. \tag{7} \] Since \(b\equiv D\pmod2\), the element \(\beta\) differs from the generator in (2) by an integer. Moreover \[ \beta^2=-b\beta-ac. \tag{8} \] Multiplication by \(\beta\) preserves \(I_f\), so it is an \(O_K\)-ideal. Relative to the basis \((1,\beta)\) of \(O_K\), its basis \((a,\beta)\) has determinant \(a\); hence \(N I_f=a\). This basis satisfies (5). Since \(\operatorname{Tr}\beta=-b\) and \(N\beta=ac\), its form is exactly \(ax^2+bxy+cy^2\).
For injectivity suppose two oriented ideal bases give properly equivalent forms. Change one basis so that the forms are equal, say \((a,b,c)\). Their first elements are nonzero, and \(a=N\alpha/N I\ne0\). Setting \(z=\beta/\alpha\), coefficient comparison and (5) give \[ \operatorname{Tr}z=-b/a,\qquad z-\bar z=\sqrt D/a,\qquad z=\frac{-b+\sqrt D}{2a}. \tag{9} \] The corresponding ratio for the other ideal \(J\) is identical. Thus \(J=\gamma I\), with \(\gamma=\alpha'/\alpha\), and \[ N\gamma=\frac{N J}{N I}>0. \] This is narrow principal equivalence. Surjectivity and injectivity prove the theorem. \(\square\)
The sign and orientation in (5) belong together. Conjugating an ideal reverses its basis orientation. Replacing one basis vector by its negative restores the orientation and changes \(b\) to \(-b\).
Composition and a calculation rule
Transport ideal multiplication through Theorem 10.1: \[ [f]\ast[g]=[f_{I_fI_g}]. \tag{10} \] If \(I_f,J_f\) represent the same narrow class, replacing one by a scalar of positive norm replaces the product by such a scalar. Thus (10) is well defined. Associativity and commutativity follow from ideal multiplication. The identity is the class of \(O_K\), represented by \[ f_0= \begin{cases} x^2-\dfrac D4y^2,&D\equiv0\pmod4,\\[4pt] x^2+xy+\dfrac{1-D}{4}y^2,&D\equiv1\pmod4. \end{cases} \tag{11} \] Indeed \(I_{f_0}=O_K\) in (7). The inverse of \([f]\) is represented by its opposite \((a,-b,c)\): conjugation corresponds to this opposite, and \(I\bar I=(N I)\) has a positive rational generator. To check this identity directly for (7), the product \(I_f\bar I_f\) is generated by \(a^2,a\beta,a\bar\beta,ac\). All belong to \(aO_K\); the product also contains \(ab=-a(\beta+\bar\beta)\), so \(\gcd(a,b,c)=1\) puts \(a\) in it. The product is therefore \((a)\). For any ideal, change its oriented basis to make \(a>0\); (9) identifies it with a scalar multiple of \(I_f\), and (4) transports the identity to that ideal. Consequently (10) makes \(C(D)\) a group isomorphic to \(\operatorname{Cl}_K^+\).
Here is an explicit rule requiring only congruences. Suppose representatives \((a,b,c)\), \((a',b',c')\) have \(a,a'>0\) and \(\gcd(a,a')=1\). Choose \(B\) satisfying \[ B\equiv b\pmod{2a},\qquad B\equiv b'\pmod{2a'}. \tag{12} \] Their parities agree, so the Chinese remainder theorem gives a solution unique modulo \(2aa'\). Then \[ [a,b,c]\ast[a',b',c'] =\left[aa',B,\frac{B^2-D}{4aa'}\right]. \tag{13} \] The last coefficient is integral: \(B^2-D\) is divisible by both \(4a\) and \(4a'\), whose least common multiple is \(4aa'\).
To prove the rule, put \(\delta=(-B+\sqrt D)/2\). The two ideals in (7) are \((a,\delta)\) and \((a',\delta)\). Their product is generated by \[ aa',\quad a\delta,\quad a'\delta,\quad\delta^2. \] Bézout gives \(\delta\) from the middle two generators, while \(\delta^2=-B\delta-aa'C\), where \(C=(B^2-D)/(4aa')\). The product is exactly \((aa',\delta)\), which gives (13).
Coprime leading coefficients can always be arranged. For a primitive form and any positive integer \(M\), each prime \(q\mid M\) has at least one of \(f(1,0),f(0,1),f(1,1)\) nonzero modulo \(q\); otherwise \(q\) divides all coefficients. Choose such pairs and combine them modulo the product \(L\) of these primes. Choose a nonzero integer \(y\) in the resulting residue class. For each prime dividing \(y\) but not \(L\), impose \(x\equiv1\) modulo that prime; simultaneously retain the chosen \(x\) modulo \(L\). The Chinese remainder theorem permits this. Primes dividing both \(y\) and \(L\) already do not divide \(x\). Thus \(\gcd(x,y)=1\), and \(f(x,y)\) is coprime to \(M\). Begin with \(a>0\) and choose \(|x|\) sufficiently large in this progression to make \(f(x,y)>0\). Extend \((x,y)\) to a determinant-one basis. The transformed leading coefficient is the desired value. Apply this to the second form with \(M=a\), and then use (13). Different choices give the same class by its proved ideal interpretation.
Reduction of positive definite forms
A primitive positive definite form \((a,b,c)\) is reduced when \[ |b|\leq a\leq c,\qquad b\geq0\ \text{if }|b|=a\text{ or }a=c. \tag{14} \] The last convention removes duplicate representatives on the boundary.
Theorem 10.2. Every primitive positive definite integral form is properly equivalent to exactly one reduced form.
Proof of existence. Choose the smallest positive value \(a_0\) of the form on primitive integral vectors. Such values are positive integers, and the set is nonempty. Extend a minimizing vector to a determinant-one basis, making the leading coefficient \(a_0\). The substitution \(x\mapsto x+ky\) changes \(b\) to \(b+2a_0k\), so arrange \[ -a_0<b\leq a_0. \] The new \(c\) is the value at a primitive vector and therefore \(c\geq a_0\). If \(a_0=c\) and \(b<0\), the determinant-one substitution \((x,y)\mapsto(-y,x)\) interchanges \(a_0,c\) and changes \(b\) to \(-b\). The result satisfies all of (14).
Proof of uniqueness. A reduced form satisfies, for every integral pair, \[ f(x,y)\geq a\bigl(x^2-|xy|+y^2\bigr). \tag{15} \] For a nonzero pair the expression in parentheses is at least one: it equals \((|x|-|y|)^2+|xy|\). It equals one only at \((\pm1,0),(0,\pm1)\), and at the pairs with \(|x|=|y|=1\). It follows that the minimum nonzero value of \(f\) is \(a\). More precisely its minimizing vectors are:
- if \(c>a\), only \(\pm(1,0)\);
- if \(c=a\) and \(|b|<a\), only \(\pm(1,0),\pm(0,1)\);
- if \(c=a=|b|\), these vectors and the suitable diagonal pair. Primitivity and (14) force this last form to be \((1,1,1)\).
Suppose \(g=f(rx+sy,tx+uy)\) is also reduced, with \(ru-st=1\). Equivalence preserves minimum values, so the leading coefficient of \(g\) is \(a\), and its first column \((r,t)\) is a minimizing vector of \(f\).
When \(c>a\), this column is \(\pm(1,0)\). The determinant condition gives the middle coefficient of \(g\) congruent to \(b\pmod{2a}\). Every reduced middle coefficient lies in \((-a,a]\): the value \(-a\) is excluded by (14). There is a unique representative of any residue class in that interval, so the middle coefficient is \(b\), and the discriminant then forces the last coefficient to be \(c\).
When \(c=a\) and \(|b|<a\), the first column may also be \(\pm(0,1)\). In that case the middle coefficient is congruent to \(-b\pmod{2a}\); its sole representative in \((-a,a]\) is \(-b\). The last coefficient, determined by \(D\), is again \(a\). Since \(a=c\) requires a nonnegative middle coefficient, this is possible only when \(b=0\), and then the form is unchanged. The columns \(\pm(1,0)\) work as before.
Finally, the exceptional form has \(a=1,D=-3\). Any reduced form with these data must have \(b=1,c=1\). Thus it too has a unique reduced representative. These cases exhaust the minimizing vectors and prove uniqueness, including both boundaries. \(\square\)
Since \[ |D|=4ac-b^2\geq3a^2, \] enumeration is finite: \[ 1\leq a\leq\sqrt{|D|/3},\quad -a\leq b\leq a,\quad c=\frac{b^2-D}{4a}. \tag{16} \] Keep only integral \(c\), primitive triples, and the inequalities and tie conventions (14). For a fundamental negative discriminant, Theorem 10.1 identifies the number of surviving triples with \(h_K\).
Examples and the two class groups
For \(D=-20\), (16) has \(a\leq2\); the complete list is \[ (1,0,5),\qquad(2,2,3). \] Thus \(h_K=2\), and \(C(-20)\) is cyclic of order two. The second form corresponds to \((2,-1+\sqrt{-5})\), the same ideal as \((2,1+\sqrt{-5})\).
For \(D=-56\), the bound is \(a\leq4\); the complete list is \[ (1,0,14),\quad(2,0,7),\quad(3,2,5),\quad(3,-2,5). \tag{17} \] The last two are distinct proper classes by Theorem 10.2. They become equivalent under \((x,y)\mapsto(x,-y)\), whose determinant is \(-1\). This is why improper equivalence loses information.
The group in (17) is cyclic of order four. To see this without guessing from its size, let \[ P=(2,\sqrt{-14}),\qquad Q=(3,\sqrt{-14}-1). \] The complete ideal calculation in Finiteness of the class number, in the \(\mathbf Q(\sqrt{-14})\) example, gives \(P^2=(2)\), \((2+\sqrt{-14})=PQ^2\), and nonprincipality of \(P\). Hence \([Q]^2=[P]\ne1\) and \([Q]\) has order four. Under (7), \(Q\) corresponds to \((3,2,5)\), so the two middle-sign forms are inverse generators.
Proposition 10.3. The natural map \(\operatorname{Cl}_K^+\to\operatorname{Cl}_K\) is surjective. For real quadratic \(K\), its kernel has order one if a fundamental unit has norm \(-1\), and order two if it has norm \(+1\). For imaginary \(K\), it is an isomorphism.
Proof. The ordinary principal subgroup contains the narrow one, giving surjectivity. For real \(K\), the sign map \[ K^\times\longrightarrow\{\pm1\}^2 \] is onto: \(1,-1,\sqrt D,-\sqrt D\) realize all four patterns. Its kernel is the totally positive elements. Two generators give the same principal ideal exactly when they differ by a unit. Thus the kernel of the class-group map is \(\{\pm1\}^2\) modulo the signs of units.
By Dirichlet's unit theorem, \(O_K^\times=\{\pm\epsilon^j\mid j\in\mathbf Z\}\), where \(\epsilon>1\) is fundamental. The unit \(-1\) gives the diagonal negative pattern. If \(N\epsilon=-1\), its mixed pattern generates the remaining signs, so the quotient is trivial. If \(N\epsilon=1\), every unit has equal signs at the two embeddings, and the quotient has order two. The imaginary case follows from the definition. \(\square\)
For \(K=\mathbf Q(\sqrt3)\), \(D=12\). The class-number calculation in lesson 8 gives \(h_K=1\), and lesson 9 proves that \(\epsilon=2+\sqrt3\) is fundamental with norm \(+1\). Therefore \(h_K^+=2\). The forms \[ x^2-3y^2,\qquad 3x^2-y^2 \tag{18} \] give the two classes. The second belongs to the ideal \((\sqrt3)\): its oriented basis \((3,\sqrt3)\) has norm \(3\) and gives that form. This principal ideal is not narrow principal, because a generator of positive norm would differ from \(\sqrt3\), of norm \(-3\), by a unit of norm \(-1\), and no such unit exists.
Primes represented by forms
For an odd prime \(p\), \((D/p)\) denotes the Legendre symbol. At \(p=2\) use the Kronecker convention \[ \left(\frac D2\right)= \begin{cases} 0,&2\mid D,\\ 1,&D\equiv1\pmod8,\\ -1,&D\equiv5\pmod8. \end{cases} \tag{19} \] An odd field discriminant is congruent to \(1\) or \(5\pmod8\).
Proposition 10.4. If \(p\nmid D\) is a rational prime, then \(p\) is represented by a primitive form of discriminant \(D\) if and only if \((D/p)=1\). For \(D<0\), the representing form can be chosen positive definite.
Proof. If \(f(x,y)=p\), then \(\gcd(x,y)=1\), since its square divides \(p\). Extending this vector to a determinant-one basis gives a form \((p,b,c)\), so \[ D=b^2-4pc. \tag{20} \] For odd \(p\nmid D\), this says that \(D\) is a nonzero square modulo \(p\). For \(p=2\), the oddness of \(D\) forces \(b\) odd, and (20) gives \(D\equiv1\pmod8\).
Conversely, for odd \(p\) choose a square root \(b\) of \(D\) modulo \(p\) and choose its parity to agree with \(D\). Then \(c=(b^2-D)/(4p)\) is integral. The form \((p,b,c)\) has discriminant \(D\), represents \(p\), and is primitive: a common coefficient divisor would be \(p\), contradicting \(p\nmid D\). If \(D<0\), its positive leading coefficient makes it positive definite. For \(p=2\) and \(D\equiv1\pmod8\), use \((2,1,(1-D)/8)\); its odd middle coefficient proves primitivity. \(\square\)
When \(D<0\) and \(h_K=1\), every such form is properly equivalent to (11). Thus the principal form represents every split unramified prime, and only those primes. The same statement holds for \(D>0\) if the narrow class number is one.
Corollary 10.5. For a rational prime \(p\), with \(x,y\) allowed to be any integers, \[ \begin{aligned} p=x^2+y^2 &\iff p=2\text{ or }p\equiv1\pmod4,\\ p=x^2+2y^2 &\iff p=2\text{ or }p\equiv1,3\pmod8,\\ p=x^2+xy+y^2 &\iff p=3\text{ or }p\equiv1\pmod3,\\ p=x^2+xy+2y^2 &\iff p=7\text{ or }p\equiv1,2,4\pmod7. \end{aligned} \tag{21} \]
Proof. Applying (16) to \(-4,-8,-3,-7\) leaves respectively just \((1,0,1),(1,0,2),(1,1,1),(1,1,2)\). For odd unramified \(p\), Proposition 10.4 reduces the four questions to \((-1/p),(-2/p),(-3/p),(-7/p)=1\). We use quadratic reciprocity and its supplementary laws, proved in Cyclotomic fields, Theorem 12.5: \[ \left(\frac{-1}p\right)=(-1)^{(p-1)/2},\quad \left(\frac2p\right)=(-1)^{(p^2-1)/8},\quad \left(\frac qp\right)\left(\frac pq\right)= (-1)^{(p-1)(q-1)/4} \tag{22} \] for distinct odd primes \(p,q\). Multiplicativity then gives \((-3/p)=(p/3)\) and \((-7/p)=(p/7)\). The nonzero squares modulo \(7\) are \(1,2,4\), producing (21).
The ramified primes are represented directly: \[ 2=1^2+1^2=0^2+2\cdot1^2,\quad 3=1^2+1\cdot1+1^2,\quad 7=(-1)^2+(-1)\cdot2+2\cdot2^2. \] For \(p=2\), the third form never represents \(2\): by (3), \(4f=(2x+y)^2+3y^2=8\) would force \(|y|\leq1\), and then neither \(8\) nor \(5\) is a square. The fourth form does represent \(2\), at \((0,1)\), agreeing with its congruence rule. These checks include every excluded small prime. \(\square\)
Genus characters and the principal genus
Put \(m=|D|\) and \(U_m=(\mathbf Z/m\mathbf Z)^\times\). A genus groups forms that represent the same unit residues modulo \(m\); for indefinite forms we may require the represented integers to be positive. Proper equivalence preserves this set. For ideals prime to \(D\), the equivalent definition compares their positive norms modulo \(m\), allowing multiplication by norms of integral field elements whose norms are prime to \(D\). We prove the equivalence of these definitions below.
We use one explicit forward programme prerequisite: the narrow Hilbert class field theorem in Hilbert and ring class fields, and quadratic prime forms, Theorem 19.1. It supplies a finite abelian extension \(H^+/K\), maximal among extensions unramified at every finite prime, whose ideal Artin map identifies \(\operatorname{Gal}(H^+/K)\) with \(\operatorname{Cl}_K^+\). At real places complexification is permitted. Its proof uses the ray class field existence and conductor theorems, Theorem 18.4 and Proposition 18.3 of that course. The genus theorem itself is proved here. The other forward input is the explicit quadratic Gauss-sum construction in Cyclotomic fields, Proposition 12.6; its proof uses no genus theorem.
Factor the fundamental discriminant into prime discriminants \[ D=d_1\cdots d_t,\qquad p^*=(-1)^{(p-1)/2}p\quad(p\text{ odd}), \] with one dyadic factor \(-4,8\), or \(-8\) if \(2\mid D\). Thus \(t\) counts rational primes dividing \(D\), and the conductors \(|d_i|\) are pairwise coprime. This factorization and the following characters are proved in Cyclotomic fields, equations (24)–(25): for \(d_i=p^*\), put \(\chi_i(n)=(n/p)\); the even factors have \[ \chi_{-4}(n)=(-1)^{(n-1)/2},\qquad \chi_8(n)=(-1)^{(n^2-1)/8},\qquad \chi_{-8}(n)=\chi_{-4}(n)\chi_8(n) \] on odd integers. Write \(\chi_D=\prod_i\chi_i\).
Theorem 10.6 (genus and principal genus). For a fundamental discriminant of either sign, genus characters identify \[ C(D)/C(D)^2\simeq \{(e_1,\ldots,e_t)\in\{\pm1\}^t\mid\prod_i e_i=1\}. \qquad \#\{\text{genera}\}=2^{t-1}. \tag{23} \] For an integral ideal \(I\) prime to \(D\), its character vector is \((\chi_i(NI))_i\). The principal genus is exactly \(C(D)^2\), and every genus has the same number of proper classes. For real fields these are narrow classes.
Proof: the unramified multiquadratic field. Set \[ E=\mathbf Q(\sqrt{d_1},\ldots,\sqrt{d_t}). \tag{23a} \] The square classes of the \(d_i\) are independent: an odd prime valuation detects its own factor, and the remaining dyadic class is one of \(-1,2,-2\), all nonsquares. Hence \([E:\mathbf Q]=2^t\). Here is the elementary degree argument. Inductively the products of the chosen square roots form a basis of their multiquadratic field, with distinct sign characters under its sign-changing automorphisms. If the next \(d_i\) were a square there, its square root would be a simultaneous eigenvector, since every automorphism sends it to itself or its negative. Each such eigenspace is spanned by one basis product. Its square would express \(d_i\) as a rational square times a product of previous factors, contradicting independence. This proves the induction. Their full product has square \(D\), so \(K\subset E\) and \([E:K]=2^{t-1}\).
At a rational prime \(p\mid D\), precisely one quadratic factor in (23a) ramifies, by the discriminant ramification criterion. An inertia element in \(E/\mathbf Q\) restricts trivially to all the other factors. Restriction to all factors is injective, so this inertia group has order at most two; restriction onto the ramified factor makes its order two. Its nontrivial element changes the sign of \(\sqrt D\), so restriction to the inertia in \(K/\mathbf Q\) is injective. The relative inertia in \(E/K\) is therefore trivial. At primes outside \(D\), all the restrictions are trivial, with the same conclusion. This argument includes \(p=2\): an odd quadratic discriminant is unramified there, and the unique factor \(-4,8\), or \(-8\) supplies the ramified quadratic extension. These inertia restriction and intersection statements are proved in Hilbert's ramification theory, Theorem 6.2 and the proof of Proposition 6.3. Thus \(E/K\) is abelian and unramified at all finite primes, so \(E\subset H^+\). No condition at real places was imposed.
Proof: maximality and squares. Put \(A=\operatorname{Cl}_K^+\), and let \(B\subset H^+\) be the fixed field of \(A^2\). Uniqueness of \(H^+\) makes it stable under conjugation over \(\mathbf Q\), and \(A^2\) is characteristic, so \(B/\mathbf Q\) is Galois. Conjugation acts on ideal classes by inversion, since \(I\bar I=(NI)\) has a positive rational generator. The Artin map respects this action: conjugating a prime conjugates its Frobenius, and prime ideals generate the ideal group. Thus the induced action on \(A/A^2\) is trivial.
Choose a finite prime ramified in \(K\), which exists for every nontrivial quadratic discriminant. Since \(B/K\) is unramified there, its absolute inertia has order two and maps isomorphically onto \(\operatorname{Gal}(K/\mathbf Q)\). Its generator is an order-two lift of conjugation. Consequently \[ \operatorname{Gal}(B/\mathbf Q)\simeq(A/A^2)\times\mathbf Z/2, \tag{23b} \] an elementary abelian two-group. The inertia lift is essential: trivial conjugation action alone would allow a cyclic group of order four. An elementary abelian two-extension is the compositum of its quadratic subfields, because the intersection of the kernels of its sign characters is trivial.
We show every such quadratic subfield belongs to \(E\). Each quadratic field of discriminant \(\Delta\) lies in \(\mathbf Q(\zeta_{|\Delta|})\) by Proposition 12.6. Use a common cyclotomic field containing these finitely many fields and \(\mathbf Q(\zeta_m)\). Its Galois group is a product of prime-power unit groups. At a finite prime its inertia is exactly the corresponding unit-group component, by Theorem 12.3. In \(B/\mathbf Q\), inertia has order at most two and restricts injectively to the inertia of \(K/\mathbf Q\). Therefore the character of any quadratic subfield, on that component, is either trivial or equal to the character of \(K\). For \(p\mid D\) that latter component is \(\chi_i\) for its unique prime discriminant; for other primes it is trivial. The Chinese remainder theorem now makes the entire character a product of a subset of the \(\chi_i\). The Gauss-sum construction identifies its field with the square root of the corresponding product of \(d_i\), which lies in \(E\). This proves \(B\subset E\). Conversely \(E/K\) has exponent two and lies in \(H^+\), so it lies in \(B\). Hence \(B=E\), and Artin reciprocity gives \[ A/A^2\simeq\operatorname{Gal}(E/K). \tag{23c} \] This uses only explicit quadratic cyclotomic inclusions, not the general Kronecker–Weber theorem.
For a prime ideal \(P\) of \(K\) above \(p\nmid D\), put \(f=f(P/p)\). The Frobenius of \(P\) in \(E/K\) is the \(f\)-th power of the rational Frobenius, by equation (10) of the ramification lesson. On \(\sqrt{d_i}\) its sign is \(\chi_i(p)^f=\chi_i(NP)\); the sign assertion follows also directly by substituting \(a\mapsto pa\) in the quadratic Gauss sum. Multiplicativity gives the character vector \((\chi_i(NI))_i\) for every ideal prime to \(D\). The signs in \(\operatorname{Gal}(E/K)\) are exactly those whose product is one, since they fix \(\sqrt D\). Every narrow class has an integral representative prime to \(D\): apply the primitive-value construction preceding Theorem 10.2 with \(M=m\), then use (7), whose ideal norm is its coprime positive leading coefficient. Thus (23c) proves that these characters are onto that sign group and their common kernel is \(A^2\).
Proof: norm residues and forms. Let \[ Q_D=\{N\gamma\bmod m\mid\gamma\in O_K,\ \gcd(N\gamma,m)=1\}. \tag{23d} \] It is a subgroup of \(U_m\): it is the image of the norm on \((O_K/mO_K)^\times\). Indeed a residue with unit norm is invertible, with inverse its conjugate divided by its norm. We compute \[ Q_D=\bigcap_i\ker\chi_i\subset U_m. \tag{23e} \] At an odd \(p\mid D\), the norm in the quadratic integral basis reduces to a square modulo \(p\), since \(\sqrt D\) becomes nilpotent and \(2\) is invertible. Every nonzero square occurs as the norm of a rational integer. Its image on units is therefore exactly the kernel of the Legendre character.
At the dyadic component write \(D=4d\). If \(d\) is odd, then \(d\equiv3\pmod4\), the factor is \(-4\), and \(O_K=\mathbf Z[\sqrt d]\). An odd norm \(a^2-db^2\) is always \(1\pmod4\), and this value occurs. If \(D=8u\) with \(u\) odd, an odd norm \(a^2-2ub^2\) requires \(a\) odd. Modulo eight its possible values are precisely \(1\) and \(1-2u\), realized by \((a,b)=(1,0),(1,1)\). For \(u\equiv1\pmod4\) these are \(1,7\), the kernel of \(\chi_8\); for \(u\equiv3\pmod4\) they are \(1,3\), the kernel of \(\chi_{-8}\). These are exactly the factors specified by (25) of the cyclotomic lesson. Finally, choose the two integral-basis coefficients separately by the Chinese remainder theorem. The local norm images can be prescribed independently, proving (23e), including every case at two. It also proves that \(U_m/Q_D\) is identified by the \(t\) independent character signs with \(\{\pm1\}^t\).
Let \(I\) be integral and prime to \(D\). Then \(I+mO_K=O_K\), so reduction maps \(I\) onto \(O_K/mO_K\). As the coefficients of its basis range over integers, (6) therefore represents precisely the unit residues \[ R(I)=(NI)^{-1}Q_D\subset U_m. \tag{23f} \] For a real field, every such residue has a positive representative: choose an oriented basis with \(N\alpha>0\), and replace \(x\) by \(x+km\) in (6). For large \(|k|\) the value is positive and retains its residue. The same observation for the principal form shows that (23d) can be defined using positive norms. Thus (23f) respects the real narrow-class convention.
Two form classes have equal represented unit residues exactly when their norm cosets modulo \(Q_D\) agree; by (23e), this means equality of every \(\chi_i(NI)\). The ideal-genus definition gives the same condition. By (23c) its kernel is precisely \(A^2\), which Theorem 10.1 identifies with \(C(D)^2\). Its image is the product-one sign group, of order \(2^{t-1}\). Fibers are cosets of this kernel and hence have equal size. The principal ideal has norm one, so its genus is the kernel. This completes both definitions, the count, and the principal-genus assertion. \(\square\)
In particular a genus can contain several classes. For \(D=-56\), \(t=2\) and \(C(D)\simeq\mathbf Z/4\mathbf Z\), so there are two genera, each containing two classes. For \(D=-20\), \(C(D)\) has order two, so each genus has one class. For \(D=12=(-4)(-3)\), the two narrow classes in (18) have unit residue sets \(\{1\}\) and \(\{11\}\) modulo twelve. The ordinary class group is trivial; its quotient cannot replace the narrow quotient in (23).
Exercises
- List all reduced forms of discriminants \(-23\) and \(-47\), and compute their class numbers.
- Prove Theorem 10.2, paying particular attention to \(|b|=a\) and \(a=c\).
- Determine exactly which rational primes are \(x^2+5y^2\), using the two forms of discriminant \(-20\) and their genera.
- Prove that composition transported through Theorem 10.1 makes \(C(D)\) a group isomorphic to \(\operatorname{Cl}_K^+\), and derive the coprime-coefficient formula.
Solutions
1. For \(-23\), (16) gives \(a\leq2\). Odd discriminants require \(b\) odd. At \(a=1\), only \(b=1,c=6\) survives the boundary convention; at \(a=2\), \(b=\pm1,c=3\) survive. Thus \[ (1,1,6),\quad(2,1,3),\quad(2,-1,3), \qquad h(-23)=3. \] For \(-47\), \(a\leq3\). At \(a=1\) the survivor is \((1,1,12)\). At \(a=2\), \(b=\pm1\) gives \(c=6\). At \(a=3\), \(b=\pm1\) gives \(c=4\); \(b=\pm3\) gives nonintegral \(c\). Hence \[ (1,1,12),\quad(2,1,6),\quad(2,-1,6),\quad (3,1,4),\quad(3,-1,4), \qquad h(-47)=5. \] Theorems 10.1–10.2 prove that these finite lists count ideal classes, with no identifications between the displayed sign pairs.
2. The existence argument uses the smallest value on primitive vectors as its leading coefficient; translating the second basis vector puts the middle coefficient in \((-a,a]\), and minimality forces \(c\geq a\). The determinant-one interchange of the two coordinate directions fixes a negative \(b\) when \(a=c\).
For uniqueness, (15) makes \(a\) the minimum. Equality permits only the two coordinate directions unless \(a=c=|b|\); the latter primitive case is \((1,1,1)\). With \(c>a\), the first column of an equivalence must be \(\pm(1,0)\); its new middle coefficient is \(b\) modulo \(2a\), and the interval \((-a,a]\) selects it uniquely. With \(c=a,|b|<a\), using \(\pm(0,1)\) instead changes that residue to \(-b\), but the new last coefficient is still \(a\). The tie rule then excludes this option unless \(b=0\), when it gives the same form. The hexagonal exception is uniquely determined by \(a=1,D=-3\). This proves the result in every boundary case; in particular \(b=-a\) is never an extra representative.
3. The correct rule for all rational primes is \[ p=x^2+5y^2 \iff p=5\text{ or }p\equiv1,9\pmod{20}. \tag{24} \] The prime \(5\) occurs at \((0,1)\); \(2\) does not, since \(|y|\geq1\) gives a value at least \(5\), and \(y=0\) gives a square.
For an odd prime \(p\ne5\), (22) gives \[ \left(\frac{-20}p\right) =\left(\frac{-1}p\right)\left(\frac p5\right)=1 \iff p\equiv1,3,7,9\pmod{20}. \] Proposition 10.4 and reduction imply that such a prime is represented by one of \[ F=x^2+5y^2,\qquad G=2x^2+2xy+3y^2. \] If a value of \(F\) is prime to \(20\), then \(x\) is odd and \(5\nmid x\). Modulo \(20\), an odd square prime to \(5\) is \(1\) or \(9\). The value is odd only when \(y\) is even; then \(5y^2\equiv0\pmod{20}\). Thus the unit residues represented by \(F\) are exactly \(1,9\), attained at \((1,0),(3,0)\).
For \(G\) to have an odd value, \(y\) must be odd. Modulo \(4\), it is then always \(3\): \(2x(x+y)\) is divisible by \(4\), and \(3y^2\equiv3\pmod4\). Also \[ 2G=(2x+y)^2+5y^2. \] If \(5\nmid G\), this says that \(2G\) is a nonzero square modulo \(5\), so \(G\equiv2,3\pmod5\). Combining with \(G\equiv3\pmod4\) gives precisely \(G\equiv3,7\pmod{20}\), both attained at \((0,1),(1,1)\). These disjoint residue sets are the two genera. Every split prime in residues \(1,9\) must therefore be represented by \(F\), and none in residues \(3,7\) can be. This proves (24).
4. Let \(\Phi:\operatorname{Cl}_K^+\to C(D)\) be Theorem 10.1's bijection and define \(u\ast v=\Phi(\Phi^{-1}(u)\Phi^{-1}(v))\). Changing an ideal representative by a totally positive scalar changes a product by that same scalar, proving independence of choices. Then \[ (u\ast v)\ast w=\Phi(IJK)=u\ast(v\ast w),\qquad u\ast v=v\ast u. \] The class \(\Phi(O_K)\) is the identity (11); \(\Phi(I^{-1})\) is the inverse. Since \(I\bar I=(N I)\), that inverse is the opposite form. These verifications prove every group axiom and that \(\Phi\) is a group isomorphism.
The primitive-value argument preceding reduction supplies representatives with coprime positive leading coefficients. Solve (12), put \(\delta=(-B+\sqrt D)/2\), and multiply the ideals \((a,\delta),(a',\delta)\). Bézout and the equation for \(\delta^2\) show that their product is \((aa',\delta)\), so its norm form is exactly (13). Thus the computational rule agrees with the defined group operation, including its independence of the choices of coefficients and \(B\).
What this lesson does not prove
- The quadratic reciprocity law and its supplements (22) use the complete proof in Cyclotomic fields, Theorem 12.5. They turn the proved representation criterion into explicit congruences.
- Theorem 10.6 proves the full genus theorem for fundamental discriminants of either sign. It imports the narrow Hilbert class field and its ideal Artin isomorphism from the class field course, Theorem 19.1, with ray existence and the conductor criterion in Theorem 18.4 and Proposition 18.3. It also uses the proved inertia and Frobenius statements in lesson 6 and the cyclotomic quadratic inclusions in lesson 12. These forward programme dependencies must be read before that proof. The Hilbert class field assertion does not use this lesson's genus theorem: the class field lesson's quadratic arithmetic inputs are the earlier Theorems 10.1–10.2 and Proposition 10.3.
- Integral bases, ideal norms and multiplication, ideal embedding covolumes, finiteness of class groups, and the unit theorem are the previously proved prerequisites cited above. The exact \(\mathbf Q(\sqrt{-14})\) ideal relations and \(\mathbf Q(\sqrt3)\) class-number and unit computations are imported from lessons 8–9 at the indicated examples.
Nonfundamental discriminants correspond to orders rather than full rings of integers. In particular \(x^2+3y^2,x^2+4y^2,x^2+7y^2\), of discriminants \(-12,-16,-28\), belong to Orders in number fields and their Picard groups. Ring class fields and the general classification of primes \(x^2+ny^2\) belong to class field theory.
References
- J. S. Milne, Algebraic Number Theory, version 3.08, 2020, Chapter 4, “Binary quadratic forms,” Theorem 4.29, pp. 81–82, for the correspondence statement. Theorem 10.1 supplies its proof here.
- Erich Hecke, Vorlesungen über die Theorie der algebraischen Zahlen, 1923, Chapter VII: §45, pp. 178–181, for narrow equivalence; §48, Sätze 142–145, pp. 193–197, for norm-residue genera and the principal genus; §53, Satz 154, pp. 210–217, for ideals and forms. Theorem 10.6 independently expresses the norm-residue bridge and uses the explicit programme class field proof route.
- Hilbert and ring class fields, and quadratic prime forms, Theorem 19.1 and §3, Proposition 19.3, for the narrow class field and the multiquadratic genus-field mechanism. Only Theorem 19.1 is imported into the proof above.