Iff Criterion for a Binary Quadratic Form to Have a Discriminant d

# Iff Criterion for a Binary Quadratic Form to Have a Discriminant d

 Theorem 1: Let $d \in \mathbb{Z}$. Then there exists a binary quadratic form with discriminant $d$ if and only if $d \equiv 0 \pmod 4$ or $d \equiv 1 \pmod 4$.
• Proof: $\Rightarrow$ Suppose that $f(x, y) = ax^2 + bxy + cy^2$ is a binary quadratic form. Then the discriminant of $f(x, y)$ is $d = b^2 - 4ac$. So:
(1)
\begin{align} \quad d = b^2 -4ac \equiv b^2 - 0 = b^2 \pmod 4 \end{align}
• But $b^2 \equiv 0 \pmod 4$ or $b^2 \equiv 1 \pmod 4$ for any $b \in \mathbb{Z}$. So $d \equiv 0 \pmod 4$ or $d \equiv 1 \pmod 4$.
• $\Leftarrow$ Suppose that $d \equiv 0 \pmod 4$. Then $d = 4k$ for some $k \in \mathbb{Z}$, and the binary quadratic form:
(2)
\begin{align} \quad f(x, y) = x^2 - ky^2 \end{align}
• has discriminant $0^2 - 4(1)(-k) = 4k = d$.
• Now suppose that $d \equiv 1 \pmod 4$. Then $d = 4k + 1$ for some $k \in \mathbb{Z}$, and the binary quadratic form:
(3)
\begin{align} \quad f(x, y) = x^2 + xy - ky^2 \end{align}
• has discriminant $1^2 - 4(1)(-k)= 4k + 1 = d$. $\blacksquare$

## Example 1

Give an example of binary quadratics form with discriminants $0$, $1$, $4$, $5$, and $8$ respectively.

Since $0, 4, 8 \equiv 0 \pmod 4$ and $1, 5 \equiv 1 \pmod 4$, theorem 1 above implies that there exists binary quadratic forms with these discriminants.

$f(x, y) = x^2 + 2xy + y^2$ has discriminant $d = 4 - 4(1)(1) = 0$.

$g(x, y) = 2x^2 + 3xy + y^2$ has discriminant $9 - 4(2)(1) = 1$.

$h(x, y) = 3x^2 + 4xy + y^2$ has discriminant $16 - 4(3)(1) = 4$.

$i(x, y) = x^2 + 3xy + y^2$ has discriminant $9 - 4(1)(1) = 5$.

$j(x, y) = 4x^2 + 4xy + y^2$ has discriminant $16 - 4(4)(1) = 8$.

$k(x, y) = 4x^2 + 5xy + y^2$ has discriminant $25 - 4(4)(1) = 9$.