On the stabilizer in $\mathrm{GL}(2,\mathbb{Z})$ of a real quadratic irrationality

$$\DeclareMathOperator\GL{GL}$$Let $$\theta$$ be a real quadratic irrationality with discriminant $$\Delta$$; let $$\mathcal{O}_\Delta$$ denote the resulting quadratic order of discriminant $$\Delta$$ in $$\mathbb{Q}[\theta]$$; let $$\GL(2,\mathbb{Z})_\theta$$ denote the stabilizer subgroup of $$\theta$$ with respect to the action of $$\GL(2,\mathbb{Z})$$ on $$\mathbb{R} \setminus \mathbb{Q}$$ by fractional linear transformations. It turns out (see, e.g., F. Halter-Koch, Quadratic Irrationals, Theorem 5.2.10) that the map $$\GL(2,\mathbb{Z})_\theta \to \mathcal{O}_\Delta^\times, \quad \begin{bmatrix}k&l\\m&n\end{bmatrix} \mapsto m\theta + n$$ is an isomorphism with explicit inverse given by $$\frac{u + v\sqrt{\Delta}}{2} \mapsto \begin{bmatrix} \frac{u+bv}{2} & -cv \\ av & \frac{u-bv}{2}\end{bmatrix},$$ where $$(a,b,c)$$ is the type of $$\theta$$, i.e., the unique $$(a,b,c) \in \mathbb{Z}^3$$ such that $$a \neq 0$$, $$b^2-4ac$$ is not a square, and $$\theta = \frac{b+\sqrt{b^2-4ac}}{2a}$$, so that $$\Delta = b^2-4ac$$. Is there a traditional attribution for this result?

My apologies if this is well-known—I’m afraid I’m not a number theorist, so even googling this has been an uphill climb for me.

[By way of explanation, I’m interested in this result because it’s well-known to be at the heart of the existence and classification of non-trivial noncommutative line bundles over the corresponding noncommutative $$2$$-torus $$C(\mathbb{T}^2_\theta)$$, cf., for instance, Kodaka’s computation of its Picard group.]

• Are you asking about how to write down a generator for the stabilizer subgroup of a indefinite, irreducible integral binary quadratic form? – Stanley Yao Xiao Feb 2 at 17:03
• I gather—and again, I’m writing from a place of embarrassingly profound ignorance—that the result I cite amounts to what you describe. I know the result I need in the form I need for my purposes, but I have no idea whom to attribute it to. Halter-Koch doesn’t cite anyone—he doesn’t even refer to Dirichlet’s unit theorem by name—and the relevant papers in the C*-algebras literature often just give up and re-derive results like this by hand. – Branimir Ćaćić Feb 2 at 17:16

I think Stanley is correct, as the table of contents of the Halter-Koch book is within the limited number of pages in the online preview. There is a recent book by Lehman worth checking,

Meanwhile, I wrote a short note on the correspondence between forms and ideals. The main reference, not stated there, was Cohen, A course in Computational Algebraic Number Theory, especially section 5.2 in pages 225-230.

For an indefinite binary quadratic form, integer coefficients, and discriminant $$\Delta=b^2-4ac$$ positive but not a square, we take any integer solution to the Pell type $$\tau^2 - \Delta \sigma^2 = 4$$ and produce the matrix $$P = \left( \begin{array}{} \frac{\tau - b \sigma}{2} & -c \sigma \\ a \sigma & \frac{\tau + b \sigma}{2} \end{array} \right)$$ which solves $$P^T HP = H$$ where $$H$$ is the Hessian matrix of $$ax^2+ b xy + c y^2.$$

The identity involved is

$$\left( \begin{array}{} \frac{\tau - b \sigma}{2} & a \sigma \\ -c \sigma & \frac{\tau + b \sigma}{2} \end{array} \right) \left( \begin{array}{} 2a &b \\ b & 2c \end{array} \right) \left( \begin{array}{} \frac{\tau - b \sigma}{2} & -c \sigma \\ a \sigma & \frac{\tau + b \sigma}{2} \end{array} \right) = \left( \begin{array}{} 2a &b \\ b & 2c \end{array} \right)$$

Note that the determinant of $$P$$ is positive. Many forms have stabilizers with determinant $$-1$$ as well.

• My apologies about the preview, and thank you—your matrix $P$ exactly recovers the inverse isomorphism. I get the sense that the formulation in my question is a little obscure, but it really is precisely the formulation that’s needed in my context. So is this all just relatively standard (unattributable) folklore around Pell’s equation and the computation of fundamental units for real quadratic fields? – Branimir Ćaćić Feb 2 at 22:25
• @BranimirĆaćić I am guessing it goes back to Gauss together with Lagrange. They came up with the "reduced" idea for indefinite forms, and chains or cycles of neighboring forms. This is done, for example, in Dickson's little 1929 intro book. Also in Buell, Binary Quadratic Forms (about 1989). The automorphism matrix I call $P$ is in many, many, number theory books. Less explicit in Conway, The Sensual Quadratic Form. Oh: The "reduced" condition for indefinite binary $ax^2 + b xy + c y^2$ is equivalent to this pair: $ac <0$ and $b > |a+c|$ with strict inequalities. – Will Jagy Feb 3 at 0:25