theorems on sums of squares
Theorem ().
Let $F$ be a field with characteristic^{} not $\mathrm{2}$. The sum of squares identity^{} of the form
$$({x}_{1}^{2}+\mathrm{\cdots}+{x}_{n}^{2})({y}_{1}^{2}+\mathrm{\cdots}+{y}_{n}^{2})={z}_{1}^{2}+\mathrm{\cdots}+{z}_{n}^{2}$$ 
where each ${z}_{k}$ is bilinear^{} over ${x}_{i}$ and ${y}_{j}$ (with coefficients^{} in $F$), is possible iff $n\mathrm{=}\mathrm{1}\mathrm{,}\mathrm{2}\mathrm{,}\mathrm{4}\mathrm{,}\mathrm{8}$.
Remarks.

1.
When the ground field is $\mathbb{R}$, this theorem is equivalent^{} to the fact that the only normed real division alternative algebra is one of $\mathbb{R}$, $\u2102$, $\mathbb{H}$, $\mathbb{O}$, as one observes that the sums of squares can be interpreted as the square of the norm defined for each of the above algebras^{}.

2.
An equivalent characterization is that the above four mentioned algebras are the only real composition algebras.
A generalization^{} of the above is the following:
Theorem (Pfister’s Theorem).
Let $F$ be a field of characteristic not $\mathrm{2}$. The sum of squares identity of the form
$$({x}_{1}^{2}+\mathrm{\cdots}+{x}_{n}^{2})({y}_{1}^{2}+\mathrm{\cdots}+{y}_{n}^{2})={z}_{1}^{2}+\mathrm{\cdots}+{z}_{n}^{2}$$ 
where each ${z}_{k}$ is a rational function of ${x}_{i}$ and ${y}_{j}$ (element of $F\mathit{}\mathrm{(}{x}_{\mathrm{1}}\mathrm{,}\mathrm{\dots}\mathrm{,}{x}_{n}\mathrm{,}{y}_{\mathrm{1}}\mathrm{,}\mathrm{\dots}\mathrm{,}{y}_{n}\mathrm{)}$), is possible iff $n$ is a power of $\mathrm{2}$.
Remark. The form of Pfister’s theorem is stated in a way so as to mirror the form of Hurwitz theorem. In fact, Pfister proved the following: if $F$ is a field and $n$ is a power of 2, then there exists a sum of squares identity of the form
$$({x}_{1}^{2}+\mathrm{\cdots}+{x}_{n}^{2})({y}_{1}^{2}+\mathrm{\cdots}+{y}_{n}^{2})={z}_{1}^{2}+\mathrm{\cdots}+{z}_{n}^{2}$$ 
such that each ${z}_{k}$ is a rational function of the ${x}_{i}$ and a linear function of the ${y}_{j}$, or that
$${z}_{k}=\sum _{j=1}^{n}{r}_{kj}{y}_{j}\mathit{\hspace{1em}\hspace{1em}}\text{where}{r}_{kj}\in F({x}_{1},\mathrm{\dots},{x}_{n}).$$ 
Conversely, if $n$ is not a power of $2$, then there exists a field $F$ such that the above sum of square identity does not hold for any ${z}_{i}\in F({x}_{1},\mathrm{\dots},{x}_{n},{y}_{1},\mathrm{\dots},{y}_{n})$. Notice that ${z}_{i}$ is no longer required to be a linear function of the ${y}_{j}$ anymore.
When $F$ is the field of reals $\mathbb{R}$, we have the following generalization, also due to Pfister:
Theorem.
If $f\mathrm{\in}\mathrm{R}\mathit{}\mathrm{(}{X}_{\mathrm{1}}\mathrm{,}\mathrm{\dots}\mathrm{,}{X}_{n}\mathrm{)}$ is positive semidefinite^{}, then $f$ can be written as a sum of ${\mathrm{2}}^{n}$ squares.
The above theorem is very closely related to Hilbert’s 17th Problem:
Hilbert’s 17th Problem. Whether it is possible, to write a positive semidefinite rational function in $n$ indeterminates over the reals, as a sum of squares of rational functions in $n$ indeterminates over the reals?
The answer is yes, and it was proved by Emil Artin in 1927. Additionally, Artin showed that the answer is also yes if the reals were replaced by the rationals.
References
 1 A. Hurwitz, Über die Komposition der quadratishen Formen von beliebig vielen Variabeln, Nachrichten von der Königlichen Gesellschaft der Wissenschaften in Göttingen (1898).
 2 A. Pfister, Zur Darstellung definiter Funktionen als Summe von Quadraten, Inventiones Mathematicae (1967).
 3 A. R. Rajwade, Squares, Cambridge University Press (1993).
 4 J. Conway, D. A. Smith, On Quaternions and Octonions, A K Peters, LTD. (2002).
Title  theorems on sums of squares 
Canonical name  TheoremsOnSumsOfSquares 
Date of creation  20130322 15:06:04 
Last modified on  20130322 15:06:04 
Owner  CWoo (3771) 
Last modified by  CWoo (3771) 
Numerical id  14 
Author  CWoo (3771) 
Entry type  Theorem 
Classification  msc 12D15 
Classification  msc 16D60 
Classification  msc 15A63 
Classification  msc 11E25 
Synonym  Pfister theorem 
Related topic  MazursStructureTheorem 
Related topic  SumsOfTwoSquares 
Related topic  StufeOfAField 
Related topic  CayleyDicksonConstruction 
Related topic  CompositionAlgebra 
Related topic  Octonion 
Defines  Hurwitz theorem 
Defines  Pfister’s theorem 
Defines  Hilbert’s 17th Problem 