Mathematical Invariant Start with the set {3, 4, 12}. You are allowed to perform a sequence of replacements, each time replacing two numbers a and b from your set with the new pair 0.6 a - 0.8b and 0.8 a + 0.6b. Can you transform the set into {4, 6, 12}? Look for an invariant.
I am having trouble determining what the invariant is. Any suggestions would be appreciated.
 A: The operation you are performing is equivalent to multiplying by one of the matrices
$$
\begin{bmatrix}
0.6&-0.8&0\\
0.8&0.6&0\\
0&0&1
\end{bmatrix},
\begin{bmatrix}
0.6&0&0.8\\
0&0&1\\
-0.8&0&0.6
\end{bmatrix},\text{ or}
\begin{bmatrix}
1&0&0\\
0&0.6&-0.8\\
0&0.8&0.6
\end{bmatrix}
$$
or their inverses. These are rotation matrices that rotate by $\sin^{-1}(0.8)$ around one of the coordinate axes. Since they are orthogonal, they are isometries and they preserve distances; in particular the length of a vector.
Since $|(3,4,12)|=13$ and $|(4,6,12)|=14$, the length of the vector is changed, so there is no way to get from one to the other using these matrices.
Note that this is not really different than miracle173's observation, just put into matrix/rotation form.
A: $$(0.6a-0.8b)^2+(0.8a+0.6b)^2+c^2=a^2+b^2+c^2$$
The squaresum of the numbers remains constant. The start triple $\{3,4,12\}$ has the squaresum $3^2+4^2+12^2=169$ . The next triple you generate has also the squaresum $169$ and so on. You will never reach a triple with squaresume $6^2+4^2+12^2=196$
