# Is there a topograph for Pythagorean triples?

I have reading Allen Hatcher's notes on quadratic forms. Naturally, draw a pictures encoding all the values of a quadratic forms in a topographs. These are build by iterating the parallelogram identity :

$$2 Q(\vec{v})+2Q(\vec{w}) = Q(\vec{v}+\vec{w}) + Q(\vec{v}-\vec{w})$$

These can be found in Ch 1 of The Sensual (Quadratic) Form by John H Conway.

They are many interesting related to Farey fractions, circle packings, Voronoi tesselations and Kleinian groups.

I am interested points $x,y,z \in \mathbb{Z}^3$ in the quadratic form $Q(x,y,z) = x^2 + y^2 - z^2$ vanishes. It's known such triples exhibit a ternary tree structure. One can multiply vector $(x,y,z)$ by any of

$$\left[\begin{array}{ccc}1 &-2 & 2 \\\\ 2& -1& 2\\\\ 2& -2 & 3 \end{array} \right] \text{ or } \left[\begin{array}{ccc}1 &2 & 2 \\\\ 2& 1& 2\\\\ 2& 2 & 3 \end{array} \right] \text{ or } \left[\begin{array}{ccc}-1 &2 & 2 \\\\ -2& 1& 2\\\\ -2& 2 & 3 \end{array} \right]$$ and get another Pythagorean triple. The result is an $\Gamma(2)$ action on the Pythagorean triples.

If I had to guess, the topograph would be somehow dual to the hyperbolic tessellation associated to the congruence group. The vertices of the "topograph" would be (similar to) the Farey fractions and the relation would involve 6 numbers instead of 4. I wonder what it could be.

Having a topograph for solutions of quadratic forms rather than values is not without precent. It's been done for Appolonian circle packings and Markoff triples. The topograph itself, has extension to ground fields other than $\mathbb{Q}$.

-
The Hatcher notes are very nice. I have used the topograph method to answer a few questions on MSE, when the represented targets were a bit too large for the Lagrange method (adjacent indefinite forms, essentially continued fractions) to work. I had not realized anyone else had paid attention to the idea. – Will Jagy Oct 29 '12 at 3:23
Perhaps this question is moot? The topograph is gives a binary tree structure to the values of a quadratic form. For Pythagorean triples we exhibit a ternary tree with a $\Gamma(2)$ action. It remains to overlay the Pythagorean triples in the faces of the $\Gamma(2)$ Poincare disk tiling. – john mangual Oct 29 '12 at 4:20
As a side note, I believe that collection of three matrices that generate all primitive Pythagorean triples is due to Hall, Genealogy of Pythagorean triads, Math. Gaz. 54 (1970) 377-379. If anyone knows an earlier source, I would be very glad to know about it. – Brian Hopkins Jun 13 '13 at 4:13
Hall is definitely not the first person to find those three matrices in the setting of Pythagorean triples. They were found by Berggren in 1934 and Barning in 1963. See references at the end of math.uconn.edu/~kconrad/blurbs/linmultialg/descentPythag.pdf. See also en.wikipedia.org/wiki/Tree_of_Pythagorean_triples. – KConrad Jun 21 '13 at 2:07
Delayed thanks, Keith. Someone also pointed me a different tree in arxiv.org/abs/0809.4324. – Brian Hopkins Jul 28 '14 at 4:35

I'm not sure what "topograph" means, but if it's just a fancy word for "pictoral description of features in a region" then the answer is yes.

Send your triple $(a,b,c)$ to the element $a/c+ ib/c$ in the unit circle, and apply the Cayley transform $z \mapsto -i\frac{z-1}{z+1}$ to get elements of the rational projective line. The basic triple $(1,0,1)$ is sent to $0$, and the standard symmetry-breaking restriction specifying that $b$ is even identifies the set of Pythagorean triples with the $\Gamma(2)$ orbit of $0$, i.e., the set of rationals with even numerator. We will call rationals with even numerator "special cusps".

Divide the upper half plane into fundamental domains for $\Gamma(2)$ - each domain will touch a single special cusp, and three non-special cusps. The topograph is formed by dividing the half-plane into regions, where each region is the union of all fundamental domains touching a special cusp. You can also use the Cayley transform to get a topograph in the disc (as in your last picture above), where the special cusps are precisely the rational points on the unit circle whose $y$-coordinate has even numerator.

Unlike the quadratic form topograph, the regions only meet at edges, because the fundamental domain of $\Gamma(2)$ has no corners - this has something to do with the lack of finite order elements. I tried drawing the topograph in a disc, but it doesn't look so great. The regions attached to a single Pythagorean triple are so big that everything except about three regions will be smushed into a small neighborhood of the boundary circle.

Since you added some other information, like $3 \times 3$ matrices and ternary trees, I guess you want to know how they are related to topograph process. The correspondence between the $\Gamma(2)$ action and the $3 \times 3$ matrices is an integral version of the exceptional isomorphism between $PSL_2(\mathbb{R})$ and $SO(2,1)^+$ (but perhaps $PGO(2,1)^+$ is more canonical given the process that follows). For example, conjugation by Cayley sends $U = \binom{12}{01}$ to the Möbius transformation $z \mapsto \frac{(1+i)z + i}{-iz+1-i}$, which takes $a+ib$ to $\frac{-a-2b-2 + (2a+b+2)i}{2a+2b+3}$. We can now view the denominator and the real and imaginary parts of the numerator as row vectors, sending $(a,b,1)^T$ to the given combinations. This yields your second matrix with the first row negated. The sign change doesn't affect the validity of the triples, since it just negates $x$. A similar process with $L = \binom{10}{21}$ yields $z \mapsto \frac{(1-i)z + i}{-iz+1+i}$, taking $a+ib$ to $\frac{-a+2b+2+(-2a+b+2)i}{-2a+2b+3}$, which produces your third matrix. Your first matrix corresponds to $U^{-1}$, and $L^{-1}$ goes to a fourth matrix that you didn't write.

The ternary tree is a quotient of a connected subset of the Cayley graph of $\Gamma(2)/\langle - I\rangle$, which is free of rank 2. Because the subgroup generated by $L$ is the stabilizer of the cusp at 0, the cusps are in correspondence with left cosets, i.e., the set of words in $U$ and $L$ that don't end in a nonzero power of $L$. You can write this coset space as the subset of the Cayley graph (an infinite 4-valent tree) from which two of the four branches incident to the identity have been deleted, i.e., a pair of ternary trees sharing a common root at the identity. The entries in the two ternary trees differ by a sign, so we typically identify entries with the same absolute value. This is described in greater length in the article by Alperin that you linked (the main difference being that Alperin uses an action by conjugation on nilpotent $2 \times 2$ integer matrices instead of Möbius transformations).

-