# How do I subtract in $\mathbb{Z}_{n}$?

I'm currently trying to understand polynomial division in abstract algebra. How is it possible for a polynomial with negative coefficients, say $f(x)=x^{4}-3x^{3}+2x^{3}+4x-1$ be a member of the set of polynomials in $\mathbb{Z}_{5}[x]$? This comes as a problem to me since as far as I know, negative numbers are not members of $\mathbb{Z}_{5}$, but if some arithmetic will result in negative numbers, it should undergo modular arithmetic. For example, note that 2 and 3 are elements of $\mathbb{Z}_{5}$. So for subtraction,

$2-3=-1=4\pmod 5=4\in\mathbb{Z}_{5}$.

But in Fraleigh's example for polynomial division, he left it as it is, i.e. $2x^{2}-3x^{2}=-x^{2}$. Shouldn't it be $4x^{2}$ since we're working on $\mathbb{Z}_{5}$?

• $-1\equiv_5 4$ as you've noted. – cansomeonehelpmeout Apr 22 '18 at 16:02
• $-x^2$ and $4x^2$ are, in your context, the same thing. Thing of it more akin to leaving something unsimplified (e.g. how in ordinary real numbers, $4/8 = 1/2$). – Aaron Montgomery Apr 22 '18 at 16:04
• You have two common options for how you define $\Bbb Z_n$. You could define it as though the elements are individual numbers, e.g. with $\Bbb Z_3=\{0,1,2\}$ with addition and multiplication accordingly, or you could define it as though the elements are sets, or in particular equivalence classes, e.g. with $\Bbb Z_3 = \{\overline{0},\overline{1},\overline{2}\}=\{\{\dots,-6,-3,0,3,6,\dots\},\{\dots,-5,-2,1,4,7,\dots\},\{\dots,-4,-1,2,5,8,\dots\}\}$. The latter is more common. It is also common to leave the overline or brackets off of an equivalence class and just use any representative – JMoravitz Apr 22 '18 at 16:07
• So, in $\Bbb Z_5[x]$, you would have $\overline{2}x^2-\overline{3}x^2=\overline{-1}x^2=\overline{4}x^2$ since $\overline{-1}=\overline{4}$ in this context. As for "how do you subtract" just like in other scenarios the subtraction $x-y$ is defined as adding $x$ by the additive inverse of $y$, that is $x-y=x+(-y)$. In your case and using the first interpretation of $\Bbb Z_n$ I mentioned, this would be $2-3=2+(-3)=2+2=4$, noting that $3+2=0$ implies that the additive inverse of $3$ is $-3=2$. – JMoravitz Apr 22 '18 at 16:09