# Correspondence between binary quadratic representations and proper ideals of quadratic number fields

$$\DeclareMathOperator\SL{SL}\DeclareMathOperator\Aut{Aut}$$Fix $$d < 0$$, a fundamental quadratic discriminant and $$n$$ a positive integer. Suppose $$Q$$ is a primitive binary quadratic form of discriminant $$d$$. Let us define the following,

1. Representations of $$n$$ by $$Q$$: $$R(Q, n) = \{ (x, y) \in \mathbb{Z}^2 | Q(x, y) = n\}$$
2. $$\Aut(Q)$$ as the subgroup of $$\SL_2(\mathbb{Z})$$ that fixes $$Q$$ under the usual action of $$\SL_2(\mathbb{Z})$$ on binary quadratic forms.
3. $$R(d, n) = \coprod_QR(Q, n)/\Aut(Q)$$ as $$Q$$ runs through a complete set of representatives for each class of properly equivalent forms. Typically, we may select the reduced forms.
4. $$I(d, n) = \{I \textrm{ proper ideals of the ring of integers of } K \textrm{ of norm } n \}$$ where $$K = \mathbb{Q}[\sqrt{(d)}]$$ the quadratic numberfield of discriminant $$d$$.
5. The Epstein zeta function for $$Q$$: $$\zeta(s, Q) = \frac{1}{2} \sum_{(x, y) \neq (0, 0)}{(Q(x, y))}^{-s}$$ for $$\mathfrak{R}(s) > 1$$ for $$(x, y) \in \mathbb{Z}^2$$
6. The Dirichlet zeta function for $$K$$: $$\zeta(s, K) = \sum_{I}{Nm(I)}^{-s}$$ for $$\mathfrak{R}(s) > 1$$ as $$I$$ runs through all the proper integer ideals of $$K$$.

As a fact I know that when $$d < -4$$, $$\sum_{[Q]}\zeta(s, Q) = \zeta(s, K)$$. Also in I read that in general $$|R(d, n)| = \sum_{m|n}{\chi_{d}(m)} = |I(d, n)|$$ where $$\chi_{d}$$ is the Kronecker symbol mod $$|d|$$. All these facts tend to point out that there is a one-one correspondence between $$R(d,n)$$ and $$I(d, n)$$. My question is that whether such a correspondence exists? If so could you explain this correspondence? Does this hold for $$d > 0$$ also?

• Yes, this is indeed the case and is well known. A nice exposition is written up in chapter 7 of "Algebraic Theory of Quadratic Numbers" by Mak Trifkovic. Jan 28, 2021 at 17:42
• @PeterHumphries Sorry if I have missed it. I went through the book, especially chapter 7. But I didn't find what I was looking for. The exposition is about the correspondence between the narrow class group and the equivalence classes of forms - which is well known. Not quite what I was looking for. I am looking for the correspondence between ideals of a fixed norm $n > 0$ and the integral representations $(x, y)$ of $n$ by the forms. Jan 28, 2021 at 19:10
• There is a recent book that follows binary quadratic forms and quadratic number fields all through the book, Lehman bookstore.ams.org/dol-52 There is a more concentrated discussion in Cohen, A Course in Computational Algebraic Number Theory, especially section 5.2 in pages 225-230. In brief, a simple mapping from forms to ideals is one-to-one for positive forms, also indefinite forms when the principal form integrally represents $-1,$ and two-to-one otherwise (so that forms $f$ and $-f$ are distinct). Jan 28, 2021 at 19:57
• By definition, two sets have the same cardinality if and only if there is a one-to-one correspondence between them. So it is not clear what your question is. Jan 28, 2021 at 20:35
• By Siegel's mass formula, $|R(d,n)|$ is a product of local densities given explicitly in Siegel's original paper (Annals of Mathematics, 1935). It equals $\sum_{m\mid n}\chi_d(m)=|I(d,n)|$. About an explicit correspondence: define an ordering on both $R(d,n)$ and $I(d,n)$, and map the $k$-th element of $R(d,n)$ to the $k$-th element of $I(d,n)$. Jan 28, 2021 at 22:36

