Learn / Math / Polynomials
07. Polynomials
Algebra for ZK · Lesson 8 of 18 · 4:25
The actual language ZK circuits are written in — what a polynomial is, how its degree and roots work, and why checking it at one random point stands in for checking an entire computation.

Foundations are done. This track now moves into algebra — and the shift matters more than it might look, because polynomials turn out to be the actual language ZK circuits get written in. Every program a ZK system proves gets translated into polynomials somewhere underneath. This lesson covers the basics that everything later builds on: what a polynomial is, its degree, how to evaluate one, and what a root is.

What a polynomial is

A polynomial is an expression built from powers of a variable, each one scaled by a number called a coefficient, all added together.

Definition — a polynomial

p(x)=3x2+2x+5p(x) = 3x^2 + 2x + 5

33, 22, and 55 are the coefficients; xx is the variable. The whole expression is just powers of xx, each scaled by a coefficient, summed up.

The degree

The degree of a polynomial is the highest power of xx that appears in it — a single number that says a lot about how the polynomial behaves.

the degree — highest power of x p(x) = 7 degree 0 constant p(x) = 2x + 1 degree 1 linear p(x) = 3x² + 2x + 5 degree 2 quadratic p(x) = x³ − x + 4 degree 3 cubic
Fig. 1 — four polynomials, read by their degree: constant, linear, quadratic, cubic.

Degree 00 is just a constant, with no xx at all. Degree 11 is linear — a straight line. Degree 22 is quadratic, which is where x2x^2 first shows up, and degree 33 is cubic. The pattern keeps going from there, but these four names cover almost everything this track needs.

Evaluating a polynomial

To evaluate a polynomial, plug in a specific number for xx and work the result out, one step at a time.

evaluating p(x) = 3x² + 2x + 5 at x = 2 step 1 — substitute x = 2 3(2)² + 2(2) + 5 step 2 — compute the power 3(4) + 2(2) + 5 step 3 — multiply each term 12 + 4 + 5 step 4 — add it all up 21 p(2) = 21
Fig. 2 — evaluating p(x) = 3x² + 2x + 5 at x = 2, substitution through to a final number.
Result

p(2)=3(2)2+2(2)+5=21p(2) = 3(2)^2 + 2(2) + 5 = 21

Plug in a number, get a number out — that’s the entirety of what evaluation means.

Roots of a polynomial

A root is a value of xx that makes the polynomial equal zero. Finding one is the same process as evaluating, just checking which inputs happen to land on 00:

roots — where p(x) = 0 p(x) = x² − 5x + 6 check x = 2 2² − 5(2) + 6 = 4 − 10 + 6 = 0 ✓ root check x = 3 3² − 5(3) + 6 = 9 − 15 + 6 = 0 ✓ root check x = 1 1² − 5(1) + 6 = 1 − 5 + 6 = 2 ✗ not a root 2 and 3 are the roots — this polynomial factors as (x−2)(x−3)
Fig. 3 — testing three candidate values against p(x) = x² - 5x + 6. Two of them land on zero.

22 and 33 both zero the polynomial out, and 11 doesn’t — which means 22 and 33 are the roots of p(x)=x2−5x+6p(x) = x^2 - 5x + 6, and the polynomial factors cleanly around them.

Roots as factors

p(x)=x2−5x+6=(x−2)(x−3)p(x) = x^2 - 5x + 6 = (x - 2)(x - 3)

Every root corresponds to a factor — knowing the roots is the same information as knowing the factored form.

Polynomials live inside a finite field

This is exactly where the previous lesson connects to today’s. In a ZK system, a polynomial’s coefficients — and every value it gets evaluated at — don’t live in the ordinary numbers. They live inside GF(p)GF(p), the same finite field from the last lesson.

polynomials over GF(7) p(x) = 3x² + 2x + 5, evaluated mod 7 step 1 — substitute x = 2 3(4) + 2(2) + 5 = 21 step 2 — reduce mod 7 21 mod 7 = 0 every coefficient and every evaluation stays inside GF(7)
Fig. 4 — the same evaluation from Fig. 2, now reduced mod 7. Every number stays inside GF(7).

Nothing about the process changes — substitute, compute, reduce by the modulus — it’s the identical evaluation from earlier in this lesson, just finished off with one extra step.

Why ZK circuits are built from polynomials

Here’s the payoff, and the reason this entire phase of the track exists: an entire computation — every step, every constraint — can be encoded into a single polynomial. Checking that polynomial at just one random point then tells you, with overwhelming probability, whether the whole computation was done correctly.

an entire computation trace gets encoded as ONE polynomial checking ONE point ≈ checking the WHOLE computation this single idea is the foundation of R1CS, QAP, and PLONK
Fig. 5 — a whole computation trace, folded into one polynomial, checkable at a single point.

That one idea — compress a computation into a polynomial, verify it with a spot-check — is the foundation underneath R1CS, QAP, and PLONK, the systems ZK proofs are actually built from. The next lesson goes further into how polynomials behave under their own arithmetic, over a finite field.