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:

\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:

\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:

\begin{align} \quad f(x, y) = x^2 + xy - ky^2 \end{align}

- has discriminant $1^2 - 4(1)(-k)= 4k + 1 = d$. $\blacksquare$