Are there number systems or rings in which not every number is a product of primes?

I am reading through some number theory and abstract algebra books, and in the number theory books they all prove the theorem which states that every integer is a product of primes (irreducibles). In particular, in Hardy and Wright, they prove that every element in $\mathbb{Z}[i]$ and $\mathbb{Z}[\rho]$ where $\rho:=e^{\frac{2}{3}\pi i}$ is a product of primes, where they define primes to be elements who are only divisible by themselves and the units of their ring. They prove it in a way which uses the norm function ($N(a+bi)=a^2+b^2$), and I believe the proof can be easily adapted to include any euclidean domain.

This property (ability for every element to be written as a product of primes, not necessarily unique) seems so inherent to me, so I am wondering: are there any number systems or rings in which not every element can be written as a product of primes?

Clarification: I am only talking about the non-units of a ring (that aren't 0). Units are not considered to be prime. $\mathbb{Q}$ satisfies this property because there are no non-units (except 0).

Clarification 2: The answer given by Barry Smith was great in that it gave an example of a ring which was not a field but contained no primes so it had nonunit elements that were not products of primes, but I was really looking for a ring which contained primes/irreducibles and also contained elements that could not be expressed as a product of primes/irreducibles. My intuition states that this does not exist straightforwardly from the definition of prime/irreducible. The reason I question my intuition is because my number theory book exploits the norm function, which is a function that not all rings contain.

• Consider the rational numbers $\Bbb Q$. There are no primes. – MJD Mar 29 '15 at 1:02
• Sorry, I meant the non-units. I will add that. – ASKASK Mar 29 '15 at 1:03
• See the example in this answer. – Bill Dubuque Mar 29 '15 at 7:33

Yes, the ring of all algebraic integers has this property. Considered as a subring of the complex numbers, this is the set of all zeros of monic polynomials with integer coefficients. It is well known that this set forms a subring of the complex numbers.

Being a subring of the complex numbers, it is an integral domain. Thus, every prime element is irreducible. If an element of this ring is a product of primes, then it is a product of irreducibles. Thus, it suffices to show that the ring of all algebraic integers contains no irreducible elements.

Since the ring of all algebraic integers is not a field, we may choose a nonzero nonunit algebraic integer $x$. Then $x = \sqrt{x} \cdot \sqrt{x}$ is a factorization into non-unit algebraic integers.

This ring does, however, have prime ideals. See here:

Prime ideals in the ring of algebraic integers

Edit: The ring of algebraic integers in the field $k = \mathbb{Q}(\sqrt{2}, \sqrt[4]{2}, \sqrt[8]{2}, \ldots)$ is an example where there exist irreducible elements (e.g., the rational integer 5) but in which not every element factors into a finite product of irreducibles (e.g., the rational integer 2 does not).

To see that $2$ does not factor as a finite product of irreducibles, note that if it did, then there would exist $n$ such that all of these irreducibles are contained in $\mathbb{Q}(\sqrt[n]{2})$. But in this field, the we have the ideal factorization $(2) = \left( \sqrt[n]{2} \right)^n$. It follows that an irreducible factor of $2$ could only be an associate of $\sqrt[n]{2}$, but these are not irreducible in $k$.

To see that $5$ is a prime element of $k$, note again that if the prime property failed, the elements involved would all exist in some common $\mathbb{Q}(\sqrt[n]{2})$, so $5$ would fail to be prime in this number field. It suffices, then, to show that the principal ideal $(5)$ is a prime ideal in the number field $F = \mathbb{Q}(\sqrt[n]{2})$.

Edit: Professor Lubin gives a short, elegant proof of this fact in his answer to this same post.

Alternatively, here is my original complicated argument. Consider the larger field $L = F(\zeta_{2^n})$ obtained by adjoining the $2^n$th roots of unity, which contains the subfield $K=\mathbb{Q} (\zeta_{2^n})$. Then $K/\mathbb{Q}$ is a cyclotomic extension, while $L/K$ is a Kummer extension. The following facts are well-known:

1. The inertial degree of a rational prime in $K/\mathbb{Q}$ is equal to the order of the prime in the group of units of $\mathbb{Z}_{2^n}$.
2. The number 5 generates a subgroup of this group of units of index $2$, so has order $2^{n-2}$ in the group.

In $K$, then, $5$ splits first as $(1+2i)(1-2i)$ in $\mathbb{Q}(i)$ and then remains inert the rest of the way up. If we show that $5$ continues to remain inert in $L/K$, then $5$ will have to be inert in $F/\mathbb{Q}$ since $F$ does not contain $\mathbb{Q}(i)$.

To see that the two prime ideals dividing $5$ are inert in the extension $L/K$, we note that $L/K$ is a tower of quadratic extensions with a totally ordered diagram of intermediate fields. It follows that if a prime is inert in the lowest quadratic extension $K(\sqrt[4]{2})$, then it remains inert throughout the extension $L/K$. Use some method to check that $5$ is inert in the extension $\mathbb{Q}(\sqrt[4]{2},\zeta_{16})/\mathbb{Q}(i)$. It follows that in the three quadratic extensions of $\mathbb{Q}(i)$ contained within $K(\sqrt[4]{2})$, the primes dividing $5$ do not split. The decomposition group of $5$ for the extension $K(\sqrt[4]{2})/\mathbb{Q}(i)$ must then be the entire Galois group, so the primes dividing $5$ are indeed inert in $K(\sqrt[4]{2})/K$ as claimed.

• This is an interesting example. I was more looking for something along the lines of a ring which does contain irreducibles but not every element can be written as a product of them. – ASKASK Mar 29 '15 at 3:17
• How about this: consider the ring of algebraic integers in the field $k(\sqrt{2}, \sqrt[4]{2}, \sqrt[8]{2}, \ldots)$. Then, for instance, $5$ is prime in this field, but by the same reason as above, $2$ is not a product of primes. – Barry Smith Mar 29 '15 at 3:44
• That is what I was looking for! I suggest you add that example to your question so that others can see it more easily. – ASKASK Mar 29 '15 at 3:49
• Hmmm, maybe I was too hasty. I'll have to think about my claims about this example more. But sleep calls -- I'll think about it in the morning. – Barry Smith Mar 29 '15 at 3:56
• I admit that I thought that @BarrySmith’s claim that $5$ remained prime in $\Bbb Q(2^{1/2^n})$ for all $n$ seemed implausible, but then I checked, and found that he was quite right. And the reason that it’s true is very beautiful. Barry, I’ll wait a while, and if you don’t add the argument, I’ll do so myself. (His answer to your question is completely correct, and should not be dismarked.) – Lubin Mar 29 '15 at 4:06

A well known example of a ring in which has irreducibles, but in which not every element is a product of irreducibles, is the ring of entire functions. The (multiplicatively) invertible entire functions are those that have no zeros, like the complex exponential (or nonzero constant functions of course). If an entire function has a zero in $a\in\Bbb C$, then it is divisible by $X-a$. It follows that up to invertible factors the entire functions $X-a$ are precisely the set of irreducible elements. Then the only entire functions that decompose into irreducibles are the (up to an invertible factor) polynomial functions, which of course far from covers all entire functions (think of $\sin$, the inverse of the $\Gamma$ function,...).

• This is very nice. We (almost) pure algebraists tend to forget and ignore the vast universe of useful examples from analysis. – Lubin Mar 30 '15 at 22:53

This answer deals only with the fact that $5$ remains prime in every extension $\Bbb Q(2^{1/2^n})$. I hesitated a bit to give a proof so close to Barry’s, but since it is incrementally more elementary, I decided to go ahead.

My argument depends only on the fact that if $p$ is a prime in $\Bbb Z$, and $K$ is an extension of $\Bbb Q$ of degree $n$, in whose ring of integers the primes above $p$ are $\mathfrak p_1,\cdots, \mathfrak p_m$, each $\mathfrak p_i$with its ramification index $e_i$ and residue field extension degree $f_i$, then $$n=\sum_{i=1}^me_if_i\>\>.$$ I’ll show that for $p=5$, adjoining the $2^n$-th root of $2$ must require the residue field to be $\Bbb F_{5^{2^n}}$, that is, an extension of the prime field $\Bbb F_5$ of degree $2^n$. Since that’s the degree of the field $K_n$ of $2^n$-th roots of $2$, we must have $m=1$, and furthermore the unique ramification index $e$ must be $1$. As a result of the last fact, $\mathfrak p$ is generated by $5$, so that $5$ remains prime in $K_n$.

Now for my claim that the residue field has $5^{2^n}$ elements when you adjoin a $2^n$-th root of $2$ to $\Bbb F_5$. In the prime field, $2$ is a primitive fourth root of unity, so that to adjoin its $2^n$-th root, you’re adjoining a primitive $2^{n+2}$-th root of unity. For finite fields $k=\Bbb F_{5^N}$ of characteristic $5$, the following are equivalent: $$2^{n+2}\big||k^*|\Leftrightarrow |k|\equiv1\pmod{2^{n+2}}\Leftrightarrow 5^N\equiv1\pmod{2^{n+2}}\,.$$ But you easily show that for any integer $a$ and any $r\ge2$, if $a=1+2^nu$ with $u$ odd, then $a^2=1+2^{n+1}u'$ with $u'$ odd as well. In particular $5^{2^M}=1+2^{M+2}u$ for an odd number $u$. Therefore, to get the primitive $2^{n+2}$-th roots of unity in a finite field of characteristic $5$, you exactly need an extension of the prime field of degree $2^n$, as I claimed.

• Wow this looks like a wonderful answer. Sadly I don't know enough algebra to understand it (I mainly don't know what ramification indexes or residue field extensions are) but I hope others can benefit from it. – ASKASK Mar 30 '15 at 2:57
• In general, $p=\mathfrak p_1^{e_1}\cdots\mathfrak p_m^{e_m}$, by the factorization of ideals in the integers of the extension field. The $e_i$ are the ramification indices. Take one of the primes in the factorization, say $\mathfrak p_i$. Then, if the ring of integers in the extension is $R$, you have a field $R/\mathfrak p_i$, finite, of degree $f_i$ over the prime field $\Bbb F_p$. That $f_i$ is the residue field extension degree for that upstairs prime. – Lubin Mar 30 '15 at 3:09
• Ahhhhhhhhh, very nice. I'll direct people to this answer in the relevant part of my answer. – Barry Smith Mar 30 '15 at 19:42