5.12. a) Represent as a sum of squares

\[
\left(a_{1}^{2}+a_{2}^{2}+a_{3}^{2}\right)\left(b_{1}^{2}+b_{2}^{2}+b_{3}^{2}\right)-\left(a_{1} b_{1}+a_{2} b_{2}+a_{3} b_{3}\right)^{2}
\]

b) Represent as a sum of squares

\[
\left(a_{1}^{2}+\ldots+a_{n}^{2}\right)\left(b_{1}^{2}+\ldots+b_{n}^{2}\right)-\left(a_{1} b_{1}+\ldots+a_{n} b_{n}\right)^{2}
\]

(Lagrange's identity).

## 5.4. Auxiliary identities
5.12. a) $\left(a_{1} b_{2}-a_{2} b_{1}\right)^{2}+\left(a_{2} b_{3}-a_{3} b_{2}\right)^{2}+\left(a_{1} b_{3}-a_{3} b_{1}\right)^{2}$.

b) $\sum\left(a_{i} b_{j}-a_{j} b_{i}\right)^{2}$, where the summation is over all pairs $i<j$.