How this calculation works
Work over the explicitly prime coefficient field, normalize the nonconstant modulus to monic form and reduce every result below its degree. Extended Euclidean arithmetic finds an inverse when it exists. A Frobenius/gcd irreducibility test distinguishes a field quotient from a ring with zero divisors.
Reduce coefficients modulo p and polynomial results modulo monic m; A is a unit iff gcd(A,m)=1A worked example
Over F₃ with modulus x²+1, A=x+1 and B=x multiply to x²+x, whose residue is x+2. The irreducible quadratic gives nine residue classes and a field quotient.
Good to know
Univariate coefficients modulo a prime 2–97, modulus degree 1–8, inputs degree ≤16. No multivariate ideal, arbitrary coefficient ring or symbolic parameter. Lists are constant term first. The zero-th power returns the identity under the stated algebra convention, including 0⁰.
Reference: SageMath: univariate polynomial quotient rings (opens in a new tab) ↗
A residue class has a bounded-degree representative
In Fₚ[x]/(m), polynomials that differ by a multiple of m represent the same element. Division by the monic modulus leaves a representative whose degree is below the modulus degree. Coefficients are first reduced modulo the entered prime.
Lists are constant term first: 1 0 1 means 1+x². Over F₃ with m=x²+1, multiplying x+1 by x gives x²+x, and the relation x²=−1=2 reduces that to x+2.
The modular exponentiation calculator reduces integer powers. The finite polynomial quotient calculator instead works in polynomial residue classes over a prime coefficient field.
Prime coefficients do not make every quotient a field
The coefficient ring Fₚ is a field because p is prime, but the polynomial quotient is a field only when the modulus is irreducible over that field. A reducible modulus produces nonzero zero divisors.
For example, over F₂ the polynomial x²+1 equals (x+1)². The nonzero residue x+1 squares to zero, so it cannot have a multiplicative inverse. Over F₃ the same written quadratic is irreducible and gives a field with nine elements.
An inverse is a gcd question
A residue A is invertible exactly when gcd(A,m)=1 over the coefficient field. Extended Euclidean arithmetic then expresses 1 as a combination of A and m; the coefficient of A gives its inverse class after reduction.
The polynomial division calculator uses a different coefficient setting and reports an ordinary quotient/remainder calculation. The modular exponentiation calculator instead reduces integer powers modulo an integer. This page performs polynomial residue arithmetic and independently checks irreducibility with finite-field Frobenius and gcd relations.
A few questions, answered
Why must the coefficient modulus be prime?
This implementation relies on coefficient inverses in Fₚ. Composite coefficient moduli require a different ring algorithm and are rejected.
Does “no inverse” mean the calculation failed?
No. It is a meaningful algebraic result when A shares a nonconstant factor with the modulus.
What does exponent zero return?
The multiplicative identity residue, including the explicitly stated algebra convention for a zero base raised to zero.