# Sums of squares are closed under division [closed]

Surprisingly, we got only one question for our 2-hour exam and I think nobody solved it. Here is the problem:

Assuming that $K$ is a field, show that $S$ is stable under addition, multiplication and division, where $S$ is defined as follow: $$S=\left\{\sum_{i=1}^{n}{x_i}^2 \mid n\in \Bbb N ,\ x_i\in K\right\}.$$

• @Servaes it is likely meant that if $x,y\in S$ and $y\neq0$ then $xy^{-1}\in S$. Since $S$ is stable under multiplication and $1\in S$ this is equivalent to $y^{-1}\in S$ whenever $y\in S, y\neq0$. Jan 28, 2017 at 13:04
• Addition: Trivial. Any sum of two finite sums of squares is a finite sum of squares. Multiplication: Trivial. Any product of two squares is a square and the distributive property shows that a product of two finite sums has finitely many terms. Jan 28, 2017 at 13:04
• I downvoted because the question and subsequent comment show no effort whatsoever. Jan 28, 2017 at 13:09
• @Servaes my efforts are irrelevants , I still think about the problem .. when I got something I will post it don't worry Jan 28, 2017 at 13:11
• I disagree. See also this meta post and its top voted answer, and the answers' top voted comment. But feel free to disagree, it's just a downvote. Jan 28, 2017 at 13:11

Addition: Trivial. Any sum of two finite sums of squares is a finite sum of squares.

Multiplication: Trivial. Any product of two squares is a square and the distributive property shows that a product of two finite sums has finitely many terms.

Division: Suppose that $a=\sum_{i=1}^n x_i^2$ is not zero. We would like to show that $a^{-1}\in S$ (using s.harp's comment). If $n=1$, then the inverse of $a$ is trivial. The first interesting case is when $n=2$ Suppose that $a=x_1^2+x_2^2$.

Now, $$\frac{1}{x_1^2+x_2^2}=\frac{x_1^2+x_2^2}{(x_1^2+x_2^2)^2}=\left(\frac{x_1}{x_1^2+x_2^2}\right)^2+\left(\frac{x_2}{x_1^2+x_2^2}\right)^2$$ The denominators are OK because this is a field. All higher $n$'s are generalizations of this case.

• Very nice observation!
– user384138
Jan 28, 2017 at 13:24
• We posted at the same time. +1 Jan 28, 2017 at 13:24
• how can we generalise this ? Jan 28, 2017 at 19:27
• @Seginus The obvious generalization where you replace the square by any other power should also work. For other generalizations, perhaps it would be good to open a new question so that it gets more attention. Jan 28, 2017 at 19:48
• @Segmus In fact it generalizes further than powers, e.g. see the remark in my answer. Jan 29, 2017 at 18:21

$$\frac{1}{x_1^2+x_2^2+x_3^2}=\frac{x_1^2}{(x_1^2+x_2^2+x_3^2)^2}+\frac{x_2^2}{(x_1^2+x_2^2+x_3^2)^2}+\frac{x_3^2}{(x_1^2+x_2^2+x_3^2)^2}$$

• Posting at the same time +1 Jan 28, 2017 at 13:25

\begin{align}{\bf Hint} \ \ a\neq 0\ \Rightarrow&\ \ \color{#c00}{a^{\large -2}} =\, (a^{\large -1})^{\large 2} \in S\ \ \text{by\,S\,$contains all squares}\\ {\rm so}\ \ \ a\in S\ \Rightarrow&\ \ a^{\large -1} =\, a\cdot \color{#c00}{a^{\large-2}}\in S\ \ \text{by$\,S\,is closed under multipication} \end{align}

Remark  You asked how it generalizes. The above idea works not only for squares, but for any positive power, i.e. we can obtain $\,a^{-1}\,$ from any of its positive powers via $\,a^{\large -1} = a^{\large n-1}(a^{\large -1})^{\large n}.$ Also the only property of squares (or powers) employed in proving multiplicative closure is that they are closed under multiplication. These observations lead to the following generalization.

Theorem  Suppose $K$ is a field, $M$ is a subset of $K$ and $S$ is the set of all sums of elements of $M.$

$(1)\ \ S$ is closed under multiplication if $M$ is closed under multiplication.

$(2)\ \ S$ is closed under division (by all nonzero elements) if $S$ is both closed under multiplication, and every $\,a\in K$ has some positive power $\,a^{\large n}\in S.$

Proof $\ (1)\,$ is an immediate consequence of the distributive law. $\ (2)\$ follows as above, namely if $\,0\neq s\in S\,$ then by hypothesis $\,(s^{\large -1})^{\large n}\in S\,$ for some $\,n\geq 1\,$ thus $\,s^{\large n-1}(s^{\large -1})^{\large n} = s^{\large -1}\in S\,$ because $S$ is closed under multiplication. Hence $\,a\in S\,\Rightarrow\,as^{-1} = a/s\in S,\,$ so $S$ is closed under division.

• I found this question 9 hours late (from the Hot List). but I'll add this answer anyhow since I think it clarifies closure under inverses, hence closure under division (the only tricky part). Jan 28, 2017 at 22:25