Quadratic Equations in Finite Fields of Characteristic 2: 1 The General Solution
Quadratic Equations in Finite Fields of Characteristic 2: 1 The General Solution
Klaus Pommerening
Quadratic equations over fields of characteristic 6= 2 are solved by the well known
quadratic formula that up to rational operations reduces the general case to the square
root function, the inverse of the square map x 7→ x2 . The solvability of a quadratic
equation can be decided by looking at the discriminant—essentially the argument of the
square root in the formula.
The situation in characteristic 2 is somewhat different.
1
nor surjective. Its kernel is the set of elements x with x2 = x, that is the prime field
F2 inside of K. The preimages u and u + 1 of a given element d ∈ K may be found
in K or in a quadratic extension L = K(u) of K. To get the roots of f we set d = ac b2
and determine a preimage u of d under the Artin-Schreier map. Then a root of f is
x = bu b
a ; the other root is x + a .
Proof. g is irreducible in K[T ], if and only if it has no root in K. The addendum follows
because d + e has trace 0, hence has the form r2 + r. 3
2
Note 1. The lemma is a special case of Hilbert’s Theorem 90, additive form.
We have shown:
3 Examples
As we have seen the key to solving quadratic equations in characteristic 2 is solving
systems of linear equations whose coefficient matrix is the matrix of the Artin-Schreier
map, or the square map in the degenerate case. To explicitly solve quadratic equations
over a finite field K of characteristic 2 we first have to fix a basis of K over F2 . There are
several options, and none of them is canonical. One option is to build a basis successively
along a chain of intermediate fields between F2 and K.
For this we first consider a field extension L of K of degree 2. If K has 2n elements,
then the cardinality of L is 22n , and we may construct L from K by adjoining a root t
of an irreducible degree 2 polynomial T 2 + T + d ∈ K[T ] where Tr(d) = 1, see Lemma 1.
Then a basis of L over K is {1, t}, and if {u1 , . . . , un } is a basis of K over F2 , then
{u1 , . . . , un , tu1 , . . . , tun } is a basis of L over F2 .
Now the square map has the same effect on the ui in L as in K, and
If we denote by Qn resp. Q2n the matrices of the square maps of K or L with respect
to the chosen bases, then
Qn Ld Qn
Q2n = ,
0 Qn
3
where Ld is the matrix of the left multiplication by d in P
K. The QnPin the right lower
2
corner of the matrix comes from the fact that t · ui = t · qij uj = qij tuj where the
qij are the matrix coefficients of Qn .
Note that for odd n we may choose d = 1, hence Ld = 1n , the n × n unit matrix.
The matrix An of the Artin-Schreier map is 1n + Qn , this means that in Qn we
simply have to complement the diagonal entries, i. e. interchange 0 and 1.
The case n = 1
Let us first consider the simplest case K = F2 . Its F2 -basis is {1}, and the matrices
are the 1 × 1-matrices Qn = (1) and An = (0). Solving quadratic equations is trivial.
The case n = 2
The field F4 is an extension of F2 of degree 2. An F2 -basis is {1, t} where t2 = t + 1.
The general consideration above gives
1 1 0 1
Q2 = , A2 = .
0 1 0 0
Solving quadratic equations (in the nondegenerate case) amounts to finding a preimage
x = (x1 , x2 ) of b = (b1 , b2 ) in the 2-dimensional vectorspace F22 under A2 . This gives a
system of 2 linear equations over F2 :
x2 x1 b
= A2 = 1 .
0 x2 b2
This is solvable if and only if b2 = 0, and all (in fact two) solutions are
The case n = 3
The field F8 has an F2 -basis {1, s, s2 } where s3 + s = 1. The square map maps 1 7→ 1,
s 7→ s2 , s2 7→ s2 + s. We have the matrices
1 0 0 0 0 0
Q3 = 0 0 1 , A3 = 0 1 1 .
0 1 1 0 1 0
4
For preimages under the Artin-Schreier map we have the system of 3 linear equations
A3 x = b, or
0 b1
x2 + x3 = b2 .
x2 b3
It has a solution if and only if b1 = 0, and then its two solutions are
x1 arbitrary, x2 = b3 , x3 = b2 + b3 .
The case n = 4
The field F16 is an extension of F4 of degree 2 and has an F2 -basis {1, t, u, tu} where
u2 + u = t. We have
1 1 0 1 0 1 0 1
Q2 Lt Q2 0 1 1 0 0 0 1 0
Q4 = = , A4 = .
0 Q2 0 0 1 1 0 0 0 1
0 0 0 1 0 0 0 0
0 b4
x1 arbitrary, x2 = b1 + b3 , x3 = b2 , x4 = b3 .
The case n = 5
The field F32 has an F2 -basis {1, t, t2 , t3 , t4 } with t5 = t2 + 1. Squaring maps 1 7→ 1,
t 7→ t2 , t2 7→ t4 , t3 7→ t3 + t, t4 7→ t3 + t2 + 1. Therefore
1 0 0 0 1 0 0 0 0 1
0 0 0 1 0 0 1 0 1 0
Q5 = 0 1 0 0 1 , A5 = 0 1 1 0
1.
0 0 0 1 1 0 0 0 0 1
0 0 1 0 0 0 0 1 0 1
5
The system A5 x = b of 5 linear equations is
x5 b1
x2 + x4 b2
x2 + x3 + x5 = b3 .
x5 b4
x3 + x5 b5
It has a solution if and only if b1 = b4 , and then its two solutions are
x1 arbitrary, x2 = b3 + b5 , x3 = b1 + b5 , x4 = b2 + b3 + b5 , x5 = b1 .
The case n = 6
The field F64 is an extension of F8 of degree 2. Therefore—after choosing a suitable
basis—we have
1 0 0 1 0 0 0 0 0 1 0 0
0 0 1 0 0 1 0 1 1 0 0 1
Q3 Q3 0 1 1 0 1 1 0 1 0 0 1 1
Q6 = = , A6 = .
0 Q3 0 0 0 1
0 0
0
0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 1 1
0 0 0 0 1 1 0 0 0 0 1 0
x1 arbitrary, x2 = b3 + b5 , x3 = b2 + b3 + b6 , x4 = b1 , x5 = b6 , x6 = b5 + b6 .
The case n = 8
As a final example we consider F256 , a quadratic extension of F16 . It has a basis
{1, t, u, tu, v, tv, uv, tuv} with t and u as in F16 and v 2 = v + tu. By the general principle
6
and knowing Ltu we have
1 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0
0 1 1 0 0 0 1 1 0 0 1 0 0 0 1 1
0 0 1 1 0 1 1 1 0 0 0 1 0 1 1 1
0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1
Q8 = 0
, A8 = .
0 0 0 1 1 0 1
0
0 0 0 0 1 0 1
0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0