Representations of integers by a binary quadratic form Let $\mathfrak{F}$ be the set of binary quadratic forms over $\mathbb{Z}$.
Let $f(x, y) = ax^2 + bxy + cy^2 \in \mathfrak{F}$.
Let $\alpha = \left( \begin{array}{ccc}
p & q \\
r & s \end{array} \right)$ be an element of $SL_2(\mathbb{Z})$.
We write $f^\alpha(x, y) = f(px + qy, rx + sy)$.
Since $(f^\alpha)^\beta$ = $f^{\alpha\beta}$, $SL_2(\mathbb{Z})$ acts on $\mathfrak{F}$ from right.
Let $f, g \in \mathfrak{F}$.
If $f$ and $g$ belong to the same $SL_2(\mathbb{Z})$-orbit, we say $f$ and $g$ are equivalent.
Let $f = ax^2 + bxy + cy^2 \in \mathfrak{F}$.
We say $D = b^2 - 4ac$ is the discriminant of $f$.
Let $m$ be an integer.
If $m = ax^2 + bxy + cy^2$ has a solution in $\mathbb{Z}^2$, we say $m$ is represented by $ax^2 + bxy + cy^2$.
If $m = ax^2 + bxy + cy^2$ has a solution $(s, t)$ such that gcd$(s, t) = 1$,
we say $m$ is properly represented by $ax^2 + bxy + cy^2$.
Is the following proposition true?
If yes, how do we prove it?
Proposition
Let $ax^2 + bxy + cy^2 \in \mathfrak{F}$.
Suppose its discriminant is not a square.
Let $m$ be an integer.
Then $m$ is properly represented by $ax^2 + bxy + cy^2$ if and only if there exist integers $l, k$ such that $ax^2 + bxy + cy^2$ and $mx^2 + lxy + ky^2$ are equivalent.
 A: I cannot understand the comment of William Jagy, but I think this question is in fact quite easy, and I shall employ the method using topographs as in Cnonway's Sensual Quadratic Form.
But, once one knows what a topograph is, and some basic properties if that concept, this becomes an easy exercise.
A topograph of a quadratic form is like .
Here the lettres mean the values represented by a form $f$. And we represent $m$ there. The condition that $m$ is properly represented implies that the representation must occur in the graph(see Conway's little book). Then, taking $h=m+x-y$, we shall find that the form $f$ is equivalent with $\langle m,h,x\rangle$, as required(see the book again). (For an example of the graph, see the answer of Will Jagy.)
Conversely, if there is such a form $\langle m,h,x\rangle$ equivalent with $f$, then $f$ should also properly represent $m$, as the other form does.
Feel free to tell me where the errors are, if any; thanks in advance.
P.S. The diagram above is hand-made, and is in fact modelled on the form $X^2+4XY+Y^2$.
A: Lemma 1
Let $f = ax^2 + bxy + cy^2 \in \mathfrak{F}$.
Let $\alpha = \left( \begin{array}{ccc}
p & q \\
r & s \end{array} \right)$ be an element of $SL_2(\mathbb{Z})$.
Then $f^\alpha(x, y) = f(px + qy, rx + sy) = kx^2 + lxy + my^2$,
where
$k = ap^2 + bpr + cr^2$
$l = 2apq + b(ps + qr) + 2crs$
$m = aq^2 + bqs + cs^2$.
Proof:
Clear.
Proof of the proposition
Let $f(x, y) = ax^2 + bxy + cy^2$.
Suppose $m$ is properly represented by $f(x, y)$.
There exist integers $p, r$ such that gcd$(p, r) = 1$ and $m = f(p, r)$.
Since gcd$(p, r) = 1$, there exist integers $s, r$ such that $ps - rq = 1$.
By Lemma 1, $f(px + qy, rx + sy) = mx^2 + lxy + ky^2$,
where
$m = ap^2 + bpr + cr^2$
$l = 2apq + b(ps + qr) + 2crs$
$k = aq^2 + bqs + cs^2$.
Hence, $ax^2 + bxy + cy^2$ and $mx^2 + lxy + ky^2$ are equivalent.
Conversely suppose $ax^2 + bxy + cy^2$ and $mx^2 + lxy + ky^2$ are equivalent.
There exists integer $p, q, r, s$ such that $ps - rq = 1$ and
$f(px + qy, rx + sy) = mx^2 + lxy + ky^2$.
Letting $x = 1, y = 0$, we get $f(p, r) = m$.
Since $ps - rq = 1$, gcd$(p, r) = 1$.
Hence $m$ is properly represented by $ax^2 + bxy + cy^2$.
