Matrix preserving almost Pythagorean triples

76 Views Asked by At

The following matrix is known to generate Pythagorean triples given an initial solution $(x,y,z) $ by recursive matrix multiplication.

$$ H = \begin{bmatrix} 1 & 2 & 2 \\ 2 & 1 & 2 \\ 2 & 2 & 3 \end{bmatrix} \cdot \begin{bmatrix} x \\ y \\ z\end{bmatrix}$$

I multiplied $H$ by the column vector of the an almost Pythagorean triple $(x,y,z) = (4,7,8)$ satisfying $x^2+ y^2 = z^2 + 1$ and it also generated another solution.

My question is on why does this work in this case and are there other matrices that has this property?