These are all the three by three matrices of determinant $+1$ that take an integer solution, $x,y,z$ written as a column vector, to a new one. On this site, I mostly see Vieta Jumping. This needs a little more work. The reference is pages 123-125 in Noneuclidean Tesselations and Their Groups by Wilhelm Magnus. It appeared first in Fricke and Klein (1897), especially pages 533-535. Fricke and Klein has been translated and that is available for sale from the AMS. The format is clever, all through the translation there are little marks on the side so you can tell what page in the German original is being presented. The subtitle of this book was
Erster Band: Die Gruppentheoretischen Grundlangen
First type, $ad-bc=1$ and $a + b + c + d \equiv 0 \pmod 2 \; , \;$
$$
\left(
\begin{array}{ccc}
\frac{1}{2} \left(a^2 + b^2 + c^2 + d^2 \right) & ab+cd &\frac{1}{2} \left(a^2 - b^2 + c^2 - d^2 \right) \\
ac+bd & ad+bc & ac-bd \\
\frac{1}{2} \left(a^2 + b^2 - c^2 - d^2 \right) & ab-cd & \frac{1}{2} \left(a^2 - b^2 - c^2 + d^2 \right) \\
\end{array}
\right)
$$
Second type $ad-bc=2$
$$
\left(
\begin{array}{ccc}
\frac{1}{4} \left(a^2 + b^2 + c^2 + d^2 \right) & \frac{1}{2}(ab+cd) &\frac{1}{4} \left(a^2 - b^2 + c^2 - d^2 \right) \\
\frac{1}{2}(ac+bd) & \frac{1}{2}(ad+bc) & \frac{1}{2}(ac-bd) \\
\frac{1}{4} \left(a^2 + b^2 - c^2 - d^2 \right) & \frac{1}{2}(ab-cd) & \frac{1}{4} \left(a^2 - b^2 - c^2 + d^2 \right) \\
\end{array}
\right)
$$