Chapter 5: Univariate Polynomials and Finite Fields

Gauss discovered the Fast Fourier Transform in 1805. He needed to predict the orbits of asteroids Pallas and Juno, so he wrote an algorithm that computed transforms in time instead of . He wrote it in Latin, in a notebook, and never published it. The algorithm waited 160 years for someone to notice.

Cooley and Tukey rediscovered it in 1965. They gave it a name. It became one of the most important algorithms in computing: MRI machines, audio compression, the entire edifice of digital signal processing. All of it built on mathematics that had been sitting, unread, in the papers of a man who died in 1855.

Why does the same algorithm keep appearing? Because the symmetries of roots of unity make it inevitable. Once you see the structure, the algorithm writes itself. Those symmetries now power zero-knowledge proofs.

This chapter develops the univariate polynomial paradigm: finite fields, roots of unity, and the techniques that make systems like Groth16, PLONK, and STARKs possible. Where Chapter 4 explored multilinear polynomials over the Boolean hypercube, here we explore a single variable of high degree over a very different domain.

Finite Fields: The Algebraic Foundation

Zero-knowledge proofs live in finite fields. Not the real numbers, not the integers; finite fields, where arithmetic wraps around and every division is exact.

A finite field consists of the integers with arithmetic modulo a prime . Addition and multiplication work as usual, then you take the remainder when dividing by :

The magic is in division. Every nonzero element has a multiplicative inverse: this is guaranteed because is prime. (More generally, finite fields exist for any prime power , but prime fields are the simplest case.) In , we have because . You can divide by any nonzero element, and the result is exact (no fractions, no approximations).

This is why we call it a field. A ring (like the integers ) lets you add, subtract, and multiply. A field lets you also divide. The integers are not a field because isn't an integer. But in , division always works: , since .

The nonzero elements form a cyclic group under multiplication. This is fundamental: there exists a generator such that every nonzero element is some power of .

Example in : The element generates everything:

Power

Every nonzero element appears exactly once. The powers cycle through all of before returning to 1.

For cryptographic applications, we use primes of 256 bits or more. The field is vast, roughly elements, making exhaustive search impossible.

Roots of Unity

Because is cyclic of order , it contains subgroups of every order dividing . The most useful are the roots of unity.

An element is an -th root of unity if . It's a primitive -th root if additionally for any : the smallest positive power that gives 1 is exactly .

If is a primitive -th root, the complete set of -th roots is:

This is a subgroup of order . It's the evaluation domain that powers univariate-based SNARKs.

Worked Example: Fourth Roots in

Take . The multiplicative group has order . Since divides , fourth roots of unity exist.

Is a primitive fourth root?

Yes. The fourth roots of unity are:

Notice the structure: and are negatives of each other, as are and . This is not a coincidence.

The Symmetries

Roots of unity have two key symmetries that enable fast algorithms.

Symmetry 1: Squaring Halves the Group

When is even:

Why is this true? Start with the defining property: . Taking the square root of both sides: . So is a square root of 1. In any field, the square roots of 1 are exactly and . But because is primitive: its first power to equal 1 is , not . Therefore .

This has a remarkable consequence. If you square every element of :

The squares form the -th roots of unity. And since , each square root of unity appears exactly twice.

In : Squaring the fourth roots :

The squares are : the square roots of unity, each appearing twice.

Symmetry 2: Opposite Elements are Negatives

Elements half a cycle apart are negatives:

In :

  • and
  • and

These two symmetries, squaring halves the group and opposites are negatives, are the engine of the Fast Fourier Transform.

The DFT Is Polynomial Evaluation

Here is one of those facts that seems almost too good to be true.

The Discrete Fourier Transform (DFT) is defined as a matrix-vector multiplication. Given a vector , the DFT produces a new vector whose -th entry is:

where is a primitive -th root of unity.

If you've seen the continuous Fourier transform, this is the same idea. The continuous version projects a function onto via integration, measuring how much of each frequency is present. Here, the integral becomes a sum, and the exponentials become -th roots of unity: , equally spaced points on the unit circle. The projection interpretation is identical. You're decomposing a signal into frequency components; the discretization just replaces integration with summation.

Now look at polynomial evaluation. Given a polynomial , evaluate it at :

They are identical. The DFT of the coefficient vector is the evaluation vector at roots of unity. This is not a useful analogy or a computational trick. It is a mathematical identity.

The FFT, then, is not "like" converting between polynomial representations. It is converting between polynomial representations. Coefficient form and evaluation form are the two natural bases for the same vector space, and the DFT matrix is the change-of-basis matrix. The FFT is the fast algorithm for this change of basis, made possible by the recursive structure of roots of unity.

