## When does ‘positive’ imply ‘sum of squares’?

Does anyone have examples of when an object is positive, then it has (or does not have) a square root? Or more generally, can be written as a sum of squares?

Example. A positive integer does not have a square root, but is the sum of at most 4 squares. (Lagrange Theorem). However, a real positive number has a square root.

Another Example. A real quadratic form that is postive definite (or semi-definite) is, after a change of coordinates, a sum of squares. How about rational or integral quadratic forms?

Last Example. A positive definite (or semidefinite) real or complex matrix has a square root. How about rational or integral matrices?

Do you have other examples?

-
This feels community wiki-ish. – Jonas Meyer Dec 16 2009 at 4:49
I think the word to Google is "Positivstellensatz"... – Yemon Choi Dec 16 2009 at 6:24

For many examples of this kind, see Olga Taussky, "Sums of squares", Amer. Math. Monthly 77 (1970) 805-830.

-
 Thanks for the reference. – Colin Tan Dec 16 2009 at 8:13

As has been pointed out in Tony Carbery's answer, a positive polynomial over $\mathbb{R}$ in two or more variables need not be a sum of squares. However, Bill Helton showed in 2002 that this does hold for polynomials in noncommuting variables!

Helton, J. William. "Positive'' noncommutative polynomials are sums of squares. Ann. of Math. (2) 156 (2002), no. 2, 675–694. http://www.jstor.org/stable/3597203.

-

One other case that seems to be missing from the comments above (but most likely not from the references in there) is the 1888 result of Hilbert that all nonnegative ternary quartic forms (and bivariate quartic polynomials) are sums of squares of polynomials.

Of the same flavor of the type of questions you have raised, it is an open problem to determine if a polynomial with rational coefficients that is a sum of squares of polynomials (with possibly real coefficients) can also be written as a sum of squares of polynomials with rational coefficients. See e.g. Section 3 of http://www.msri.org/people/members/chillar/files/rationallmisos.pdf

-

A very nice example, due to Motzkin, found I think after the publication of Taussky's American Math. Monthly paper referred to in the answer by Michael Lugo, is

$$x^2y^4 + x^4y^2 +1 - 3 x^2y^2$$

which can also be written as

$$\frac{x^2y^2(x^2 + y^4 -2)^2(x^2 + y^2 +1) +(x^2 - y^2)^2} {(x^2 + y^2)^2},$$

yet is not a sum of squares of polynomials. (I learnt this example in a talk by K. Schmudgen.)

-
 Is it true, then, that a positive quadratic form $f(x,y) \in \mathbb{Z}[x,y]$ can be written as a sum of squares in the fraction field $\mathbb{Q}(x,y)$? One could imagine obvious exceptions where the denominator is a sum of squares, so perhaps the correct question is: can any positive function in $\mathbb{Q}(x,y)$ be written as a sum of squares and inverses of sums of squares? – Ryan Reich May 10 2011 at 1:33 In any field, nonzero sums of squares form a multiplicative group. (Pfister has shown that the same holds for sums of $2^n$ squares for any natural number $n$.) In particular, inverses of sums of squares are themselves sums of squares, since $(\sum_ia_i^2)^{-1}=\sum_i(a_i/a)^2$, where $a=\sum_ia_i^2$. – Emil Jeřábek May 10 2011 at 11:16

Let $f:(a,b)\rightarrow{\mathbb R}$ be a function. If $f(x)=g(x)^2$, then $f$ is non-negative and inherits the regularity of $g$. Conversely, let us assume that $f\ge0$ and $f\in{\mathcal C}^k$. What can be said about a square root $g$ ?

If $f$ is ${\mathcal C}^2$, then $f$ admits a ${\mathcal C}^1$ square root (T. Mandai, 1985). If $f$ is ${\mathcal C}^4$, then $f$ admits a twice differentiable square root $g$ (Alekseevskiĭ et al., 1988). However, $g$ might not be ${\mathcal C}^2$ (Bony et al., 2006).

-

For $x$ a self adjoint element of a $C^*$ algebra it is equivalent:

1. $x$ has non negative spectrum
2. $x$ has a self adjoint square root $x=y^2$
3. $x$ is a finite sum of squares $x=\sum {a_i}^*a_i$

in this case $x$ is indeed called positive.

-
 A square root of x typically means an element whose square is x. "x = y*y for some y" is one characterization; "x has a self-adjoint square root" is another. – Jonas Meyer Apr 23 2010 at 6:09 In fact in this situation the square root can always be choosen self adjoint. I edited my post. – Jan Weidner Apr 23 2010 at 9:26

The existence of the $[r, s, n]$ sum of square formula:

$(x_1^2+ \ldots +x_r^2) \cdot (y_1^2+ \ldots +y_s^2) = (z_1^2+ \ldots +z_n^2)$

is related to the existence of an axial map of projective spaces:

$P^{r - 1} \times P^{s-1} \to P^{n-1}$

There is a recent work extending this formula to some fields of non-zero characteristic:

http://www.uoregon.edu/~ddugger/ksum.pdf

-

I believe another recent question contains an answer:

Hilbert's 17th problem asked if a nonnegative real polynomial is the sum of squares of rational functions. It was answered affirmative by Artin in around 1920.

-
That question was posted after this question by the same poster. – Jonas Meyer Dec 17 2009 at 9:39

There is Fejér-Riesz Theorem: a nonnegative trigonometric polynomial can be expressed as the square of the norm of a complex polynomial.

Fejér-Riesz Theorem generalizes from trigonometric polynomials to integrable functions as Szegö’s Theorem.

-

I think your question lives most naturally in the category of ordered rings.

Here is one example: a field can be ordered iff it is formally real: i.e., iff -1 is not a sum of squares. However, more is true: if x is any element of a field K of characteristic different from 2 which is not a sum of squares, then there exists an ordering < on K in which x is negative. Thus any field which admits more than one ordering will have positive elements which are not sums of squares. For example, in Q(\sqrt{2}), with the usual convention, \sqrt{2} is positive, but it is not a sum of squares, because in a different ordering (here, an adjustment of the given ordering by a field automorphism!) it is negative.

Another Example: No, a positive definite rational or integral quadratic form need not be equivalent to a sum of squares. For instance the quadratic forms x^2 + y^2 and x^2 + 2y^2 are not equivalent over Q. For one thing, the discriminant of the quadratic form (= the product of the coefficients, for a diagonal quadratic form) is well-determined up to a square in the ground field. So it comes back to the fact that in R, every positive number is a square, but not in Q.

For matrices: look at the 1x1 case!

As was alluded to before, another case of this is Hilbert's 17th problem: let K be an ordered field with real closure R. (For simplicity just take K = R = real numbers!) Let f in K(x_1,..,x_n) be a rational function such that for all (a_1,...,a_n) in R^n at which f is defined, f(a_1,...,a_n) >= 0. Then there are rational functions g_1,l..,g_m in K(x_1,...,x_n) such that f = g_1^2 + ... + g_m^2.

-

An element of $\mathbb{R}[x]$ is a sum of two squares if it is nonnegative as a function on $\mathbb{R}$. This can be seen by noting that its real roots have even multiplicity, its irreducible quadratic factors are of the form $(x-a)^2+b^2$, a product of sums of two squares is a sum of two squares, and a square times a sum of two squares is a sum of two squares.

See Qiaochu's question on Hilbert's 17th problem for what happens in more than one variable.

-
This was in fact a Putnam problem a few years ago. – Nick Salter Dec 16 2009 at 20:38