Square Identities

These identities say that the product of $2$ numbers, each of which is a sum of $2^n$ squares, is itself a sum of $2^n$ squares.

But, this is not limited to only ‘numbers’, and this has many applications :). Check out Hypercomplex numbers

Here are formulas of square identities:

Brahmagupta–Fibonacci identity / Diophantus identity

\begin{equation} (x_{1}^{2}+x_{2}^{2})(y_{1}^{2}+y_{2}^{2})=z_{1}^{2}+z_{2}^{2} \end{equation}

Where,

\begin{equation} \begin{aligned} z_{1}&=(x_{1}y_{1}-x_{2}y_{2})\\ z_{2}&=(x_{1}y_{2}+x_{2}y_{1}) \end{aligned} \quad\text{or}\quad \begin{aligned} z_{1}&=(x_{1}y_{1}+x_{2}y_{2})\\ z_{2}&=(x_{1}y_{2}-x_{2}y_{1}) \end{aligned} \end{equation}

Euler's four–square identity

\begin{equation} (x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2})(y_{1}^{2}+y_{2}^{2}+y_{3}^{2}+y_{4}^{2})=z_{1}^{2}+z_{2}^{2}+z_{3}^{2}+z_{4}^{2} \end{equation} Where,

\begin{aligned} z_{1}&=({\color[RGB]{255, 0, 0}x_{1}y_{1}-x_{2}y_{2}}-x_{3}y_{3}-x_{4}y_{4})\\ z_{2}&=({\color[RGB]{255, 0, 0}x_{1}y_{2}+x_{2}y_{1}}+x_{3}y_{4}-x_{4}y_{3})\\ z_{3}&=(x_{1}y_{3}-x_{2}y_{4}+x_{3}y_{1}+x_{4}y_{2})\\ z_{4}&=(x_{1}y_{4}+x_{2}y_{3}-x_{3}y_{2}+x_{4}y_{1}) \end{aligned}

Degen's eight–square identity

\begin{equation} (x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2}+x_{5}^{2}+x_{6}^{2}+x_{7}^{2}+x_{8}^{2})(y_{1}^{2}+y_{2}^{2}+y_{3}^{2}+y_{4}^{2}+y_{5}^{2}+y_{6}^{2}+y_{7}^{2}+y_{8}^{2})=z_{1}^{2}+z_{2}^{2}+z_{3}^{2}+z_{4}^{2}+z_{5}^{2}+z_{6}^{2}+z_{7}^{2}+z_{8}^{2} \end{equation}

Where,

\begin{aligned} z_{1}&=({\color[RGB]{3, 159, 190}{\color[RGB]{255, 0, 0}x_{1}y_{1}-x_{2}y_{2}}-x_{3}y_{3}-x_{4}y_{4}}-x_{5}y_{5}-x_{6}y_{6}-x_{7}y_{7}-x_{8}y_{8})\\ z_{2}&=({\color[RGB]{3, 159, 190}{\color[RGB]{255, 0, 0}x_{1}y_{2}+x_{2}y_{1}}+x_{3}y_{4}-x_{4}y_{3}}+x_{5}y_{6}-x_{6}y_{5}-x_{7}y_{8}+x_{8}y_{7})\\ z_{3}&=({\color[RGB]{3, 159, 190}x_{1}y_{3}-x_{2}y_{4}+x_{3}y_{1}+x_{4}y_{2}}+x_{5}y_{7}+x_{6}y_{8}-x_{7}y_{5}-x_{8}y_{6})\\ z_{4}&=({\color[RGB]{3, 159, 190}x_{1}y_{4}+x_{2}y_{3}-x_{3}y_{2}+x_{4}y_{1}}+x_{5}y_{8}-x_{6}y_{7}+x_{7}y_{6}-x_{8}y_{5})\\ z_{5}&=(x_{1}y_{5}-x_{2}y_{6}-x_{3}y_{7}-x_{4}y_{8}+x_{5}y_{1}+x_{6}y_{2}+x_{7}y_{3}+x_{8}y_{4})\\ z_{6}&=(x_{1}y_{6}+x_{2}y_{5}-x_{3}y_{8}+x_{4}y_{7}-x_{5}y_{2}+x_{6}y_{1}-x_{7}y_{4}+x_{8}y_{3})\\ z_{7}&=(x_{1}y_{7}+x_{2}y_{8}+x_{3}y_{5}-x_{4}y_{6}-x_{5}y_{3}+x_{6}y_{4}+x_{7}y_{1}-x_{8}y_{2})\\ z_{8}&=(x_{1}y_{8}-x_{2}y_{7}+x_{3}y_{6}+x_{4}y_{5}-x_{5}y_{4}-x_{6}y_{3}+x_{7}y_{2}+x_{8}y_{1}) \end{aligned}

