# Algebraic vector proof of Lagrange's identity

$$|v · w| ^2 + |v × w| ^2 = |v|^2 |w|^2$$

Edit

Despite doing it multiple times it seems I have made a meal of the expansion see Jean-Claude's answer for a great explanation

Using $v = (v_1,v_2,v_3)$ and $w = (w_1, w_2, w_3)$ i have expanded the LHS and gotten

$$(v_2)^2(w_3)^2 + (v_3)^2(w_2)^2 + (v_3)^2(w_1)^2 + (v_1)^2(w_3)^2 + (v_1)^2(w_2)^2 + (v_2)^2(w_1)^2 +(v_1)^2(w_1)^2 + (v_2)^2(w_2)^2 + (v_3)^2(w_3)^2 -\mathbf{2(v_2 w_3 w_2 v_3 + v_3 w_1 v_1 w_3 + v_1 w_2 v_2 w_1)}$$

Now this is RHS minus the bolded terms and I dont know how to get rid of the bolded terms.

-

You have

\begin{align*} |v\cdot w|^2 &= (v_1w_1+v_2w_2+v_3w_3)^2 \\ &= v_1^2w_1^2 + v_2^2w_2^2 + v_3^2w_3^2 + 2v_1w_1v_2w_2 + 2v_2w_2v_3w_3 + 2v_3w_3v_1w_1 \text{.} \\ v\times w &= \begin{pmatrix}v_2w_3-v_3w_2 \\ v_3w_1-v_1w_3 \\ v_1w_2-v_2w_1\end{pmatrix} \text{.} \\ |v\times w|^2 &= (v_2w_3-v_3w_2)^2+ (v_3w_1-v_1w_3)^2 +(v_1w_2-v_2w_1)^2 \\ &= v_2^2w_3^2+v_3^2w_2^2-2v_2w_2v_3w_3+v_3^2w_1^2+v_1^2w_3^2-2v_1w_1v_3w_3 \\ &\qquad {} + v_1^2w_2^2+v_2^2w_1^2-2v_1w_1v_2w_2 \text{.} \\ |v\cdot w|^2+|v\times w|^2 &= v_1^2w_1^2+v_2^2w_2^2+v_3^2w_3^2+v_2^2w_3^2+v_3^2w_2^2+v_3^2w_1^2+v_1^2w_3^2 \\ &\qquad {} + v_1^2w_2^2+v_2^2w_1^2 \\ &= v_1^2(w_1^2+w_2^2+w_3^2)+v_2^2(w_1^2+w_2^2+w_3^2)+v_3^2(w_1^2+w_2^2+w_3^2) \\ &= (v_1^2+v_2^2+v_3^2)(w_1^2+w_2^2+w_3^2) \\ &= |v|^2|w|^2 \text{.} \end{align*}

-
Ok, I expanded the terms wrong thanks for your help – AustralianSuper Mar 27 at 9:32

I can't help but post a neat proof of this identity that I just thought of. Remember the unit basis vectors $\vec i,\vec j, \vec k$? They get their names from the quaternions, which take the general form $a+bi+cj+dk$; for more see https://en.wikipedia.org/wiki/Quaternion.

Any way, consider $v$ and $w$ as quaternions with real part $0$ (that is, $a=0$). Then $vw$ has real part $-v\cdot w$ and imaginary part $v\times w$. The squared norm of this quaternion is therefore $|v\cdot w|^2+|v\times w|^2$. On the other hand since the norm is multiplicative, this is also $|v|^2|w|^2$.

-
I can't understand, because $v,w$ are in $\mathbb R^n$, while quaternions is like $\mathbb R^4$. – user217174 Mar 27 at 10:24
$v$ and $w$ live in $\mathbb R^3$, because there is a cross product in the problem statement! – pre-kidney Mar 27 at 11:42
Oh! yes, thanks. – user217174 Mar 27 at 11:58
However, to use this you have similar identities to prove on quaternions (see here). Anyway, it's a very nice way to see the problem. – Jean-Claude Arbaut Mar 27 at 23:58

Hint:

You are wrong because you have not calculated the double product terms for the dot product that are the same as your bold term ( but positive).

For a simpler proof use the fact:

$$|\vec v \cdot \vec w|^2=|\vec v|^2|\vec w|^2\cos^2 \theta \qquad |\vec v \times \vec w|^2=|\vec v|^2|\vec w|^2\sin^2 \theta$$ where $\theta$ is the angle between the two vectors.

-
We used the Lagrange identity to find the sin formula. I am aware that the question becomes much easier with the trig identities. I was wondering if there was a way to get rid of the bolded terms. Thanks though – AustralianSuper Mar 27 at 9:25
I have added to my answer. Anyway the only trig formula you need is $\cos^2 \theta + \sin^2 \theta=1$. – Emilio Novati Mar 27 at 9:32
Yes thanks for that I have just realised. I've done the proof your way as well. – AustralianSuper Mar 27 at 9:36

I think it is easiest simply to note that the cross terms from the three cross product terms $$-2u_2v_2u_3v_3,\,-2u_3v_3u_1v_1,\,-2u_1v_1u_2v_2$$ cancel with the three cross terms from the dot product term $$2u_2v_2u_3v_3,\,2u_3v_3u_1v_1,\,2u_1v_1u_2v_2$$ Then we are left with the squares of the products of all terms with distinct indices $$u_2^2v_3^2,\,u_3^2v_2^2,\,u_3^2v_1^2,\,u_1^2v_3^2,\,u_1^2v_2^2,\,u_2^2v_1^2$$ from the cross product and the squares of all terms with identical indices $$u_1^2v_1^2,\,u_2^2v_2^2,\,u_3^2v_3^2$$ from the dot product. That is, \begin{align} &(u_2v_3-u_3v_2)^2+(u_3v_1-u_1v_3)^2+(u_1v_2-u_2v_1)^2+(u_1v_1+u_2v_2+u_3v_3)^2\\ &=\left(u_1^2+u_2^2+u_3^2\right)\left(v_1^2+v_2^2+v_3^2\right) \end{align}

-

As both sides of the equality are homogeneous, you may assume that $v$ and $w$ are unit vectors. The two sides are also invariant under rotation of coordinate frame. So, you may further assume that $v=(1,0,0)^T$. The equality then reduces to $w_1^2+(w_2^2+w_3^2)=1$, which is true because $w$ is a unit vector.

Edit. Alternatively, write $w=u+z$, where $u\parallel v$ and $z\perp v$. Then $$|v\cdot w|^2+|v\times w|^2 =|v\cdot u|^2+|v\times z|^2 =|v|^2|u|^2+|v|^2|z|^2=|v|^2|w|^2.$$

-