Counting number of $2\times 2$ unimodular matrices of particular type From set of numbers from $\Bbb S=\{0,1,\dots,m\}$, how many distinct $3\times 3$ unimodular matrices parametrized by $(a,b,c,d,e,f)\in\Bbb S^6$ of following type can one form?
\begin{bmatrix}
a^2 &ab &b^2\\
c^2 &cd &d^2\\
e^2 &ef &f^2\\
\end{bmatrix}
Is it at least $3m^{2+\beta}$ for some $\beta>0$ when $m\gg0$?
From comment below determinant is $$(ad-bc)(af-be)(cd-ef).$$
So how many $3$ tuples of $2\times 2$ matrices of following type with determinant being simultaneously $\pm1$ with entries from $\Bbb S$?
$$\begin{bmatrix}
a &c\\
b &d
\end{bmatrix}\quad
\begin{bmatrix}
c &e\\
d &f
\end{bmatrix}\quad
\begin{bmatrix}
e &a\\
f &b
\end{bmatrix}$$
An example matrix:
\begin{bmatrix}
1 &1 &1\\
9 &6 &4\\
4 &2 &1\\
\end{bmatrix} has determinant $-1$.
Update:
As determined below by Kantelope and Neil Strickland, rough asymptotics seem to be at least $3m^2$. Could this be improved to $3m^{2+\beta}$ for some $\beta>0$ when $m\gg0$?
 A: I will first refine kantelope's analysis slightly.
We want $(ad-bc)(af-be)(cf-de)=1$, so the three factors must be $\pm 1$.  For the moment I will consider the case where $(ad-bc)=(af-be)=(cf-de)=1$.  This means that $a$ and $b$ are coprime.
Let $(u,v)$ be the smallest pair of strictly positive integers such that $av-bu=1$.  Any other such pair must then have the form $(u+ia,v+ib)$ for some $i\geq 0$.  Thus, there must be integers $i,j\geq 0$ such that $(c,d)=(u+ia,v+ib)$ and $(e,f)=(u+ja,v+jb)$.  This gives 
$$cf-de=(u+ia)(v+jb)-(v+ib)(u+ja)=(i-j)(av-bu)=i-j,$$
so we need $i=j+1$.  Thus, the number of solutions starting with $(a,b)$ is the number of $j\geq 0$ such that $u+(j+1)a\leq m$ and also $v+(j+1)b\leq m$.  This makes it easy to write code to calculate the number $G(m)$ of solutions for any given $m$.  It appears from the numerics that $G(m)/m^2$ converges to a limit which is about $0.6$.  However, I have only calculated as far as $m=1000$, which is not far enough to see whether there might be logarithmic corrections.
A: For any given $(a,b)$, find $(c,d)$ with $ad-bc=1$ (Euclid), and note $(a,b,c,d,a+c,b+d)$ is a solution. You still have to worry about whether $a+c$ or $b+d$ is too large, but if $a,b\le m/2$ everything should be OK.
