# Discriminant of a binary quadratic form and Jacobi symbol

Let $ax^2 + bxy + cy^2$ be a binary quadratic form over $\mathbb{Z}$. Let $D = b^2 - 4ac$ be its discriminant. It's easy to see that $D \equiv 0$ (mod $4$) or $D \equiv 1$ (mod $4$). Let $a$ be a positive odd integer. Then the Jacobi symbol $\left(\frac{D}{a}\right)$ is defined.

Is the following proposition true? If yes, how do we prove it?

Proposition Let $D \ne 0$ be a non-zero integer such that $D \equiv 0$ (mod $4$) or $D \equiv 1$ (mod $4$). Let $a$ and $b$ be positive odd integers such that $a \equiv b$ (mod $D$). Then $$\left(\frac{D}{a}\right) = \left(\frac{D}{b}\right)$$

-
What is the point in copying results from textbooks and asking for proofs? – franz lemmermeyer Sep 9 '12 at 9:07
@franzlemmermeyer I don't think I'm copying textbooks. Since the subject is not entirely new, it's hard to be 100% original, though. – Makoto Kato Sep 9 '12 at 9:32
I'm curious to know what textbooks Mr. Lemmermeyer was talking about. Does anybody know them? – Makoto Kato Oct 27 '13 at 2:46

## 1 Answer

It suffices to prove the following lemmas.

Lemma 1 Let $D \gt 0$ be a positive integer such that $D \equiv 1$ (mod $4$). Let $a$ and $b$ be positive odd integers such that $a \equiv b$ (mod $D$). Then $$\left(\frac{D}{a}\right) = \left(\frac{D}{b}\right)$$

Proof: Since $a \equiv b$ (mod $D$), if gcd$(a, D) \ne 1$, then gcd$(b, D) \ne 1$. Hence we can assume that gcd$(a, D) = 1$ and gcd$(b, D) = 1$.

$\left(\frac{D}{a}\right) \left(\frac{a}{D}\right) = (-1)^{\frac{D-1}{2}\frac{a-1}{2}}$.

$\left(\frac{D}{b}\right) \left(\frac{b}{D}\right) = (-1)^{\frac{D-1}{2}\frac{b-1}{2}}$.

Since $D \equiv 1$ (mod $4$), $(D - 1)/2 \equiv 0$ (mod $2$). Hence

$\left(\frac{D}{a}\right) = \left(\frac{a}{D}\right)$.

$\left(\frac{D}{b}\right) = \left(\frac{b}{D}\right)$.

Hence $\left(\frac{D}{a}\right) = \left(\frac{D}{b}\right)$ by 1. of this question

Lemma 2 Let $D \lt 0$ be a negative integer such that $D \equiv 1$ (mod $4$). Let $a$ and $b$ be positive odd integers such that $a \equiv b$ (mod $D$). Then $$\left(\frac{D}{a}\right) = \left(\frac{D}{b}\right)$$

Proof: Since $a \equiv b$ (mod $D$), if gcd$(a, D) \ne 1$, then gcd$(b, D) \ne 1$. Hence we can assume that gcd$(a, D) = 1$ and gcd$(b, D) = 1$.

By 3. of this question, $\left(\frac{D}{a}\right) = \left(\frac{-1}{a}\right)\left(\frac{-D}{a}\right)$.

By 5. of this question, $\left(\frac{-1}{a}\right) = (-1)^{\frac{a-1}{2}}$.

By 4. of this question, $\left(\frac{-D}{a}\right) \left(\frac{a}{-D}\right) = (-1)^{\frac{-D-1}{2}\frac{a-1}{2}}$.

Since $-D \equiv 3$ (mod $4$), $(-D - 1)/2 \equiv 1$ (mod $2$).

Hence $\left(\frac{-D}{a}\right) \left(\frac{a}{-D}\right) = (-1)^{\frac{a-1}{2}}$.

Hence $\left(\frac{-D}{a}\right) = (-1)^{\frac{a-1}{2}} \left(\frac{a}{-D}\right)$.

Hence, $\left(\frac{D}{a}\right) = \left(\frac{-1}{a}\right)\left(\frac{-D}{a}\right) = \left(\frac{a}{-D}\right)$.

Similarly $\left(\frac{D}{b}\right) = \left(\frac{-1}{b}\right)\left(\frac{-D}{b}\right) = \left(\frac{b}{-D}\right)$.

