Confusion about elements in fields, like -1 in Z5

I'm learning field and ring theory, and I've repeatedly seen the usage of -1, -2 and -3 as elements of $\mathbb{Z}_5$. As far as my knowledge goes, $\mathbb{Z}_5$ consists of {0,1,2,3,4}. This is where i get confused. How is this possible?

The context i am viewing this in is when testing for roots in a certain field. The solution can say that for some x=-1 in a given field, f(x) is zero while i test for 2 and get that result. What is correct?

• I'm a bit confused. What is $f(x)$? It seems to be a polynomial, but what is the actual polynomial you are talking about? Apr 22, 2016 at 18:42
• Yes its a polynomial, sorry. in this case it is f(x) = x^3 + 2x + 3 Apr 22, 2016 at 18:43

$-1 \equiv 4 \pmod 5$, so in $\Bbb{Z}_5$, $-1$ is the same element as $4$. Don't think of $\Bbb{Z}_5$ as just $\{0, 1, 2, 3, 4\}$, think of it as this:

$$\{\{..., -5, 0, 5, ...\}, \{..., -4, 1, 6, ...\}, \{..., -3, 2, 7, ...\}, \{..., -2, 3, 8, ...\}, \{..., -1, 4, 9, ...\}\}$$

As you can see, this is a partition of the integers where each integer is in a partition based off the equivalence relation $a \sim b \iff a \equiv b \pmod 5$. This means that $-1$ is the same as $4, 9, 14$, etc. All of these elements can be used interchangeably in $\Bbb{Z}_5$ because they are equal in such a field. Knowing this can be useful because it shows us stuff like this: $$2-3 \equiv -1 \equiv 4 \pmod 5$$ If we didn't know $-1$ and $4$ were the same, we would be stuck at $-1$ and not know how to represent it as a natural number.

Now, about the polynomial: Clearly, both $-1$ and $2$ are zeroes for $f(x)$ in $\Bbb{Z}_5$: $$f(-1) \equiv (-1)^3+2(-1)+3 \equiv 0 \pmod 5$$ $$f(2) \equiv 2^3+2(2)+3 \equiv 15 \equiv 0 \pmod 5$$

However, notice the difference between the zeroes: For $f(-1)$, we did not need to really use the fact that we were in $\Bbb{Z}_5$. It always equals $0$ no matter what field we're in because that's how arithmetic works. However, for $f(2)$, we needed to use the fact that $15 \equiv 0 \pmod 5$, so if we were working in another field like $\Bbb{Z}_7$, $2$ would not be a zero of $f(x)$.

Therefore, I think your source was trying to point out that $-1$ is a zero for $f(x)$ in all fields, not just $\Bbb{Z}_5$. This means that $4$ is a zero for $f(x)$ in $\Bbb{Z}_5$ because $-1 \equiv 4 \pmod 5$ and $6$ is a zero for $f(x)$ in $\Bbb{Z}_7$ because $-1 \equiv 6 \pmod 7$.

• Thank you. Especially that last part was clarifying. I just find it weird that the solution tests for 0,1,2,-1,-2 (without any obvious reason), but -1 makes sense because of your explanation. So, in theory -any- numbers in those equivalence classes could be used? And here they used -1 because it is always a zero? Apr 22, 2016 at 18:58
• Yes, numbers in the same equivalence class are equal in the context of $\Bbb{Z}_n$ for all $n \in \Bbb{N}$. Here, however, they are talking about all fields, not just $\Bbb{Z}_5$, so they have to use $-1$ instead of the other numbers in the equivalence classes. Apr 22, 2016 at 21:57

$-1 \equiv 4 \pmod 5$, so in $\mathbb{Z}_5$, $-1=4$.

Formally, $-1$ is the unique element of $\mathbb{Z}_5$ which when added to $1$ produces $0$. Note that $4+1=5 \equiv 0 \pmod 5$, so $-1=4$ in $\mathbb{Z}_5$. Same with others.

You can think about equality modulo $n$ used to partition $\mathbb{Z}$ into $n$ equivalence classes. You can label them with any member, but it's more convenient to label them as $0,1, \ldots, n-1$.

• I get that -1 is equal to 4 in $\mathbb{Z}_5$, but is there any special reason to why it is better to use than the 'natural' numbers? Apr 22, 2016 at 18:46
• @confused what do you mean by natural? By definition, $\mathbb{Z}_5$ has $5$ elements, so if all natural numbers are to be there, you need to think of elements of $\mathbb{Z}_5$ as some sort of grouping of the natural numbers. In this case, it is through equivalence classed of the equivalence modulo 5. Apr 22, 2016 at 18:50
• I meant numbers that are 0 and larger (and less than 5). Apr 22, 2016 at 18:51
• @confused Look at the last paragraph of my answer. That's why your source is using $-1$ instead of just $4$. Apr 22, 2016 at 18:52