# Find number of polynomials in $P_n(F)$ where $F$ is a finite field with cardinality $m$. [duplicate]

Firstly, I should mention that the above question hits my mind when I am solving a problem in Abstract Algebra which is- Find the number of elements in $\frac{\Bbb{Z}_3[x]}{<x^3+2x+1>}$.
I have solved the problem in a following manner.
I know that $K[x]$ be a polynomial ring over field $K$. Let, $f(x)$ be a non-zero polynomial in $K[x]$ with deg$(f)=n>0$. Then the quotient ring $\frac{K[x]}{<f(x)>}$ contains polynomials of form $g(x)+<f(x)>$ where $g(x)$ is a polynomial in $K[x]$ with degree at most $n-1$.
So, cardinality of $\frac{\Bbb{Z}_3[x]}{<x^3+2x+1>}$ is same as of $P_2[\Bbb{Z}_3]$, set of all polynomials with degree less or equal to 2 and having coefficients from $\Bbb{Z}_3$. Again $P_2[\Bbb{Z}_3]$ has same cardinality as of the set of all 3-tuples(since the polynomials should have degree at most 2) with entries from $\Bbb{Z}_3$.
I have listed all 3-tuples with entries from $\Bbb{Z}_3$- $(0,0,0), (1,0,0), (2,0,0), (0,1,0),(0,2,0), (0,0,1), (0,0,2), (1,1,0), (0,1,1), (1,0,1), (2,2,0), (0,2,2), (2,0,2), (1,2,0), (0,1,2), (1,0,2), (2,1,0), (0,2,1), (2,0,1), (1,1,2), (1,2,1), (2,1,1), (2,2,1), (2,1,2), (1,2,2), (1,1,1), (2,2,2).$
So, number of elements in $\frac{\Bbb{Z}_3[x]}{<x^3+2x+1>}$ is $27$.
But still the method is too laborious if the degree of polynomials increases of cardinality of field increases. So, I need to establish a easy way out or a formula.
Now, I try to find a general formula to find number of polynomials in $P_n(F)$ (set of all polynomials with degree at most n and having coefficients from F) where F is a finite field with cardinality $m$.($n,m\in \Bbb{N}$)
To do that I just need to find cardinality of the set $\{(a_0, a_1,...,a_n):a_i\in F\quad\forall i=\{0, 1,...,n\}\}$.
How can I find that? Can anybody help me do this?

## marked as duplicate by Jyrki Lahtonen abstract-algebra StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Aug 15 '18 at 9:54

• @JyrkiLahtonen, I am also thinking that, order matters, even $n$ may be less than $m$. – Biswarup Saha Aug 15 '18 at 9:57

I take it that $P_n(F)$ in your case means polynomials with degree less than or equal to $n$.

In that case, every coefficient can be any of the elements in $F$ so you have $|F|$ choices in each coefficient.

Thus the answer would be $|F|^{n+1}$. (And in general if $F$ finite $|F|=p^k$ for some prime number $p$.)