Since $a \equiv b$ (mod $D$), $\left(\frac{a}{-D}\right) = \left(\frac{b}{-D}\right)$ by 1. of this question. Hence $\left(\frac{D}{a}\right) = \left(\frac{D}{b}\right)$

Lemma 3 Let $D \gt 0$ be a positive integer such that $D \equiv 0$ (mod $4$). There exists an integer $\alpha \ge 2$ such that $D = (2^\alpha)m$, where $m$ is a positive odd integer. Suppose $\alpha$ is even. Let $a$ and $b$ be positive odd integers such that $a \equiv b$ (mod $D$). Then $$\left(\frac{D}{a}\right) = \left(\frac{D}{b}\right)$$

Proof: Since $a \equiv b$ (mod $D$), if gcd$(a, D) \ne 1$, then gcd$(b, D) \ne 1$. Hence we can assume that gcd$(a, D) = 1$ and gcd$(b, D) = 1$.

By 3. of this question, $\left(\frac{D}{a}\right) = \left(\frac{2}{a}\right)^\alpha\left(\frac{m}{a}\right)$.

Since $\alpha$ is even,

$\left(\frac{D}{a}\right) = \left(\frac{m}{a}\right)$.

$\left(\frac{D}{b}\right) = \left(\frac{m}{b}\right)$.

Hence it suffices to prove that $\left(\frac{m}{a}\right) = \left(\frac{m}{b}\right)$.

$\left(\frac{m}{a}\right) \left(\frac{a}{m}\right) = (-1)^{\frac{m-1}{2}\frac{a-1}{2}}$.

$\left(\frac{m}{b}\right) \left(\frac{b}{m}\right) = (-1)^{\frac{m-1}{2}\frac{b-1}{2}}$.

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

Since $(m - 1)/2 \equiv 0$ (mod $2$),

$\left(\frac{m}{a}\right) = \left(\frac{a}{m}\right)$.

$\left(\frac{m}{b}\right) = \left(\frac{b}{m}\right)$.

Since $a \equiv b$ (mod $D$), $a \equiv b$ (mod $m$),

Hence $\left(\frac{a}{m}\right) = \left(\frac{b}{m}\right)$ by 1. of this question

Hence $\left(\frac{m}{a}\right) = \left(\frac{m}{b}\right)$.

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

Since $(m - 1)/2 \equiv 1$ (mod $2$),

$\left(\frac{m}{a}\right) \left(\frac{a}{m}\right) = (-1)^{\frac{a-1}{2}}$.

$\left(\frac{m}{b}\right) \left(\frac{b}{m}\right) = (-1)^{\frac{b-1}{2}}$.

Since $D \equiv 0$ (mod $4$) and $a \equiv b$ (mod $D$), $a \equiv b$ (mod $4$).

Hence ${\frac{a-1}{2}} \equiv (-1)^{\frac{b-1}{2}}$ (mod $2$).

Hence $(-1)^{\frac{a-1}{2}} = (-1)^{\frac{b-1}{2}}$.

Since $a \equiv b$ (mod $D$), $a \equiv b$ (mod $m$).

Hence $\left(\frac{a}{m}\right) = \left(\frac{b}{m}\right)$ by 1. of this question.

Hence $\left(\frac{m}{a}\right) = \left(\frac{m}{b}\right)$.

Lemma 4 Let $D \gt 0$ be a positive integer such that $D \equiv 0$ (mod $4$). There exists an integer $\alpha \ge 2$ such that $D = (2^\alpha)m$, where $m$ is a positive odd integer. Suppose $\alpha$ is odd. Let $a$ and $b$ be positive odd integers such that $a \equiv b$ (mod $D$). Then $$\left(\frac{D}{a}\right) = \left(\frac{D}{b}\right)$$

Proof: Since $a \equiv b$ (mod $D$), if gcd$(a, D) \ne 1$, then gcd$(b, D) \ne 1$. Hence we can assume that gcd$(a, D) = 1$ and gcd$(b, D) = 1$.

By 3. of this question, $\left(\frac{D}{a}\right) = \left(\frac{2}{a}\right)^\alpha\left(\frac{m}{a}\right)$.

Since $\alpha$ is odd,

$\left(\frac{D}{a}\right) = \left(\frac{2}{a}\right)\left(\frac{m}{a}\right)$.

