# Equivalent Binary Quadratic Forms

Definition: Let $f(x, y) = ax^2 + bxy + cy^2$ and $g(x, y) = Ax^2 + Bxy + Cy^2$ be binary quadratic forms. Then $f$ and $g$ are said to be Equivalent denoted $f \sim g$ if there exists $m_{11}, m_{12}, m_{21}, m_{22} \in \mathbb{Z}$ such that $f(x, y) = g(m_{11}x + m_{12}y, m_{21}x + m_{22}y)$ and such that $\det \begin{bmatrix} m_{11} & m_{12} \\ m_{21} & m_{22} \end{bmatrix} = m_{11}m_{22} - m_{12}m_{21} = 1$. |

For example, let $f(x, y) = x^2 + y^2$ and let $g(x, y) = 13x^2 + 16xy + 5y^2$. Let:

(1)Then:

(2)Therefore $f$ and $g$ are equivalent binary quadratic forms.

Now let $f(x, y) = ax^2 + bxy + cy^2$ with discriminant $d$ and let $g(x, y) = Ax^2 + Bxy + Cy^2$ with discriminant $D$. Suppose that $f \equiv g$ so that there exists integers $m_{11}, m_{12}, m_{21}, m_{22} \in \mathbb{Z}$ such that $f(m_{11}x + m_{12}y, m_{21}x + m_{22}y) = g(x, y)$ where $m_{12}m_{22} - m_{12}m_{21} = 1$. Let:

(3)There are a few observations that can be made. First, observe that:

(4)Similarly:

(5)Since $f \sim g$ we have that:

(6)Therefore, if $f \sim g$ and we have that:

(7)Proposition 1: Let $f$, $g$, and $h$ be binary quadratic forms.a) $f \sim f$ (Reflexivity Property).b) If $f \sim g$ then $g \sim f$ (Symmetry Property).c) If $f \sim g$ and $g \sim h$ then $f \sim h$ (Transitivity Property). |

*Properties (a), (b), and (c) tell us that equivalence of binary quadratic forms is an equivalence relation.*

**Proof of a)**Let $M = I_2$, the $2 \times 2$ identity matrix. Then clearly $F = I^T F I$. So $f \sim f$.

**Proof of b)**Since $f \sim g$ we have that $G = M^T F M$ where $\det (M) = 1$. Since $\det (M) = 1$, we have that:

- So $g \sim f$.

**Proof of c)**Suppose that $f \sim g$ and $g \sim h$. Then $G = M^T F M$ and $H = N^T G N$ where $\det (M) = 1$ and $\det (N) = 1$. So:

- Observe that $\det (MN) = \det(M) \cdot \det(N) = 1$. So $f \sim h$. $\blacksquare$

Proposition 2: Let $f$ and $g$ be binary quadratic forms with discriminants $d$ and $D$ respectively.a) If $f \sim g$ and $n \in \mathbb{Z}$ then $n$ can be represented by $f(x, y)$ if and only if $n$ can be represented by $g(x, y)$.b) If $f \sim g$ then $d = D$. |

*It is important to note that the converse of (b) is not true in general. That is, $d = D$ does NOT imply that $f \sim g$.*