As explained below, there is a correspondence between non-zero locally principal ideals $$I$$ in the order of disc. $$D$$ and quadratic forms $$Q$$ of disc. $$D$$. The form $$Q$$ is naturally defined on $$I$$ via $$x \in I \mapsto N(x)/N(I).$$ So $$Q(x) = n$$ iff $$N(x) = n N(I)$$ if $$N(x I^{-1}) = n,$$ so representations of $$n$$ by $$Q$$ correspond to ideals in the class of $$I^{-1}$$ having norm $$n$$.

If we sum over all ideal classes, or equivalently over all $$Q$$, (and divide by the number of automorphisms of $$Q$$, which is the group of units in the order, to count ideals rather than elements that generate them) we will get the number of ideals of norm $$n$$.

============

The discovery of this correspondence must go back to the 19th century, maybe to Dirichlet or Dedekind? And Will Jagy's answer gives a very concrete description of it.

One can also give a more conceptual description of it. Indeed, it is fairly easy, and classical, to describe the quadratic form attached to an ideal class in conceptual terms; I explain this at the end of my answer. There is also a conceptual approach to going from quadratic forms to ideal classes, but as far as I know it is more recent, and due to Melanie Wood (a version of it is mentioned in this answer).

Namely, if $$Q(x,y)$$ is a quadratic form over $$\mathbb Z$$ which is primitive, then one can consider $$\mathrm{Proj} \mathbb Z[x,y]/Q(x,y)$$, which turns out to be finite flat of degree $$2$$ over $$\mathbb Z$$, therefore affine, of the form $$\mathrm{Spec} A$$ for some quadratic order $$A$$. And in fact $$A$$ is isomorphic to $$R[(D +\sqrt{D})/2]$$, where $$D$$ is the discriminant of $$Q$$ (so $$A$$ is the quadratic order of discriminant $$D$$). (There is no canonical identification of $$A$$ with this order though; we can compose with the automorphism $$\sqrt{D} \mapsto -\sqrt{D}$$ to get another isomorphism.)

Now $$\mathrm{Proj}$$ comes with a canonical line bundle $$\mathcal O(1)$$, and so this is an element of $$\mathrm{Pic} A$$, which can be thought of as the class group of non-zero locally principal ideals in $$A$$. (The usual class group when $$D$$ is a fundamental discriminant.)

Using the isomorphism $$A \cong R[(D +\sqrt{D})/2],$$ we get an element of the class group of $$R[(D +\sqrt{D})/2],$$ or really a pair $$I,I^{-1}$$ of elements, because applying the automorphism $$\sqrt{D} \mapsto -\sqrt{D}$$ switches $$I$$ and it's inverse.

This gives a map
$$\text{ primitive quadratic forms } Q \text{ of discriminant } D \longrightarrow \text{ pairs } I, I^{-1} \text{ in the class group of } R[(D +\sqrt{D})/2].$$

To see it is a bijection, one can give an explicit inverse (as I mentioned above, this is more classical):

If $$I$$ is a locally principal ideal in $$R[(D +\sqrt{D})/2],$$ then the formula $$x \in I \mapsto N(x)/ N(I) \in \mathbb{Z}$$ defines a quadratic form $$Q$$ on the free rank two $$\mathbb{Z}$$-module $$I$$. (Note that $$I^{-1}$$ will give the same quadratic form, since formation of norms is invariant under conjugation.)

• You misunderstood the question. The OP wants a correspondence betwen representations of $n$ by quadratic forms of discriminant $d$ (modulo equivalences and automorphs) and ideals of norm $n$ in $\mathbb{Q}(\sqrt{d})$. Jan 28, 2021 at 22:48
• Ah yes, thanks for pointing that out. Jan 29, 2021 at 2:11
• @GHfromMO: Added something which hopefully addresses the actual question. Jan 29, 2021 at 2:21
• Good. My answer is similar to yours, but in more concrete (or more classical) terms. Jan 29, 2021 at 2:26

