Finding a tricky quotient set We will denote by $\mathbb{K}$ one of the fields $\mathbb{Q}, \mathbb{R}$ or $\mathbb{C}$. On $\mathbb{K}\times \mathbb{K}$ we define the following equivalence relation:
$$(a,b)\equiv (a', b') \iff \exists (q,\alpha)\in \mathbb{K}^{*}\times \mathbb{K} \text{ such that } \begin{cases} a=q^2a'+\alpha^2-b\alpha \\ b=qb'+2\alpha \end{cases}.$$
We wish to determine the quotient set $\mathbb{K} \times \mathbb{K}/\equiv$ $\space$ for all $\mathbb{K}$s.
This problem was an extra problem in my abstract algebra class (don't worry, this isn't an attempt to cheat, I am posting this a week after the solution was due to be sent) and I kind of got stuck when it comes to $\mathbb{K}=\mathbb{Q}$.
For $\mathbb{K}=\mathbb{C}$, the things were nice and easy, because the original question asked me to prove that $\mathbb{C}\times \mathbb{C}/\equiv$ is equal to $\{\hat{(0,0)}, \hat{(0,1)}\}$ and this can be checked through (tedious) direct computations.
For $\mathbb{K}=\mathbb{R}$, a friend came up with the idea of expressing $\alpha$ from the second equation and then substituing it in the first one. This gives us the following equivalent characterisation of the equivalence relation:
$$(a,b)\equiv (a', b') \iff \exists q\in \mathbb{K}^{*} \text{ such that } 4a+b^2=q^2(4a'+b'^2) \space (*).$$
(notice that this works for all $\mathbb{K}$s, the case $\mathbb{K}=\mathbb{C}$ can be solved much easier by using this, but I didn't really need to think that much for that one since direct computations worked in my context)
For real numbers, this rewrites as $(a,b)\equiv (a', b') \iff \operatorname{sgn}(4a+b^2)=\operatorname{sgn}(4a'+b'^2)$.
As a result, there will be three equivalence classes: the parabola $4x+y^2=0$, its interior and its exterior. A representative for each of these are, respectively, $(0,0), (-1,0)$ and $(0,1)$, so $\mathbb{R}\times \mathbb{R}/\equiv \space = \{\hat{(0,0)}, \hat{(-1,0)}, \hat{(0,1)}\}$.
For $\mathbb{K}=\mathbb{Q}$, the things get pretty nasty by this approach. In this case, $(*)$ rewrites as $(a,b)\equiv (a',b') \iff \sqrt{\frac{4a+b^2}{4a'+b'^2}}\in \mathbb{Q}$ and I haven't been able to make any further progress.
 A: Consider the map $\varphi\colon K\times K\rightarrow K,\,(a,b)\mapsto4a+b^2$. This map is surjective, since $\varphi(a/4,0)=a$ for all $a\in K$. Next, consider the projection map $\pi\colon K\rightarrow K/(K^{\times})^2$, where $K/(K^{\times})^2$ is the set of equivalence classes under the equivalence relation $a\sim b:\Leftrightarrow\exists q\in K^{\times}\colon a=q^2b$ for $a,b\in K$. This map is surjective by definition. Your equation $(\ast)$ now says that
$$(a,b)\sim(a^{\prime},b^{\prime})\Leftrightarrow(\pi\circ\varphi)(a,b)=(\pi\circ\varphi)(a^{\prime},b^{\prime}),\qquad\forall (a,b),(a^{\prime},b^{\prime})\in K\times K.$$
Now, the universal property of the quotient set tells us that $\pi\circ\varphi\colon K\times K\rightarrow K/(K^{\times})^2$ factors as a bijection $\widetilde{\pi\circ\varphi}\colon K\times K/\sim\rightarrow K/(K^{\times})^2$, sending the equivalence class of $(a,b)$ in $K\times K$ to the equivalence class of $4a+b^2$ in $K/(K^{\times})^2$. (This holds true for any field $K$ of characteristic $\neq2$.)
In the specific case $K=\mathbb{Q}$, there is also a somewhat natural system of representatives of $K/(K^{\times})^2$. The equivalence class $[0]=\{0\}$ is represented by $0$ and every other equivalence class contains a unique square-free integer.