This is why the same algorithm appears in signal processing, image compression, and zero-knowledge proofs. They are not merely related applications; they are the same mathematical operation in different disguises.

Two Representations of Polynomials

A polynomial of degree less than can be viewed in two ways.

Coefficient form: The polynomial is stored as its coefficients.

Evaluation form: The polynomial is stored as its values at distinct points. Using the -th roots of unity:

These two forms carry exactly the same information. A polynomial of degree less than is uniquely determined by its values at any points (this is Lagrange interpolation). The coefficient form and evaluation form are just two different coordinate systems for the same object.

Why care about evaluation form? In zero-knowledge proofs, constraints are naturally expressed as evaluations. Gate must satisfy some relation; this becomes: the constraint polynomial must equal zero at . The evaluation form directly represents these constraints.

Polynomial Evaluation as Inner Product

In Chapter 4, we saw that evaluating a multilinear polynomial is an inner product: . The same structure appears for univariate polynomials, in two forms.

In coefficient form:

where is the coefficient vector and is the "powers of " vector.

In evaluation form, the same polynomial can be written via Lagrange interpolation:

where is the evaluation vector and is the vector of Lagrange basis evaluations. Each is the unique degree- polynomial that equals 1 at and 0 at all other roots of unity (Chapter 2). We'll see a cleaner closed form for roots of unity later in this chapter.

Either way, polynomial evaluation is an inner product. Committing to a polynomial reduces to committing to a vector; proving an evaluation reduces to proving an inner product claim.

The difference from Chapter 4 is computational. For multilinear polynomials, the Lagrange basis factors beautifully: Each term depends on one coordinate; the product of terms costs per basis element. With basis elements, streaming through all of them takes total.

For univariate polynomials, no such factorization exists. Each is a product of terms that all depend on the same variable . Computing one basis element costs ; computing all of them naively costs . The FFT is what rescues us.

We'll exploit the inner product connection extensively in Chapter 9.

Two ways to commit: This duality (coefficient form vs evaluation form) manifests directly in polynomial commitment schemes:

  • KZG (Chapter 9) commits in coefficient form: . The commitment encodes "evaluate the coefficients at a secret point ."

  • FRI (Chapter 10) commits in evaluation form: a Merkle tree over . The commitment is a hash of all the evaluations.

The FFT is what makes these equivalent: you can convert between representations in time. But the choice of representation affects everything: proof size, prover cost, setup requirements, and the algebraic tricks available for verification.

The Fast Fourier Transform

Converting between coefficient and evaluation form naively takes operations: you'd compute each of evaluations, each requiring work.

The Fast Fourier Transform (FFT) does it in . This speedup is essential; without it, the polynomials in modern proof systems would be computationally intractable.

The FFT exploits the symmetries of roots of unity through divide-and-conquer.

The Core Idea

Split a polynomial into its even and odd terms:

where:

  • (even-indexed coefficients)
  • (odd-indexed coefficients)

Both have half the degree of .

Now, when we square the -th roots of unity, we get the -th roots (each appearing twice). So to evaluate at all of , we:

  1. Recursively evaluate and at the -th roots
  2. Combine the results

The combination uses the antisymmetry property:

Proof of first equation: By definition, . Substituting : .

Proof of second equation: Substitute : . The even part is unchanged (squaring kills the sign); the odd part flips sign.

Two evaluations of from one evaluation each of and : the same work computes both, with just an addition versus subtraction.

Worked Example: 4-Point FFT

Evaluate at in .

Split:

  • (coefficients , )
  • (coefficients , )

Evaluate on (the square roots of unity):

Combine using , , , :

Result: .

Verification: . Correct.

The inverse FFT, going from evaluations back to coefficients, uses the same algorithm with instead of and a factor of .

The Vanishing Polynomial

Here is the central insight of univariate arithmetization.

The vanishing polynomial of a set is:

For the -th roots of unity, this simplifies dramatically:

Proof: By definition, means , so every element of is a root of . Since and has degree , these are all the roots. By the factor theorem, .

The key theorem: A polynomial vanishes at every point of if and only if divides .

Proof: () If , then for any : .

() If for all , then each divides . Since the are coprime (distinct linear factors), their product divides .

This is the compression at the heart of univariate SNARKs:

  1. Encode constraints as: " for all "
  2. This is equivalent to: " divides "
  3. Which is equivalent to: "There exists such that "

One polynomial divisibility condition captures separate constraint checks.

The Divisibility Check

How do we verify divisibility efficiently?

The prover computes the quotient and commits to it. The verifier picks a random challenge and checks:

If as polynomials, this equation holds for all , including the random one.

If , their difference is a nonzero polynomial. By Schwartz-Zippel, a random catches this disagreement with probability at least , where is the degree.

