Can every element of a finite field be written as a sum of two non-squares?

Leading off with the following.

If $g$ is a primitive element of a finite field then multiplication by $g$ takes a non-zero square to a non-zero non-square and vice versa.

So if we can represent $0$ as a sum of two non-squares, then multiplication by $g$ shows that $0$ can also be written as a sum of two squares: $$ 0=a^2+b^2. $$ This implies that $-b^2=a^2$ and a fortiori that $-1=(a/b)^2$ is a square. This is known to be the case in $\Bbb{F}_q$ if and only if $q\equiv1\pmod4$.

Consequently:

There exists arbitrarily large finite fields such that the element $0$ cannot be written as a sum of two non-squares of that field. More precisely, this happens in the field $\Bbb{F}_q$ whenever $q\equiv-1\pmod4$.


A more interesting result is that any non-zero element $z$ of a finite field $\Bbb{F}_q$, $q$ and odd number $>5$, can be written as a sum of two non-squares. This can be seen as follows.

Assume first that $z$ is a square. Then $g^{-1}z$ is a non-square. By the well- known result we can write it as a sum of two squares $$ g^{-1}z=x^2+y^2. $$ Because $g^{-1}z$ is a non-square, we can deduce that $x$ and $y$ must both be non-zero. This means that the elements $gx^2,gy^2$ are both non-squares, and $$ z=gx^2+gy^2 $$ is a presentation of the required type.

If $z=ga^2$ is a non-square then we need the result (see e.g. Ireland and Rosen) that the equation $$ x^2+y^2=1\qquad(*) $$ has $q-\eta(-1)$ solutions (here $\eta$ is the unique multiplicative character of order two, so equal to the Legendre symbol in the case of a prime field). The equation $(*)$ is equivalent to $$ a^2x^2+a^2y^2=a^2, $$ so the equation $x^2+y^2=a^2$, too, has $q-\eta(-1)\ge q-1$ solutions. At most $4$ of those solutions have either $x=0$ or $y=0$. So if $q>5$, then we are guaranteed the existence of elements $x\neq0\neq y$ such that $g^{-1}z=a^2=x^2+y^2$. Again, it follows that $$ z=gx^2+gy^2 $$ is a presentation of $z$ as a sum of two non-square.

The OP noted themself that in the fields of $3$ or $5$ elements there are too few non-squares. For example in $\Bbb{F}_5$ the only non-squares are $2$ and $3$, and we cannot write either of those as sums of two non-squares.

For the case of the prime fields the elegant solution by Mikhail Ivanov is surely better than this argument.


For prime fields its true for $p=4k+1>5$, and for all elements except 0 for $p=4k+3$.

  1. If $p=4k+3$, then $0$ cannot be written in this way.
  2. Now for non-zero elements. It's equivalent to prove that each element is the sum of two non-zero squares.

2a. For squares use such formula $$ a^2=\left(\frac35a\right)^2+\left(\frac45a\right)^2. $$

2b. Let $x$ be non-square without such decomposition. Then, of course, all non-square don't have such decomposition. Since $x-1$ is non-square (if not, then $x=1+a^2$), then $x-1$, $x-2$, $\dots$ $2$, $1$ are non-squares. Contradiction.