# Section 2.3: The Arithmetic of $latex\mathbb{Z}_p$ (p Prime) and $latex\mathbb{Z}_n$$In my analysis of this section I noted that Hungerford often switches between the conventional modular arithmetic notation (with the brackets []) and then uses the number by itself. While both are completely valid certain uses are better than others. That is the notation $[a]$ is much better than a if there are integers in being used at the same time. That is if $b\in\mathbb{Z}$ and $a\in\mathbb{Z}_n$ then $ab$ and $b\cdot [a]$ mean the same thing but the second notation indicates that b is not a congruence class. Now to continue with Section 2.3: ###### Question: Does this work for $\mathbb{Z}_13$? $[a]\odot [b]=[ab]=$ means $13\mid ab$ implies $13\mid a$ or $13\mid b$. We’ll later cover this but note that if we try to solve $ax=1$ in $\mathbb{Z}$ then the only solutions for a are $a=\pm 1$. But the same equation in $\mathbb{Z}_5$ has multiple solutions: $\odot =$ and $\odot =$. #### Theorem 2.8: For a positive integer p, the following are equivalent: 1. p is prime 2. For non zero $a\in\mathbb{Z}_p$, the equation $ax=1$ has a solution 3. Whenever $bc=0$ in latex \mathbb{Z}_p then$$b=0$$or $c=0$ This theorem explains a lot but fails to explain when there are solutions to the equation $ax=1$. ### Theorem 2.9 Let$latex a,n\in\mathbb{Z}$, $n>1$. The equation $[a]\odot x=$ has a solution$latex \mathbb{Z}_n\$ if and only if $(a,n)=1$.

To avoid repeating the equation $[a]\odot x=1$ let’s define something to indicate when we reference this:

Definition:

A non zero $[a]$ in $\mathbb{Z}_n$ is called a unit if $[a]\odot x=$ has a solution $x\in\mathbb{Z}_n$.

A solution $x=$ of $[a]\odot x=$ is called a multiplicative inverse of a.

Using this new definition let’s re-write Theorem 2.9: $[a]$ is a unit if and only if $(a,n)=1$.

Definition:

A non zero element of $\mathbb{Z}_n$ is called a zero-divisor if $[a]\odot x=$ has a non  zero solution $x=[b]$ in $\mathbb{Z}_n$.

Something not mentioned in the third edition of Hungerford’s Abstract Algebra but useful nevertheless are the following facts:

For any non-zero $a\in\mathbb{Z}_p$ (p is prime) $ax=b$ has a unique solution.

If $(a,n)=1$, then $ax=1$ has a unique solution.

If $(a,n)=d>1$, then $ax=b$ has solutions if and only if $d\mid b$, and in this case there are exactly d solutions.