One random check. constraints verified. This is the magic.

Lagrange Interpolation over Roots of Unity

We saw earlier that the Lagrange basis is the polynomial that equals 1 at and 0 at all other roots. For roots of unity, this product simplifies to a closed form:

Why does this work? The numerator vanishes at all -th roots of unity. Dividing by removes the zero at , leaving a polynomial that vanishes at all roots except . The prefactor normalizes so that .

Worked example: Let in . Here is a primitive 4th root of unity: , , , . The roots are .

For , the polynomial that equals 1 at and 0 at :

In , we have (since ), so .

Factor over . Dividing out :

Check at : . ✓

Check at : . ✓

The polynomial passing through points is then .

Cosets: Shifting the Domain

Lagrange interpolation just did something powerful: it extended values defined on (the roots of unity) to a polynomial defined on all of . This is the univariate analog of multilinear extension from Chapter 4. There, we extended a function on the Boolean hypercube to all of . Here, we extend a function on roots of unity to all of .

But sometimes we need more than just extension. We need structured evaluation points outside . Cosets provide exactly this.

If is any nonzero field element, then:

is a coset of . It's a "shifted" copy: new points, disjoint from .

Worked example: In , let (a primitive 4th root: , , ). The subgroup is .

Take . The coset is . The two sets are disjoint, giving 8 evaluation points.

The key property: to evaluate on , you don't need a new algorithm. If , then evaluating at is the same as evaluating at . Scale the coefficients by powers of , then run the standard FFT on . Cosets give you new evaluation domains for free.

Why cosets matter in ZK: Several proof systems crucially depend on cosets:

  • PLONK's permutation argument: Uses multiple cosets to encode wire positions. If you have gates with 3 wires each (, , ), PLONK encodes them on , , and (three disjoint domains of size each). This lets the permutation polynomial distinguish "wire of gate 5" from "wire of gate 5."

  • FRI's low-degree testing: The prover evaluates on a domain larger than the polynomial's degree (for "rate" or "blowup"). Using doubles the evaluation domain while maintaining FFT structure.

  • Quotient degree management: If has degree but we've only committed to evaluations on (size ), we need more points to pin down the quotient. Using gives points (enough to determine a polynomial of degree less than ).

The FFT works on cosets too: just multiply each root of unity by before running the algorithm.

The Quotient Argument

The divisibility check above verified vanishing on a set of points (all of ). The quotient argument is the single-point version: prove that for a committed polynomial .

The factor theorem says: if and only if divides .

The prover computes:

If , this is a polynomial. If not, the division has a remainder; isn't a polynomial.

The verifier checks the polynomial identity:

at a random point. This is the foundation of KZG opening proofs (Chapter 9).

Univariate vs. Multilinear

We now have two paradigms for polynomial proofs:

AspectMultilinearUnivariate
Variables variables, degree 1 each1 variable, degree
DomainBoolean hypercube Roots of unity
Size points points
Constraint encodingSum over hypercubeDivisibility by
Key algorithmRecursive halvingFFT
Prover cost (linear) (quasi-linear)
VerificationSum-check protocolRandom evaluation
SystemsGKR, Spartan, LassoPLONK, Marlin, STARKs

Both achieve the same essential goal: reduce exponentially many constraint checks to a constant number of random evaluations. They're complementary perspectives on the same phenomenon (the rigidity of low-degree polynomials).

A note on Groth16: Groth16 uses univariate polynomials but doesn't require roots of unity; it encodes constraints via QAP (Quadratic Arithmetic Programs) and verifies satisfaction through pairing equations, not divisibility checks at structured domains. Provers can use FFT as an optimization for polynomial arithmetic, but it's not fundamental to the protocol. PLONK and STARKs, by contrast, rely structurally on roots of unity: constraints are encoded as "polynomial vanishes on ," checked via the divisibility pattern described above.

Key Takeaways

  1. Finite fields provide exact arithmetic with every nonzero element invertible. The nonzero elements form a cyclic group.

  2. Roots of unity are elements with . They form a subgroup of size when divides .

  3. The key symmetries: Squaring halves the group; opposite elements are negatives. These enable the FFT.

  4. Two representations: Polynomials can be stored as coefficients or evaluations. The FFT converts between them in time.

  5. The vanishing polynomial captures all roots of unity. A polynomial vanishes on iff divides it.

  6. Constraint compression: constraints "" become one divisibility "", verified by one random check.

  7. Lagrange interpolation over roots of unity has a clean closed form exploiting the structure of .

  8. Cosets extend the domain while preserving FFT-friendliness.

  9. Quotient arguments prove evaluation claims: to show , prove divides .

  10. The FFT exists because of roots of unity. The algorithm is a direct consequence of the symmetries and .