# Sums of squares in characteristic 3

Suppose $K=\mathbb{F}_q$ is a finite field of characteristic 3. Suppose $q > 3$, then is it true that for all $x \in K$ there exists $a,b,c \in K^{\times}$ such that $x = a^2 + b^2 + c^2$ i.e, is every element the sum of 3 non-zero squares?

My [wrong] idea is: fix $x \in K$. Note that since $q > 3$, there exists $\gamma \in K$ such that $\gamma^2 = -1$. Case 1, if $x = k^2$ for some $k \in K$ then $x = k^2 + \gamma^2 + 1^2$. Case 2, if $x$ is not a square then I'd like to say that either $x + 1$ or $x-1$ is a square and so $x = k^2 + \gamma^2 + \gamma^2$ or $x = k^2 + 1^2 + 1^2$ for some $k \in K$.

But I'm not sure if it's true that, given $x \in K$, one of $x, x+1, x-1$ is a square.

Just realised my idea is nonsense since such a $\gamma$ needn't exist. Take $K = \mathbb{F}_{27}$

• You can add the [additive-combinatorics] tag. Also an idea that you might find useful. In any group $G$, let $S$ be a set of size greater than $|G|/2$. Then $S+S=G$ because for any $x \in G$, the two sets $S$ and $x-S$ must have an element in common. Apr 5 '17 at 11:49
• What you have is a set (non-zero squares), which is very close to half the size of the field (less by 1), but you are considering $S+S+S$, so a small modification to the above argument should work. Apr 5 '17 at 11:51

The following works for any finite field $K$ of char $\neq 2$ and size more than $5$.

Idea 0: In any finite group $G$, if $A$ is a set of size greater than $|G|/2$, then $A+A=G$.

Let $S$ be the set of non-zero squares in $K$ and $S_0=S \cup \{0\}$. Using Idea 0, we have: $K=S_0+S_0$.

Idea 1: It is sufficient to show that at least one square of $K^*$ belongs to $3S$, at least one non-square of $K^*$ belongs to $3S$, and $0 \in 3S$. This is because $3S$ is closed under multiplication by non-zero squares.

Idea 2: Let $a \in K$ with $a \notin \{-1,1\}$. Then $a$ can be written as $x^2-y^2$ with $x,y \neq 0$. Just take $x=(a+1)/2$ and $y=(a-1)/2$.

Claim 1: $K^* \subseteq S+S$.

From $K=S_0+S_0$, we know that every non-square can be written as $a^2+b^2$ and clearly $a,b \neq 0$. Thus, every non-square is in $S+S$. Now I show that all non-zero squares are in $S+S$. Using Idea 2, write a non-zero square not in $\{-1,1\}$ as $x^2-y^2$ with $x,y \neq 0$. This shows that $x^2 \in S+S$ and hence all non-zero squares are in $S+S$. This proves the claim.

Now consider $3S$ which contains $K^*+S$. Clearly, $|3S| \geq |K^*|$, therefore $3S$ misses at most one element of $K$. Using the fact that $3S$ is closed under multiplication by $S$, we see that it cannot miss any element other than zero.

To show that $0 \in 3S$, consider an arbitrary non-zero $a$ and write $-a^2=b^2+c^2$ with $b,c \neq 0$ using Claim 1.

We write $A+B$ for $\{a+b:a\in A, b\in B\}$.

When $\mathbb F$ is a finite field of order $3$ or $5$, not every element of $\mathbb F$ is a sum of $3$ nonzero squares: in $\mathbb F_3$ there is only one nonzero square, and in $\mathbb F_5$ the only nonzero squares are $1$ and $-1$.

For all other fields of odd order we have the following.

Proposition. If $\mathbb F$ is a finite field of odd order, and $|\mathbb F|\neq 3, 5$, then $\mathbb F = S+S+S$, where $S$ is the set of nonzero squares in $\mathbb F$.

This can be proved using only the cardinality of $S$.

Lemma. If $G$ is a finite abelian group of odd order $\neq 3,5$ and $A\subseteq G$ has $|A|=\frac{|G|-1}{2}$, then $A+A+A=G$.

Observing that $|S|=\frac{|\mathbb F|-1}{2}$ when $\mathbb F$ is a finite field of odd order, the Proposition is a special case of the Lemma.

To prove the Lemma we need:

Fact 1. If $A,B\subseteq G$ have $|A|+|B|>|G|$, then $A+B=G$.

Fact 1 follows from the observation that $(g-A)\cap B \neq \emptyset$ for every $g\in G$ whenever $|A|+|B|>|G|$.

We also need a theorem of Kneser (see Nathanson's book):

Theorem 1. If $A,B$ are finite subsets of an abelian group satisfying $|A+B|<|A|+|B|$ and $H$ is the group of elements $h\in G$ satisfying $A+B=A+B+h$, then $$|A+B| = |A+H|+|B+H| - |H|. \tag{1}\label{K}$$ The group $H$ is called the stabilizer of $A+B$.

(Theorem 1 is a special case of Satz 1 of Kneser's original article where $G$ is discrete.)

To prove the Lemma, assume $|G|>3$ (so that $|A|>1$) and consider two cases.

Case 1. $|A+A|\geq 2|A|.$ In this case we have $|A+A|+|A| > |G|$, so Fact 1 implies $A+A+A = G$.

Case 2. $|A+A|<2|A|.$ In this case Theorem 1 applies, so let $H$ be the stabilizer of $A+A$. Equation (\ref{K}) becomes $$|A+A| = 2|A+H| -|H|. \tag{2}\label{SpecialK}$$ Observe that $A+A=A+A+H = (A+H)+(A+H)$.

Claim. If $A+A+A\neq G$, then $|A+H|=|A|$, and $H = \{0\}.$

If $|A+H|>|A|$, then $2|A+H|>|G|$. Then Fact 1 and the identity $A+A = (A+H)+(A+H)$ imply $A+A=G$. So we conclude that $|A+H|=|A|$, meaning $A$ is a union of cosets of $H$. Consequently $|H|$ divides $|A| = \frac{|G|-1}{2}$, so $|H|$ is relatively prime to $|G|$. But $H$ is a subgroup of $G$, so its order divides $|G|$, and we conclude that $|H|=1$.

The Claim allows us to assume $|H|=1$, so Equation (\ref{SpecialK}) becomes $|A+A|=2|A|-1 = |G|-2$. Applying Fact 1 to $(A+A)+A$ we conclude that either $A+A+A=G$ or $|G|-2+|A| \leq |G|$. So if $A+A+A\neq G$, then $|A|\leq 2$, meaning $|G|=3$ or $|G|=5$. $\square$