On a certain basis of an order of a quadratic number field

Let $K$ be an algebraic number field of degree $n$. An order of $K$ is a subring $R$ of $K$ such that $R$ is a free $\mathbb{Z}$-module of rank $n$. Let $\alpha_1, \cdots, \alpha_n$ be a basis of $R$ as a $\mathbb{Z}$-module. Let $D =$ det$(Tr_{K/\mathbb{Q}}(\alpha_i\alpha_j))$. It is easy to see that $D$ is independent of a choice of a basis of $R$. We call $D$ the discriminant of $R$.

My question Is the following proposition correct? If yes, how do you prove it?

Proposition Let $K$ be a quadratic number field. Let $R$ be an order of $K$, $D$ its discriminant. Then $1, (D + \sqrt D)/2$ is a basis of $R$ as a $\mathbb{Z}$-module.

Remark I am not 100% sure of the correctness of the proposition, though I think it is likely to be true(see my method below). I would like to know if the proposition is correct. I also would like to know other proofs based on different ideas if the proposition is correct. I welcome you to provide as many different proofs of the result as possible. Please provide full proofs which can be understood by people who have basic knowledge of introductory algebraic number theory.

My method I used the results of my answers to this question and this question.

1 Answer

Let $\mathcal{O}_K$ be the ring of algebraic integers in $K$. By Lemma 4 of my answer to this question, there exists a unique square-free integer $m$ such that $K = \mathbb{Q}(\sqrt m)$.

If $m \equiv 1$ (mod $4$), let $\omega = (1 + \sqrt m)/2$.

If $m \equiv 2, 3$ (mod $4$), let $\omega = \sqrt m$.

By Lemma 6 of my answer to this question, $1, \omega$ is a basis of $\mathcal{O}_K$ as a $\mathbb{Z}$-module. By Lemma 2 of my answer to this question, there exists an integer $f \gt 0$ such that $1, f\omega$ is a basis of $R$ as a $\mathbb{Z}$-module.Let $d$ be the discriminant of $K$. Let $\omega'$ be the conjugate of $\omega$ over $\mathbb{Q}$. Then $D = (f\omega - f\omega')^2 = f^2(\omega - \omega')^2 = f^2 d$.

Case 1 $m \equiv 1$ (mod $4$)

$\omega = (1 + \sqrt m)/2$ and $d = m$. Since $D = f^2 d$, $(D + \sqrt D)/2 = (D + f\sqrt m)/2 = (D - f)/2 + f(1 + \sqrt m)/2 = (D - f)/2 + f\omega$.

Since $m \equiv 1$ (mod $4$), $D = f^2 m \equiv f^2 \equiv f$ (mod $2$). Hence $(D - f)/2$ is an integer. Hence $R = \mathbb{Z} + \mathbb{Z}f\omega = \mathbb{Z} + \mathbb{Z}(D + \sqrt D)/2$.

Case 2 $m \equiv 2, 3$ (mod $4$)

$\omega = \sqrt m$ and $d = 4m$. Since $D = f^2 d = 4f^2 m$, $(D + \sqrt D)/2 = (4f^2 m + 2f\sqrt m)/2 = 2f^2 m + f\sqrt m = 2f^2 m + f\omega$. Hence $R = \mathbb{Z} + \mathbb{Z}f\omega = \mathbb{Z} + \mathbb{Z}(D + \sqrt D)/2$.