Let $n$ be a positive integer. Let $E_n$ be the set of integers which are the sum of $n$ squares.
Let $F_n$ be the set of integers of the form $\Vert A \Vert^2$ with $A \in M_n(\mathbb{Z})$. Then $E_n \subseteq F_n$ because: $$\left\| \pmatrix{a_1&0& \cdots\\ \vdots & \vdots& \\ a_n&0& \cdots} \right\|^2 = \sum_{i=1}^n a_i^2.$$ Note that the case $n=3$ is exceptional, because $E_n= F_n$ $\forall n \neq 3$, whereas $E_3 \subsetneq F_3$:

  • obviously $E_1=F_1$,
  • it is proved here that $E_2=F_2$,
  • for $n \ge 4$, $E_n=F_n$ because $E_4 = \mathbb{N}$, by Lagrange's four square theorem,
  • finally, $E_3 \subsetneq F_3$ because $\forall n \le 2000$, $n \in F_3$ (by computation below), whereas:

    Legendre's three-square theorem
    A natural number can be represented as the sum of three squares of integers if and only if it is not of the form $4^n(8m+7)$ for integers $n,m \ge 0$.

Question: Which integers are contained in $F_3$?

The computation suggests that $F_3$ contains every natural number, so (if it is true) we are reduced to prove that it contains those of the form $4^n(8m+7)$, by Legendre's three-square theorem.


sage: L=[]
....: for a2 in range(33):
....:     for a4 in range(33):
....:         for a5 in range(33):
....:             for a7 in range(33):
....:                 for a8 in range(33):
....:                     n=numerical_approx(matrix([[0,a2,0],[a4,a5,0],[a7,a8,0]]).norm()^2,digits=10)
....:                     if n.is_integer():
....:                         L.append(int(n))
....: l=list(set(L))
....: l.sort()
....: l[2095]

1 Answer 1


Short version

$$\left\| \pmatrix{a&0&0\\ b&0&0 \\ c&0&0} \right\|^2 = a^2+b^2+c^2 \ \text{ and } \ \left\| \pmatrix{a&a&0\\ b&-c&0 \\ c&b&0} \right\|^2 = 2a^2+b^2+c^2.$$
These two forms together cover every natural number by Theorems I and V in this paper of L.E. Dickson.

Long version

Recall that $\Vert A \Vert^2$ is just the largest eigenvalue of $A^*A$. Take $a_i,b_i \in \mathbb{Z}$ and $$A=\pmatrix{a_1&b_1&0\\ a_2&b_2&0 \\ a_3&b_3&0}$$ Then $$ A^*A = \pmatrix{a_1^2 + a_2^2 + a_3^2&a_1b_1 + a_2b_2 + a_3b_3&0\\ a_1b_1 + a_2b_2 + a_3b_3&b_1^2 + b_2^2 + b_3^2&0 \\ 0&0&0}$$

We deduce its characteristic polynomial and the largest root. It follows that $$\Vert A \Vert^2 = \frac{1}{2} \left( \sum_{i=1}^3 (a_i^2 +b_i^2) + \sqrt{\left(\sum_{i=1}^3 (a_i^2 +b_i^2)\right)^2 -4\sum_{i<j}(a_ib_j-a_jb_i)^2} \right)$$

Let $u=\pmatrix{a_1\\ a_2 \\ a_3}$, $v=\pmatrix{b_1\\ b_2 \\ b_3}$, and $u\times v$ be their cross product. Then, observe that

$$\Vert A \Vert^2 = \frac{1}{2} \left( \Vert u \Vert^2 + \Vert v \Vert^2 + \sqrt{\left(\Vert u \Vert^2 + \Vert v \Vert^2\right)^2 -4 \Vert u \times v\Vert^2} \right)$$

Recall that $ \Vert u \times v \Vert^2 + (u \cdot v)^2 = \Vert u \Vert^2\Vert v \Vert^2$, with $u \cdot v$ the dot product. Then

$$\Vert A \Vert^2 = \frac{1}{2} \left( \Vert u \Vert^2 + \Vert v \Vert^2 + \sqrt{\left(\Vert u \Vert^2 - \Vert v \Vert^2\right)^2 +4 (u \cdot v)^2} \right)$$

Assume that $\Vert u \Vert = \Vert v \Vert$. Then $$ \Vert A \Vert^2 = \Vert u \Vert^2+ \vert u \cdot v \vert.$$

For any $u= \pmatrix{a\\ b \\ c} \in \mathbb{Z}^3$, take $v= \pmatrix{a\\ -c \\ b}$. Then $$ \Vert A \Vert^2 = 2a^2+b^2+c^2.$$

By Theorem V in this paper of L.E. Dickson, the above form represents every natural numbers not of the form $2^{2n+1}(8m+7)$. But this last is in $E_3$ by Legendre's three-square theorem, and we already know that $E_3 \subset F_3$. The result follows. $\square$

Bonus problem: Find a proof with $A \in M_3(\mathbb{N})$.

For fun: a classification of the natural numbers by angles

Recall that $\Vert u \times v\Vert^2 = \Vert u \Vert^2 \Vert v \Vert^2 \sin^2(u,v)$. Let's recall the above matrix $A$ as $A_{u,v}$. Consider the angle $$\alpha(n):=\min_{u,v \in \mathbb{Z}^3}\{\text{angle}(u,v) \in [0,2\pi) \text{ such that } \Vert A_{u,v} \Vert^2 = n \}.$$

Theorem: $\alpha(n) = 0$ if and only if $n \in E_2E_3$.
proof: Note that $\alpha(n) = 0$ iff $\exists u,v \in \mathbb{Z}^3$ with $\Vert A_{u,v} \Vert^2 = n$ and $u \times v = 0$ (i.e. collinear), iff $\exists r \in \frac{1}{\gcd(u)}\mathbb{Z}$ such that $v=ru$, with $\gcd(u)$ the greatest common divisor of $u_1, u_2$ and $u_3$. Then $$\Vert A \Vert^2= (r^2+1)\Vert u \Vert^2.$$

For any $u'= \pmatrix{a\\ b \\ c} \in \mathbb{Z}^3$ and any $s,t \in \mathbb{Z}$, assume that $u=su'$ (so that $s | \gcd(u)$) and $r=t/s$. Then $$\Vert A \Vert^2= (t^2+s^2)\Vert u' \Vert^2 = (t^2+s^2)(a^2+b^2+c^2).$$
The result follows. $\square$

By above material with $\vert u \cdot v \vert^2 = \Vert u \Vert^2 \Vert v \Vert^2 \cos^2(u,v)$, we have:
Lemma: $\alpha(2a^2+b^2+c^2) \le \arccos(\frac{a^2}{a^2+b^2+c^2})$.

Then, $\alpha(7) \in (0,\theta]$, with $\theta = \arccos(1/6) \simeq 1.403348 \text{ rad} \simeq 80.4°$

  • $\begingroup$ Congratulations, this is nicely done. $\endgroup$
    – user1551
    Oct 24, 2018 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.