I am working through the book "Algebraic Geometry: A Problem Solving Approach" by Garrity et al., and I want somebody to check my work. I feel like I don't have a good grasp on projective geometry and it's all a little weird to me. Constructive feedback would be appreciated.
We are considering the rational points of the curve $x^2 + y^2 = 1$, and we are denoting the rational points by the set:
$$C(\mathbb{Q}) = \{(x,y) \in \mathbb{Q}^2 : x^2 + y^2 = 1\}$$
We consider a map $\tilde{\psi}: \mathbb{Q} \rightarrow C(\mathbb{Q})$ defined by $\tilde{\psi}(\lambda) = \left(\frac{2 \lambda}{\lambda^2 + 1},\frac{\lambda^2 - 1}{\lambda^2 + 1}\right)$, then extend this function to the projective line by considering $\psi: \mathbb{P}^1 (\mathbb{Q}) \rightarrow C(\mathbb{Q}) \subset \mathbb{P}^2(\mathbb{Q})$ defined by:
$$\psi(\lambda : \mu) = (2 \lambda \mu : \lambda^2 - \mu^2: \lambda^2 + \mu^2)$$
We are then asked to show:
(1) Show that $\psi: \mathbb{P}^1 (\mathbb{Q}) \rightarrow C(\mathbb{Q}) \subset \mathbb{P}^2(\mathbb{Q})$ is onto.
(2) Show that every primitive Pythagorean triple is of the form $(2 \lambda \mu, \lambda^2 - \mu^2, \lambda^2 + \mu^2)$
Attempted solution
To show part (1) I am trying to show that for every $(x:y:1) \in C(\mathbb{Q})$, there exists some $\lambda, \mu \in \mathbb{Q}$ such that $\psi(\lambda:\mu) = (x:y:1)$. This is equivalent to saying that for $x,y \in \mathbb{Q}$ such that $x^2 + y^2 = 1$, there exist rationals $\lambda, \mu$ with:
$$(2 \lambda \mu : \lambda^2 - \mu^2: \lambda^2 + \mu^2) = (x:y:1).$$
By the definition of projective space, this means there exists $t \in \mathbb{Q}$ such that:
$$2 \lambda \mu = tx$$ $$\lambda^2 - \mu^2 = ty$$ $$\lambda^2 + \mu^2 = t$$
Adding the second and third expressions together we obtain:
$$2 \lambda^2 = ty + tz \implies \lambda^2 = \frac{t(y+1)}{2}$$
Similarly, subtracting equation 2 from equation 3 yields:
$$2 \mu^2 = tz-ty \implies \mu^2 = \frac{t(1-y)}{2}$$
Dividing these by the first equation gives:
$$\frac{\lambda^2}{2 \lambda \mu} = \frac{y + 1}{2x} \implies \lambda = \frac{y + 1}{x}\mu \implies \mu = \frac{x}{y + 1} \lambda.$$
Then we have:
$$\psi\left(\frac{y + 1}{x}: 1\right) = \left(2\left( \frac{y + 1}{x}\right): \left(\frac{y + 1}{x}\right)^2 - 1: \left(\frac{y + 1}{x}\right)^2 + 1\right) = (x : y : 1)$$
Where I have omitted division by the final coordinate in the middle and used the fact that $x^2 + y^2 = 1$.
For part (2), suppose $x, y, z$ is a primitive Pythagorean triple, so that it cannot be obtain by multiplying by a previous Pythagorean triple. We have $x^2 + y^2 = z^2$, so in other words $\left(\frac{x}{z}\right)^2 +\left(\frac{y}{z}\right)^2 = 1$ and $\left(\frac{x}{z}, \frac{y}{z}\right) \in C(\mathbb{Q})$. By the surjectivity of $\psi$ there exists $\lambda, \mu \in \mathbb{Q}$ with:
$$(2 \lambda \mu : \lambda^2 - \mu^2: \lambda^2 + \mu^2) = \left(\frac{x}{z}:\frac{y}{z}:1\right) = (x:y:z).$$
Let $\lambda = \frac{a}{b}, \mu = \frac{c}{d}$, and let $A = (bd)^2, B = ad, C = bc$. We have:
$$A (2\lambda\mu) = 2(ad)(bc) = 2BC$$ $$A (\lambda^2 - \mu^2) = B^2 - C^2$$ $$A (\lambda^2 + \mu^2) = B^2 + C^2$$
We can divide out factors of $B$ and $C$ until both are relatively prime, and then $(2BC, B^2 - C^2, B^2 + C^2$) will be a primitive Pythagorean triple (if it weren't primitive we can show by contradiction that $B$ and $C$ would have to share a factor after all, but honestly this write-up is getting long and I'm going to skip that detail, so if it's wrong just let me know and I'll give details about this part). Then we have:
$$(2BC: B^2 - C^2: B^2 + C^2) = (2 \lambda \mu : \lambda^2 - \mu^2: \lambda^2 + \mu^2) = (x:y:z).$$
This means there is a $t = \frac{p}{q} \in \mathbb{Q}$ with
$$2BC = tx$$ $$B^2 - C^2 = ty$$ $$B^2 + C^2 = tz$$
But a primitive pythagorean triple cannot be a rational multiple of another distinct pythagorean triple. To see why, note that $t$ cannot be an integer greater than 1, so $q \neq 1$ if $p>1$ (otherwise the LHS would not be primitive). But since $tx$, $ty$, $tz$ must all be integers from the formulae above, then each of $x,y,z$ shares a factor of $q$, but this means that $(x,y,z)$ is not primitive, since $(\frac{x}{q}, \frac{y}{q}, \frac{z}{q})$ would then by a pythagorean triple. Therefore $t = 1$ and $(x,y,z)$ has the form $(2BC, B^2 - C^2, B^2 + C^2)$. $\square$
Please let me know if my general reasoning is OK. Thanks.