Search the corpus

    Every finite-field element is a sum of two squares

    P-7CR65

    Area
    Algebra
    Topics
    Finite Fields, Number Theory
    Status
    draft

    Show that every element in a finite field can be written as the sum of two squares.

    Solution

    Let \(K\) be a finite field and let \(a\in K\).

    1. If \(\operatorname{char}K=2\), then \(a\) is itself a square.

    The Frobenius map \[ \Phi:K\longrightarrow K,\qquad x\longmapsto x^2 \] is injective because \(K\) is a field. Since \(K\) is finite, it is therefore surjective. Hence \(a=x^2\) for some \(x\in K\), and \[ a=x^2+0^2. \]

    2. Suppose \(\operatorname{char}K\ne2\). The set of squares\[ S=\{x^2:x\in K\} \]has cardinality\[ |S|=\frac{|K|+1}{2}. \]

    The element \(0\) has the unique square root \(0\). Every nonzero square has exactly two square roots \(x\) and \(-x\), which are distinct because the characteristic is not \(2\). Thus the \(|K|-1\) nonzero elements contribute \((|K|-1)/2\) nonzero squares, and including \(0\) gives the formula.

    3. If \(\operatorname{char}K\ne2\), then \(a\) is a sum of two squares.

    The translate \[ a-S=\{a-s:s\in S\} \] has the same cardinality as \(S\). By 2, \[ |S|+|a-S|=|K|+1>|K|. \] Therefore the two subsets of the finite set \(K\) intersect. Choose \(z\in S\cap(a-S)\). Then \[ z=x^2 \] for some \(x\in K\), and \[ z=a-y^2 \] for some \(y\in K\). Hence \[ a=x^2+y^2. \]

    4. Every element of every finite field is a sum of two squares.

    The characteristic is either \(2\), handled by 1, or is odd, handled by 3.