TITLE: "Pythagoras number" for integral matrices
QUESTION [11 upvotes]: It is classically known that every positive integer is a sum of at most four squares of integers, i.e. every sum of squares of integers is a sum of four squares of integers. Now consider a symmetric $n\times n$ matrix $M$ with integer entries which can be written as $M= Q^{\rm T} Q$ for an $m \times n$ matrix $Q$ with integer entries. Can we bound $m$ in some way? I.e. is there a constant $c(n)\in \mathbb{Z}$ depending only on $n$ such that in this situation we can always find a decomposition $M= \widetilde{Q}^{\rm T} \widetilde{Q}$ for a $c(n) \times n$ matrix $\widetilde{Q}$ with integer entries? What is the smallest possible such constant (perhaps even linear growth?)?
If we look at the same situation over the polynomial ring $\mathbb{R}[T]$ in one variable, we have the following: Every sum of squares in $\mathbb{R}[T]$ is a sum of two squares and  one can show that $c(n)$ grows linearly in $n$: $c(n)=2n$. Thus, I hope that a similar result might hold over the integers too. Perhaps $c(n)$ even grows linearly in $n$?
Is someone aware of something in that direction?

REPLY [4 votes]: In Maria Icaza's Ohio State PhD thesis (1992?) she established the following result.  For any positive integer $n$, let $S(n)$ be the set of $\mathbb Z$-lattices (or integral quadratic forms, if one prefers polynomials) of rank $n$ that can be represented by some sums of squares.  Then there exists an integer $g(n)$ such that all lattices in $S(n)$ are represented by $g(n)$ number of squares.  She also obtained an explicit upper bound on $g(n)$, which is certainly not optimal.  All of these were published later in a couple of papers which you can find in MathSciNet.  
Precise values of $g(n)$ are known up to $n = 6$.  For $n \leq 5$, $g(n) = n + 3$.  However, $g(6) = 10$ which was proved by M-H Kim and B-K Oh in the 90's (in Journal of Number Theory).  Later they obtained much better upper bounds for $g(n)$ in a series of papers.