Primes in ring theory I have this definition of primes in my lecture notes and I don't understand it i was wondering whether someone could explain it to me
$p$ is prime if and only if for all $a$, $b$ that are elements of $R$, we have $p \mid ab$ implies $p \mid a$ or $p \mid b$.
See I am rather lost by this definition.
 A: Have you tried seeing why composite numbers don't fit that definition?
For example, take $p = 14$, $a = 2$, $b = 49$. Then $ab = 98$ is divisible by $p$. However, $2$ is clearly not divisible by $14$, nor is $49$ divisible by $14$ either. No surprise, given that $14$ is composite, not prime.
Now consider $p = -7$, $a = 2$, $b = 49$. Then $ab = 98$ is divisible by $p$, just like before. Although $2$ is not divisible by $-7$, $49$ is. We can choose other $a$ and $b$ such that $ab = 98$, but it is guaranteed that in each case we will find that $-7$ is a divisor of either $a$ or $b$, if not both. Indeed $-7$ is a prime number.
Working in $\mathbb{Z}$ this might not seem like such a big deal. Look at almost any other number ring and this becomes a very important distinction.
A: When $R$ is a UFD (unique factorization domain, e.g. $R = \mathbf Z$) then the following two concepts are equivalent for an element $p \in R$ and $p$ is not zero and $p$ is not a unit:


*

*$p$ is irreducible, meaning whenever $p$ is written as a product of two other elements of $R$, i.e. $p = ab$, then either $p \mid a$ or $p \mid b$. Necessarily, if $p$ divides $a$ or $b$ the other has to be a unit in $R$. For example, if $p \mid a$ and we write $a = pc$ for some $c \in R$ then $p = ab = pcb$ so $1 = cb$ and hence $b$ has an inverse, namely $c$.

*$p$ is prime, meaning whenever $p$ divides a product of two other elements, i.e. $p \mid ab$, then $p \mid a$ or $p \mid b$.
The classical definition of a prime number is an irreducible element of $\mathbf Z$ and prime numbers are indeed prime elements as defined above.
Historically, when attempting to prove Fermat's Last Theorem ($x^n + y^n = z^n$ has no solutions for $n \ge 3$ except when one of $x, y$ or $z$ is zero) mathematicians (such as Dedekind and Kummer) noticed that when $p$ is prime, we can factor $x^p + y^p$ as
$$ (x + y)(x + \zeta y)\cdots(x + \zeta^{p-1} y) \tag{1}$$
where $\zeta$ is a principal $p$-th root of unity. (It was already known that if Fermat's Last Theorem could be proved for prime exponents, it holds for all exponents.)
What was noticed is that if $x^p + y^p = z^p$ then $(1)$ and $z^p$ are two different factorizations of $z^p$. The issue is, $\mathbf Z[\zeta]$ isn't always a UFD.
This prompted a more serious look at rings which aren't UFDs but still come from adjoining roots of polynomials, such as $\zeta$ to the integers.
For example, in $\mathbf Z[\sqrt{-5}]$ we have non-unique factorization:
$$ 21 = 3 \cdot 7 = (1 + 2\sqrt{-5}) \cdot (1 - 2\sqrt{-5}).$$
The idea to solve this is that somehow there were a larger class of "ideal numbers" in which we get a unique factorization. That is, there would be "ideal primes" $\mathfrak{p}_1, \mathfrak{p}_2, \mathfrak{p}_3, \mathfrak{p}_4$ such that
$$ 3 = \mathfrak{p}_1\mathfrak{p}_2, 7 = \mathfrak{p}_3\mathfrak{p}_4 $$
and
$$ (1 + 2\sqrt{-5}) = \mathfrak{p}_1\mathfrak{p}_3, (1 - 2\sqrt{-5}) = \mathfrak{p}_2\mathfrak{p}_4 $$
these "ideal primes" give us a unique factorization of $21$ into "ideal numbers".
Well, when you look at what properties you want of an "ideal number" you find that they should basically be defined in terms of divisibility. Here, $\mathfrak{p_1}$ and $\mathfrak{p_2}$ "divide" $3$.
Carrying on with this idea, you realize that an "ideal element" $\mathfrak{a}$ isn't anything more than the set of things it divides:
$$ \mathfrak{a} ``=" \{a \in R : \mathfrak a \mid a\}. $$
This is where the definition of an ideal inside a ring came from.
Of course, in a ring that isn't a $UFD$, talking about "factoring numbers" isn't well-defined. So what mathematicians did is move away from the notion of irreducible elements to the notion of prime elements which can be phrased naturally in terms of ideals. Specifically, an ideal $\mathfrak{p}$ is prime if whenever $ab \in \mathfrak p$ (in terms of "ideal primes" this says that $\mathfrak p \mid ab$) then either $a \in \mathfrak p$ or $b \in \mathfrak p$.
In a UFD, all these notions are the same:
$p$ is irreducible if and only if $p$ is prime if and only if the ideal $(p)$ is a prime ideal.

This explanation of "ideal elements" is based off of Chapter 1.3 in Neukirch's Algebraic Number Theory.