$\left(\frac{D}{b}\right) = \left(\frac{2}{b}\right)\left(\frac{m}{b}\right)$.

$\left(\frac{2}{a}\right) = (-1)^{\frac{a^2-1}{8}}$.

$\left(\frac{2}{b}\right) = (-1)^{\frac{b^2-1}{8}}$.

Since $\alpha \ge 3$ and $a \equiv b$ (mod $D$), $a \equiv b$ (mod $8$).

Hence $\left(\frac{2}{a}\right) = \left(\frac{2}{b}\right)$.

Hence it suffices to prove that $\left(\frac{m}{a}\right) = \left(\frac{m}{b}\right)$.

$\left(\frac{m}{a}\right) = (-1)^{\frac{m-1}{2}\frac{a-1}{2}}\left(\frac{a}{m}\right)$.

$\left(\frac{m}{b}\right) = (-1)^{\frac{m-1}{2}\frac{b-1}{2}}\left(\frac{b}{m}\right)$.

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

Since $(m - 1)/2 \equiv 0$ (mod $2$),

$\left(\frac{m}{a}\right) = \left(\frac{a}{m}\right)$.

$\left(\frac{m}{b}\right) = \left(\frac{b}{m}\right)$.

Since $a \equiv b$ (mod $D$), $a \equiv b$ (mod $m$).

Hence $\left(\frac{a}{m}\right) = \left(\frac{b}{m}\right)$ by 1. of this question

Hence $\left(\frac{m}{a}\right) = \left(\frac{m}{b}\right)$.

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

Since $(m - 1)/2 \equiv 1$ (mod $2$),

$\left(\frac{m}{a}\right) = (-1)^{\frac{a-1}{2}}\left(\frac{a}{m}\right)$.

$\left(\frac{m}{b}\right) = (-1)^{\frac{b-1}{2}}\left(\frac{b}{m}\right)$.

Since $a \equiv b$ (mod $D$), $a \equiv b$ (mod $m$).

Hence $\left(\frac{a}{m}\right) = \left(\frac{b}{m}\right)$ by 1. of this question

Since $D \equiv 0$ (mod $4$) and $a \equiv b$ (mod $D$), $a \equiv b$ (mod $4$).

Hence $(-1)^{\frac{a-1}{2}} \equiv (-1)^{\frac{b-1}{2}}$ (mod $2$).

Hence $(-1)^{\frac{a-1}{2}} = (-1)^{\frac{b-1}{2}}$.

Hence $\left(\frac{m}{a}\right) = \left(\frac{m}{b}\right)$.

Lemma 5 Let $D \lt 0$ be a negative integer such that $D \equiv 0$ (mod $4$). Let $a$ and $b$ be positive odd integers such that $a \equiv b$ (mod $D$). Then $$\left(\frac{D}{a}\right) = \left(\frac{D}{b}\right)$$

Proof: Since $a \equiv b$ (mod $D$), if gcd$(a, D) \ne 1$, then gcd$(b, D) \ne 1$. Hence we can assume that gcd$(a, D) = 1$ and gcd$(b, D) = 1$.

There exists an integer $\alpha \ge 2$ such that $D = -(2^\alpha)m$, where $m$ is a positive odd integer.

$\left(\frac{D}{a}\right) = \left(\frac{-1}{a}\right)\left(\frac{-D}{a}\right)$.

$\left(\frac{D}{b}\right) = \left(\frac{-1}{b}\right)\left(\frac{-D}{b}\right)$.

Since $-D \equiv 0$ (mod $4$), $\left(\frac{-D}{a}\right) = \left(\frac{-D}{b}\right)$ by Lemma 3 and Lemma 4. Hence it suffices to prove $\left(\frac{-1}{a}\right) = \left(\frac{-1}{b}\right)$.

$\left(\frac{-1}{a}\right) = (-1)^{\frac{a-1}{2}}$.

$\left(\frac{-1}{b}\right) = (-1)^{\frac{b-1}{2}}$.

Since $D \equiv 0$ (mod $4$) and $a \equiv b$ (mod $D$), $a \equiv b$ (mod $4$).

Hence ${\frac{a-1}{2}} \equiv (-1)^{\frac{b-1}{2}}$ (mod $2$).

Hence $\left(\frac{-1}{a}\right) = \left(\frac{-1}{b}\right)$.

-