Counting the units in a quotient ring of a polynomial ring over a field

finite-fieldsring-theorytotient-function

Is there a formula to count the number of units in a polynomial ring over a field?

For instance, counting the number of units in $\mathbb{F}_3[x]/(x^3+1)$ without going one by one.

As a frame of reference for my current background, in my Classical Algebra class so far we have algebraically computed whether each possible remainder of the above ring is a unit or zero divisor. Mostly we used long division, but also by finding a simple zero divisor such as $(x+1)$ and then finding its multiples, as well as using the Division Theorem to solve for the remainder when possible.

We have defined a polynomial $g(x)$ to be a unit in $\mathbb{F}_q[x]/f(x)$ precisely when $\gcd(f,g)=1$ (or some nonzero constant), and $g(x)$ is a zero divisor when $\gcd(f,g)\neq1$ (or some nonzero constant).

Subsequently we examined the function $\varphi(m)$ (i.e. Euler's totient function) which counts the units in $\mathbb{Z}/_m\mathbb{Z}$ and defined formulas for when $m$ is prime or a prime to some power (e.g. $p^n$ for some $p$ prime and $n\geq2$).

My question is, is there a generalized definition for Euler's totient function for a polynomial ring over a field such as the example above? In other words, using my notation above, could the notion of "$\varphi(x^3+1)$" be defined in some sense analogous to integers?

Best Answer

You can proceed exactly as in the case of $\mathbb{Z}/n\mathbb{Z}$.

Fix a prime power $q$, and let $\varphi(f)$ be the cardinality of the group of units of $\mathbb{F}_q[X]/(f)$, where $f$ is a nonzero polynomial of $\mathbb{F}_q[X]$. Because of the Chinese Remainder Theorem, $$\varphi(f_1f_2)=\varphi(f_1)\varphi(f_2) \mbox { whenever }gcd(f_1,f_2)=1.$$ Hence, it is enough to compute $\varphi(\pi^r)$, where $\pi$ is irreducible and $r\geq 1$. But a polynomial is NOT coprime to $\pi^r$ if and only if it is NOT coprime to $\pi$, since $\pi$ is irreducible. Now an element of $\mathbb{F}_q[X]/(\pi^r)$ maybe represented by a unique polynomial of degree $\leq \deg(\pi^r)-1=\deg(\pi)r-1$. So we have to count the number of multiples of $\pi$ of degree $\leq \deg(\pi)r-1$. There are exactly the polynomials of the form $\pi g,$ where $\deg(g)\leq \deg(\pi)(r-1)-1$, so there are exactly $q^{\deg(\pi)(r-1)}$ such polynomials.

All in all, $$\displaystyle \varphi(\pi^r)=q^{\deg(\pi)r}-q^{\deg(\pi)(r-1)},$$

and $$\varphi(f)=\prod_{\pi\mid f}(q^{\deg(\pi)r_\pi}-q^{\deg(\pi)(r_\pi-1)})=\prod_{\pi\mid f}(q^{\deg(\pi)(r_\pi-1)}(q^{\deg(\pi)}-1)),$$ where $\pi$ runs through the irreducible monic divisors of $f$ and $r_\pi$ is the power of $\pi$ in the decomposition of $f$ into irreducible factors.

In your example, $f=X^3+1=(X+1)^3\in\mathbb{F}_3[X]$, so $\varphi(f)=3^3-3^2=18$.