# Geometric interpretation of linear forms in the sum of four (or eight) squares identity

There is a well-known sum-of-squares identity

$$(a^2+b^2)(c^2+d^2)=(ac+bd)^2+(ad-bc)^2. \tag{1}$$

Moreover, letting $\vec{u}=[\begin{smallmatrix}a\\b\end{smallmatrix}]$, $\vec{v}=[\begin{smallmatrix}c\\d\end{smallmatrix}]$, and $\theta=\angle\vec{u}\vec{v}$, we have

$$\begin{array}{llrl} ac+bd & = & \vec{u}\cdot\vec{v} & = & \|\vec{u}\|\|\vec{v}\|\cos\theta \\ ad-bc & = & \det[\vec{u}~\vec{v}] & = & \|\vec{u}\|\|\vec{v}\|\sin\theta \end{array} \tag{2}$$

So the bilinear forms $ac+bd$ and $ad-bc$ have a geometric interpretation in terms of $\vec{u},\vec{v}$.

There is also a four-squares formula:

$$(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 \tag{3}$$

where

$$\begin{cases} z_1 = x_1y_1-x_2y_2-x_3y_3-x_4y_4 \\ z_2 = x_2y_1+x_1y_2-x_4y_3+x_3y_4 \\ z_3 = x_3y_1+x_4y_2+x_1y_3-x_2y_4 \\ z_4 = x_4y_1-x_3y_2+x_2y_3+x_1y_4 \end{cases} \tag{4}$$

Question: do the bilinear forms $z_{1,2,3,4}$ have a geometric interpretation in terms of $\vec{x},\vec{y}$? What about the forms in the sum-of-eight-squares identity?

The form $z_1$ looks related to quaternions, which I have heard admit some kind of geometric interpretation. However the forms seem to privilege the first coordinate axis over the other three, and furthermore the quadratic forms in $(4)$ at a glance don't seem invariant under linear isometries of space, unlike the forms in $(2)$, and too sensitive of a coordinate-dependence seems to throw a wrench into the possibility of a pure geometric interpretation. There is additionally the question of "what other pure geometric information is there concerning two vectors other than their sizes and the angle between them?" Naively, I'd wager four different forms can't derive from one data point, unlike two (since there are precisely two basic trig functions: sine and cosine). So I am somewhat anxious that there may not be a good geometric interpretation.

• I know that the multiplication rule suggested for quaternions by these bilinear forms has the dot product and cross product of three vectors imbedded in its commutation relations. Not sure if that is the sort of thing you are looking for. (Incidentally the combination of these two products can give you the volume of a parallel piped described by three vectors) – Spencer Oct 22 '14 at 22:35

First off, let's clarify the relation to quaternions. If you have

\begin{align*} x &= x_1 + x_2\mathbb i + x_3\mathbb j + x_4\mathbb k \\ y &= y_1 + y_2\mathbb i + y_3\mathbb j + y_4\mathbb k \\ z &= z_1 + z_2\mathbb i + z_3\mathbb j + z_4\mathbb k \end{align*}

with all the coefficients on the right chosen real, and furthermore have $z=x\cdot y$ then comparing coefficients you get exactly the relations between the $\{x,y,z\}_{\{1,2,3,4\}}$ you stated in your question. So one way to write this sum of four squares identity would be

$$\lVert x\rVert^2\cdot\lVert y\rVert^2 = \lVert z\rVert^2 = \lVert x\cdot y\rVert^2$$

Now consider for a moment that these were complex numbers, namely $x=a+bi$ and $y=c+di$. Their product is $xy=(ac-bd) + (ad+bc)i$ and you'd get the equation

$$(a^2+b^2)(c^2+d^2)=(ac-bd)^2+(ad+bc)^2$$

This differs from the two-squares formula you stated only in the sign of $b$, so I'll consider this essentially the same form. How would you prove this over the complex numbers? Well, one way would be to change from Cartesian coordinates to polar ones, i.e. write $x=r_x\cdot e^{i\varphi_x}$ and $y=r_y\cdot e^{i\varphi_y}$ with $r_x,r_y,\varphi_x,\varphi_y\in\mathbb R$. If you interpret (multiplication by) a complex number as a geometric operation, then the $r$ component (i.e. the absolute value) is a scaling and the $e^{i\varphi}$ component (i.e. the phase) is a rotation. Now in my version the rotations would add up, so you'd get $\varphi_z=\varphi_x+\varphi_y$. But in your formulation, with the flipped sign for $b$, you'd negate $\varphi_x$ and therefore would get $\theta=\varphi_z=\varphi_y-\varphi_x$. That's the reason why you can talk about the angle between the vectors. It's the decomposition of that relative rotation into its Cartesian coordinates which yields the trigonometric functions of your geometric interpretation. Your formula would be nicely represented as

$$\lVert x\rVert^2\cdot\lVert y\rVert^2 = \lVert \bar x\cdot y\rVert^2$$

You can do the same for the quaternion case, where you'd negate the signs of $x_{2,3,4}$ and obtain a different but just as valid formula, using

\begin{align*} z_1 &= \phantom+x_1y_1+x_2y_2+x_3y_3+x_4y_4 \\ z_2 &= -x_2y_1+x_1y_2+x_4y_3-x_3y_4 \\ z_3 &= -x_3y_1-x_4y_2+x_1y_3+x_2y_4 \\ z_4 &= -x_4y_1+x_3y_2-x_2y_3+x_1y_4 \end{align*}

Using that formulation, you could treat each quaternion as the product of a real scalar factor (the scaling component) and a unit quaternion (the rotation component). Then you could interpret the conjugate quaternion as having the same scale factor but the opposite rotation. You could therefore interpret the product $z=\bar x\cdot y$ as a combination of the product of the scale factors and the difference of the rotations (i.e. as a relative rotation), and could give geometric meaning to that relative rotation.

The problem here is the fact that you can't express rotations in three-space as easily using trigonometric functions. The most elegant descriptions are quaternions. Therefore I wouldn't attempt to break this down to trigonometric functions, but leave it at this abstract level of geometric interpretation.

Regarding the privilege of the first axis you perceived: in the quaternion world, the real unit is indeed different from the three imaginary units, so a slight asymmetry there is to be expected. On the other hand, once you square things, you can easily flip signs inside each of the parentheses. If you flip all signs for the $z_1$ formula, than each of the $z_{1234}$ (from your formulation) would have one minus sign and three plus signs. You'd still have differences how you mix terms, but that's because even your relative rotation cannot be described by a single number, but instead has to make reference to some coordinate system. So you have to expect more dependence on coordinate systems there, even though the geometric interpretation as I presented it doesn't rely on that.

I don't know enough about the geometric interpretation of octonions to extend my answer in the direction of the sum-of-eight-squares formula. The Wikipedia article on normed algebras suggests that at least my main point, $\lVert x\rVert^2\cdot\lVert y\rVert^2=\lVert x+y\rVert^2$ would still apply, so considering octonions as the source of that identity seems right, with or without geometric interpretation.