Let $f(x) =x^3+x+1 \in \mathbb{Q} [x] $. If ideal $I=(f(x)) $, find the inverse of $x^2+x+1$ in quotient $\mathbb{Q} [x] /I$. Let $f(x) =x^3+x+1 \in \mathbb{Q} [x] $. If ideal $I=(f(x)) $, find the inverse of $x^2+x+1$ in quotient $\mathbb{Q} [x] /I$.
I am having trouble with this. What exactly is the quotient $\mathbb{Q} [x] /I$ here? I guess it's polynomials with degree 2 or less which in multiplication satisfy the relation $ x^3+x+1=0$. How do I find the inverse? I guess I have to find a polynomial of degree 2 or less so that when multiplied by $x^2+x+1$ I get something divisible by $ x^3+x+1$. 
 A: You need to find a polynomial $g(x)$ such that $x^3+x+1$ divides $g(x)\cdot (x^2+x+1)-1$.
You can do it the same way you do it for integers: suppose $p,q$ are coprime integers. How do you find $a,b$ such that $ap+bq=1$?
If you know that, just do the same for $p=x^3+x+1$ and $q=x^2+x+1$.
(Note that this works essentially because $\mathbf Q[x]$ is an Euclidean ring, as a ring of polynomials in one variable over a field.)
A: Write 
$$ (x^2 + x + 1)(ax^2 + bx + c) = 1 $$
and expand. Then equate coefficients keeping in mind that you're working in $\mathbb{Q}[x]/I$, so you can use the identity $x^3 = - x - 1$ to get rid of the powers higher than $2$.

As mentioned by Arthur in the comments of this answer, the more consistent way to do this is to use the Euclidean division algorithm, as mentioned in another answer.
A: A polynomial in the quotient ring can be represented by $ax^2+bx+c.$
We want $(ax^2+bx+c)(x^2+x+1)\equiv 1 \pmod {x^3+x+1}$.
Note that $\color{blue}{x^3\equiv-x-1}$ and $\color{green}{x^4\equiv -x^2-x}$.
Thus $(ax^2+bx+c)(x^2+x+1)\equiv \color{green}{ax^4}+\color{blue}{(a+b)x^3}+(a+b+c)x^2+(b+c)x+c$
$\equiv \color{green}{-ax^2-ax}\color{blue}{-(a+b)x-(a+b)}+(a+b+c)x^2+(b+c)x+c$
$\equiv (b+c)x^2+(c-2a)x+(c-a-b)\equiv1,$
so we want $b+c=0, c-2a=0, $ and $c-a-b=1$.
Can you solve this system of equations for $a, b, $ and $c$?
Hint: $c=-b=2a$.
A: I prefer to use $u$ instead of $x$ in the quotient ring, so $u=x+(f(x))\in\mathbb{Q}[x]/I$.
Consider the action of $u^2+u+1$ by multiplication: this is a linear map, whose matrix with respect to the basis $\{1,u,u^2\}$ is
$$
\begin{bmatrix}
1 & -1 & -1 \\
1 & 0 & -2 \\
1 & 1 & 0
\end{bmatrix}
$$
because
\begin{align}
(u^2+u+1)1&=u^2+u+1 \\
(u^2+u+1)u&=u^3+u^2+u=u^2-1 \\
(u^2+u+1)u^2&=u^4+u^3+u^2=-2u-1
\end{align}
The inverse of this matrix is
$$
\frac{1}{3}
\begin{bmatrix}
2 & -1 & 2 \\
-2 & 1 & 1 \\
1 & -2 & 1
\end{bmatrix}
$$
so the inverse is
$$
\frac{1}{3}(2-2u+u^2)
$$