We shall give an explicit correspondence between $$R(d,n)$$ and $$I(d,n)$$ based on the explicit correspondence between representatives $$Q$$ of proper equivalence classes of quadratic forms of discriminant $$d$$ and representatives $$I$$ of the narrow ideal class group of $$\mathbb{Q}(\sqrt{d})$$.

We recall that to each representative quadratic form $$Q$$, there exists a unique representative ideal $$I$$ and an oriented basis $$(\omega_1,\omega_2)$$ of $$I$$ such that $$Q(r,s)=N(r\omega_1+\omega_2 s)/N(I).$$ Oriented basis means that $$I=\mathbb{Z}\omega_1+\mathbb{Z}\omega_2$$ and $$\bar\omega_1\omega_2-\omega_1\bar\omega_2=N(I)\sqrt{d}$$, where $$\sqrt{d}$$ is a fixed square-root of $$d$$ (independent of $$I$$). Now to each integral representation $$Q(x,y)=n$$, we associate the ideal $$(x\omega_1+y\omega_2)/I$$ of norm $$n$$. The range of this map is clearly $$I(d,n)$$. Moreover, two integral representations $$Q(x,y)=n$$ and $$Q'(x',y')=n$$ give rise to the same ideal if and only if $$Q=Q'$$ and $$(x,y)$$ only differs from $$(x',y')$$ by an automorph of $$Q$$. That is, our map induces a bijection between $$R(d,n)$$ and $$I(d,n)$$.

• Thank you for the answer. But I still do have one question. Why is it that the ideal representative $I$ of $Q$ unique? For example, $cI$ and the basis $(c \omega_1, c \omega_2)$ would also be a valid representative for any positive integer $c$. I think for $I$ to be unique we need to add an extra condition. Given $n > 0$, represented by $Q$ there is a unique such ideal $I$ with norm $n$. Now in this case $I$ is unique if such a $I$ exists. Jan 29, 2021 at 15:06
• To show existence, suppose $n = m e^2$ where $m > 0$ is properly represented by $Q$ and $e > 0$. Then for some $\sigma \in SL_2(\mathbb{Z})$, $\sigma Q(x, y) = mx^2 + b'xy + c'y^2 = \frac{(mx + \gamma y)(mx + \bar{\gamma y)}}{m}$ by factorising $\sigma Q$ for some $\gamma$ in the ring of integers. So $\sigma Q(x, y) = frac{(emx + e \gamma y)(emx + e \bar{\gamma y)}}{e^2 m} = frac{(emx + e \gamma y)(emx + e \bar{\gamma y)}}{(e \mathfrak{m})(e \bar{\mathfrak{m}})}$ and we set $I = e \mathfrak{m}$ where $\mathfrak{m} \bar{\mathfrak{m}} = (m)$ as ideals in the ring of integers. Jan 29, 2021 at 15:08
• Now we do a base change to get back $Q$.But this relies on proving that $(m, \gamma)$ is a basis of $\mathfrak{m}$. Now I need to prove it. Jan 29, 2021 at 15:09
• @Melanka: $cI$ and $I$ represent the same ideal class, so both cannot be representatives. I fixed a set of (pairwise inequivalent) representatives $\{Q\}$ for the forms and a set of (pairwise inequivalent) representatives $\{I\}$ for the ideals. I assumed the knowledge of the correspondence $Q\leftrightarrow I$, my proof started from there. You can find the details of this correspondence in the Appendix of gofile.io/d/iqnq4A Jan 29, 2021 at 18:13
• Sorry, I missed the point about fixing a representative $I$ for each class. Thanks for pointing it out. Jan 29, 2021 at 18:34