Question about a ring of polynomials, and the generators of ideals in that ring I am studying for an exam, and this is a question from a previous homework that I got wrong. Im not really sure how to start, and any help would be appreciated!
Let $R=\mathbb{Z}_7 [x]$ and $I$ be the ideal generated by the polynomial $x^3+2x+1$
a)Let $f$ and $g$ be the elements of $R/I$ represented by the polynomials $2x^2+x$ and $3x^2+x+4$. Find the polynomial of degree no more than 2 that represents the product $fg$ 
b) How many elements are in the ring $R/I$ ?
Work:
So for a) In order to compute $fg$, I need to work out the "rule of multiplication" in $\mathbb{Z}_7[x]$. I know I will then multiply $f$ and $g$ and then replace the higer power terms ($x^3$ and $x^4$) with a first degree or second degree polynomial term. Unfortunately, my book does a horrible job at explaining how to work out the "rule of multiplication" - can anyone show me how to do this?
For b) I need to work out |$\mathbb{Z}_7[x]/ \langle x^3+2x+1 \rangle$|,(the number of elements in this ring) which I am also uncertain how to do. 
Any help would be greatly appreciated! 
 A: Whatever your book explains as the "rule for multiplication" in this case, it almost certainly amounts to the following: pretend first that the multiplication is taking place in the ring $\mathbb{Z}_7[x]$ (i.e. before taking the quotient). Calculate the product $fg$ in that ring and then reduce the result modulo the ideal given.
So we have $(2x^2 + x)(3x^2 + x + 4) = 6x^4 + 5x^3 + 9x^2 + 4x = 6x^4 + 5x^3 + 2x^2 + 4x$ (reducing $9$ mod 7). Reducing this modulo the given ideal yields an element of the quotient ring, which is an equivalence class of polynomials differing from $6x^4 + 5x^3 + 2x^2 + 4x$ by multiples of $x^3 + 2x + 1$. We want one such member of the equivalence class which has no terms of degree higher than 2. To get it, we need to eliminate the higher degree terms by subtracting multiples of $x^3 + 2x + 1$.
Let's first subtract $6x(x^3 + 2x + 1)$ which leaves us with $5x^3 - 10x^2 - 2x = 5x^3 + 4x^2 + 5x$ (reducing $-10$ and $-2$ mod $7$) thus eliminating the degree 4 term. From this, let's now subtract $5(x^3 + 2x + 1)$ which leaves us with $4x^2 -5x - 5 = 4x^2 + 2x + 2$. So the representative of lowest degree is $4x^2 + 2x + 2$.
As for the question of how many elements are in the ring. We note that every equivalence class in the quotient has (by an analogous process to that above) a unique representative of degree 2 or less. Thus we need only count how many distinct such representatives there can be. Since the coefficients are in $\mathbb{Z}_7$, each degree-at-most-2 representative will be determined by its $\mathbb{Z}_7$-coefficients. There are therefore 7 possibilities for each coefficient and there are 3 coefficients needed to determine a polynomial of degree at most 2. Hence there are $7^3 = 343$ elements in the quotient ring. Perhaps the cleaner way to say this is that $\mathbb{Z}_7[x]/\langle x^3 + 2x + 1\rangle$ is a $3$-dimensional vector space over $\mathbb{Z}_7$ (with natural basis $\{\overline{1}, \overline{x}, \overline{x^2}\}$). It is then easy to count $7^3$ possible linear combinations of this basis.
A: This is basic stuff, but your example is very well chosen to illustrate the methods. Instead of merely referring you to a standard text let me run through the methods fairly quickly.
Your constant ring is the field $\Bbb F_7=\Bbb Z/7\Bbb Z$, and your polynomial is $f(x)=x^3+2x+1$. Your first job is to verify that $f$ is irreducible, and you’re in luck, ’cause a cubic is irreducible if and only if it has no roots. This is the case, so $f$ is indeed irreducible, and the ring $K=\Bbb F_7[x]/(f)$ is known to be a field: every nonzero element has a reciprocal.
Elements of $K$ are all represented by polynomials in $x$ of degree less than $3$. So every such is of form $a +bx+cx^3$, for $a,b,c$ in $\Bbb F_7$. (Can you see now how many elements there are in $K$?) To add two things of this form, you just add termwise, no problem here. To multiply, the idea is to do the multiplication and then find the remainder upon division by $f$. That’s the Euclidean division of polynomials that I hope you learned in high school, but with the twist that the coefficients are not real numbers but elements of $\Bbb F_7$. You should perform a few of these so that you get comfortable with the idea.
Let’s do the two most important ones: $x\cdot x^2=x^3$, and when you divide $x^3$ by your $f$, you get a quotient of $1$ and a remainder of $-2x-1=5x+6$, and that is your product—the quotient is thrown away always. Don’t forget that your coeffs are to be handled modulo $7$ at all times. And $x^2\cdot x^2=x^4$ gives a remainder coming out to $5x^2+6x$. If $K$ had been rather smaller, you could have written out a multiplication table, but unfortunately that’s completely out of the question.
Fortunately, you weren’s asked to find the reciprocal of any element of $K$. That poses problems that I wouldn’t have wanted to go into here.
A: For part a), use polynomial long division to divide $fg$ by $(x^3+2x+1)$, to  get that $fg = (6x+5)(x^3+2x+1) +(-3x^2 + 2x +1)$.
Then, since $(6x+5)(x^3+2x+1)$ is a multiple of $(x^3+2x+1)$, it is $\bar{0}$ in $R/I$, and $\overline{fg} = \overline{-3x^2 + 2x +1} = \overline{4x^2 + 2x +1}$ (since $\overline{-3} = \overline{2}$).
For part b), there is a one to one correspondence between $R/I$ and the set of polynomials with coefficients in $\mathbb{Z}_7$ which have degree less than three (and it's easy to see that there are $7^3$ of this polynomials, since a polynomial is uniquely determined by its coefficients).
The reason for this one to one correspondence is the following: if $g,h \in \mathbb{Z}_7[X]$ such that $deg(g), deg(h) \leq 2$ and $g \neq h$, then  $\overline{g} \neq \overline{h}$. Why? Suppose  $\overline{g} = \overline{h}$, then $\overline{g-h} = \overline{0}$, so $g-h \in I$, which is impossible.
Now, if $h \in \mathbb{Z_7}[X]$ and $deg(h) \geq 3$, then we can divide $h$ by $(x^3+2x+1)$, and there exist $q,r \in \mathbb{Z_7}[X] $ such that $deg(r) \leq 2$ and $h(x) = q(x)(x^3+2x+1) + r(x)$. So, we conclude that $\overline{h} = \overline{r}$,and then every polynomial of degree greater than $2$ is represented by one of degree $2$ or less in $R/I$.
Note that this generalizes for an arbitrary polynomial $h$ of degree $n$, so that, if $J =$  $ <h>$, then $R / J$ has the same number of elements as the set of polynomials with coefficients in $\mathbb{Z_7}$ and degree less than $n$.
