Compute the multiplicative inverse of $\displaystyle a(x) = \overline{x^2 + x + 1} $ in $\displaystyle \mathbb{Z}_5/<p(x)> $
where $\displaystyle p(x) = x^3 + x^2 + x + 1 = (x^2 + 1)(x +1) $.
Because $\displaystyle x^3+x^2+x+1=0$, we have $\displaystyle 1=-x^3-x^2-x$. It is easy to see that $\displaystyle (-x)(x^2+x+1)=-x^3-x^2-x$, so $\displaystyle -x$ is the inverse.
However, it is not always so easy to solve for inverses by inspection. The surefire way to do this is to use linear algebra, as I will demonstrate.
You want $\displaystyle (a+bx+cx^2)(x^2+x+1)=1$ (we only go up to the second degree since $\displaystyle x^3=-x^2-x-1$)
Expanding the left hand side gives
$\displaystyle \bigg(ax^2+ax+a\bigg)+\bigg(bx^3+bx^2+bx\bigg)+ \bigg(cx^4+cx^3+cx^2\bigg)$
$\displaystyle =\bigg(a(x^3+x^2+x+1) - ax^3\bigg)$
$\displaystyle +\bigg(b(x^3+x^2+x+1)-b\bigg)$
$\displaystyle + \bigg(cx(x^3+x^2+x+1)-cx\bigg)$
$\displaystyle =-ax^3-cx-b$
$\displaystyle =a(x^2+x+1)-cx-b$
$\displaystyle =ax^2+(a-c)x+(a-b)$
So we want to find $\displaystyle a,b,c\in \mathbb{Z}_5$ such that $\displaystyle ax^2+(a-c)x+(a-b)=1$. Although it is obvious what the solution is in this case, I'll write down the general way to do it:
With respect to the basis $\displaystyle {1,x,x^2}$, this is equivalent to solving the linear system
$\displaystyle \begin{bmatrix} 1&-1&0 \\ 1&0&-1 \\1&0&0 \end{bmatrix}\begin{bmatrix} a \\ b \\c \end{bmatrix}=\begin{bmatrix} 1 \\ 0 \\0 \end{bmatrix}$
Which has solutions $\displaystyle a=c=0;b=-1$. Hence the inverse is $\displaystyle ax^2+bx+c=-x$, which is the same answer as we got from inspection.
How do you guys post equations so neatly?
By copying and pasting the original post, this is what I get:
"Compute the multiplicative inverse of a(x) = \overline{x^2 + x + 1} in \mathbb{Z}_5/<p(x)>
where p(x) = x^3 + x^2 + x + 1 = (x^2 + 1)(x +1) . "
Hi HowDoIMath,
You need to use the Latex language for Maths expressions - see Latex Help and download the very helpful tutorials or help sheets.
Note that you need [TEX] and then the same with a / before the T around the math expressions to get Latex to work
Peter