Pfister’s sixteen–square identity

\begin{equation} (x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+\cdots +x_{16}^{2})\,(y_{1}^{2}+y_{2}^{2}+y_{3}^{2}+\cdots +y_{16}^{2})=z_{1}^{2}+z_{2}^{2}+z_{3}^{2}+\cdots +z_{16}^{2} \end{equation}

Where,

\begin{aligned} z_{1}&={\color[RGB]{207, 21, 120}{\color[RGB]{3, 159, 190}{\color[RGB]{255, 0, 0}x_{1}y_{1}-x_{2}y_{2}}-x_{3}y_{3}-x_{4}y_{4}}-x_{5}y_{5}-x_{6}y_{6}-x_{7}y_{7}-x_{8}y_{8}}+u_{1}y_{9}-u_{2}y_{10}-u_{3}y_{11}-u_{4}y_{12}-u_{5}y_{13}-u_{6}y_{14}-u_{7}y_{15}-u_{8}y_{16}\\ z_{2}&={\color[RGB]{207, 21, 120}{\color[RGB]{3, 159, 190}{\color[RGB]{255, 0, 0}x_{2}y_{1}+x_{1}y_{2}}+x_{4}y_{3}-x_{3}y_{4}}+x_{6}y_{5}-x_{5}y_{6}-x_{8}y_{7}+x_{7}y_{8}}+u_{2}y_{9}+u_{1}y_{10}+u_{4}y_{11}-u_{3}y_{12}+u_{6}y_{13}-u_{5}y_{14}-u_{8}y_{15}+u_{7}y_{16}\\ z_{3}&={\color[RGB]{207, 21, 120}{\color[RGB]{3, 159, 190}x_{3}y_{1}-x_{4}y_{2}+x_{1}y_{3}+x_{2}y_{4}}+x_{7}y_{5}+x_{8}y_{6}-x_{5}y_{7}-x_{6}y_{8}}+u_{3}y_{9}-u_{4}y_{10}+u_{1}y_{11}+u_{2}y_{12}+u_{7}y_{13}+u_{8}y_{14}-u_{5}y_{15}-u_{6}y_{16}\\ z_{4}&={\color[RGB]{207, 21, 120}{\color[RGB]{3, 159, 190}x_{4}y_{1}+x_{3}y_{2}-x_{2}y_{3}+x_{1}y_{4}}+x_{8}y_{5}-x_{7}y_{6}+x_{6}y_{7}-x_{5}y_{8}}+u_{4}y_{9}+u_{3}y_{10}-u_{2}y_{11}+u_{1}y_{12}+u_{8}y_{13}-u_{7}y_{14}+u_{6}y_{15}-u_{5}y_{16}\\ z_{5}&={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}-x_{3}y_{13}+x_{4}y_{14}+x_{1}y_{15}-x_{2}y_{16}\\ z_{16}&=x_{16}y_{1}-x_{15}y_{2}+x_{14}y_{3}+x_{13}y_{4}-x_{12}y_{5}-x_{11}y_{6}+x_{10}y_{7}+x_{9}y_{8}+x_{8}y_{9}-x_{7}y_{10}+x_{6}y_{11}+x_{5}y_{12}-x_{4}y_{13}-x_{3}y_{14}+x_{2}y_{15}+x_{1}y_{16} \end{aligned}

The PDF for same can be found here

References