Ah, my original field of expertise. Once, when the dwarves still slept, I did a lot of work on rings and ideals.
Prime numbers are generators of prime ideals in the domain of Z. Of course, any multiplication with any divisor of 1 (and -1 is a divisor of 1), will leave the prime ideal intact.
So yes, you can call -2 or -11 a prime number if you want to. You will not gain any results from it, though.
The definition "up to unities" is generally when you abstract things and talk about unique factorization rings. Then your "primes" (formally irreducible elements) become equivalence classes up to unities.
In the concrete integers though AFAIK it's more conventional to only consider positive primes, so that the decomposition is canonical. Probably I should have said that you lose canonicity.
Well, if you're speaking about non-negative integers, you don't have the problem of the primality of negative numbers.
If you're considering relative integers, still you don't really have a unique factorization property, because negative integers do not have a factorization altogether (in terms of positive primes). So you have to stipulate that a prime factorization is not just a "product of primes", but a "product of primes, perhaps times -1", which is still not the way you usually define it. So I am not totally convinced.
In the end, everybody just pick the definition they like.
What about complex numbers? is there something similar there? Not even so much necessarily on the negative numbers. Anything interesting amongst the Js?
Yes, there is such a thing as complex prime numbers.
If you restrict yourself to looking at numbers whose real and imaginary parts are both integers, then you have a ring called the Gaussian integers. A Gaussian integer a + bi is prime if and only if neither a nor b are zero and a^2 + b^2 is a prime number in the integers, or it is a product of +-1 or +-i and a prime integer of the form 4k+3.
Oh cool, thanks for posting this! I used to do that back in school to kill time and later started using it to create drawings by following connect-the-dots rules. We had a get together some time ago (before Covid) where we did communal painting, and one of the rules produced a nice bird-looking thing. :) Great to see there is a name for this sort of thing.
Huh, I'd never heard of that one. I suppose that means that E8 is the equivalent for octonions? That loses the concept of "prime," which is no surprise, because the octonions are not a field, but I wonder if one could bring it back by substituting irreducible representations for primes, somehow? I'm not sure how to carry this off, because I dropped representation theory in grad school, but it seems like an interesting concept to play with, at least.
https://en.m.wikipedia.org/wiki/Ring_(mathematics) it’s a little hard to describe as it’s fairly abstract.
It’s a structure that is subset of abelian groups (groups where operations on elements of the group don’t depend on the order written, ie x+y = y+x).
For example the set of ints with “normal” addition and multiplication is a communicative ring
A number system with a notion of addition and multiplication. Examples are the integers, rationals, complex numbers, polynomials over any of the above, and so on.
From a programming point of view, imagine a type with an overloaded + and * operator. You'll be close.
A set equipped with operations addition , negation, multiplication, and often a 1 as an identity element of the multiplication, where the addition is associative and commutative and has the negation as its inverse, and the multiplication distributed over the addition. Sometimes people don’t always require that they include a unit for the multiplication.
An example of a ring is the set of integers, as is the set of integers mod 6, as is any field. A non-example is the set of non-negative integers.
As a layman (mere college math major), I liked the explanation that a prime is only divisible by itself, which gets screwed up if it's also divisible by the negative of itself. At least it necessitates adding a layer of obfuscation to the layperson's definition of "prime" that doesn't add any useful mathematical insight.
On the other hand if you're programming a function isPrime() for some practical purpose, then whether you include negative numbers will be dependent on that purpose. Whether you include floating point numbers will be between you and your conscience. ;-)
I agree on all counts. But, the other answers that say that p is prime iff p is not a unit, and p | ab implies p | a or p | b, or, alternatively and equivalently, p is prime iff p generates a prime ideal, are really the essential qualities of what makes something prime. And, even at that, most of the time, one doesn't care very much about whether individual elements of a ring are prime, but rather what are the prime ideals. The set of all prime ideals of a ring is called the spectrum of the ring, and can be used to impose a topology on it called the Zariski topology. This is useful for turning algebraic questions about a ring into topological questions that can be answered with topological methods.
If you go that way, it opens a rabbit hole that just goes on and on....
rational prime, primitive ideals, prime ideals, primaries and semiprimes...
... if p is a rational prime and d be a squarefree integer, then p is prime in Z[√d] if and only if f_d(x)= x²-d is irreducible mod p.
This happens a lot in mathematics. Definitions that depend on intuition usually have very weird edgecases. When you formalise a definition and explore the definition to a “wider” domain, then the intuition usually breaks and can have surprising consequencies. It also happens a lot in calculus. Things that work beautifully to continuous smooth functions can have an a strange edge cases. Eg if you add infinitely many continuous and smooth wave functions the result can be a non continuous function. Same here, the intuitive definition of a prime, when formalised, and applied to non positive number sets have unintuitive consequencies. One is that it can actually work.
Classic primes are defined on the natural numbers. If you want to extend primes to cover the nonzero integers, a useful definition should preserve unique factorization; that is, there should be only one way to factor a number. The only way to do that is to say that -1 is a prime but no other negative integer is. -2 is not prime because is is -1 times 2.
A prime element of a ring (like the integers) is defined to be a non-unit p that satisfies p|ab => p|a or p|b. A unit is defined to be a number that you can divide by. Therefore the units in the integers are {-1,+1}. Based on that, -2 is prime element and -1 is not.
The statement of unique factorisation is more complicated when using this definition of prime, but it allows us to talk about primes in the Gaussian and Eisenstein integers, as well as other Unique Factorisation Domains.
We could but it's inconvenient, so we don't usually allow that.
Specifically, allowing negative numbers (or the number 1) to be primes screws up the fact that every natural number otherwise has a unique factorization.
Not really. Unique factorization is defined up to units, so, factors of +-1 don't matter. 1 is not a prime because it's a unit, and the ideal it generates is trivial; it's the entire ring, so, for Z, it's all of Z.
> every integer greater than 1 either is a prime number itself or can be represented as the product of prime numbers and that, moreover, this representation is unique, up to (except for) the order of the factors.
Look up the definition of a Unique Factorisation Domain and a prime element of a ring. The theorem that the integers form a UFD necessarily takes into account negative primes.
Allowing 1 to be prime is a lot worse. The integers modulo 1 don't form a field, but modulo a negative prime they do. I think algebraists do generally consider negative primes to be primes.
It's even worse than that. Because integers a and b are congruent modulo n iff n | a - b, and 1 divides every integer, the integers modulo 1 has only 1 element. This gives you the somewhat pathological object called the zero ring: https://en.wikipedia.org/wiki/Zero_ring
Prime numbers are generators of prime ideals in the domain of Z. Of course, any multiplication with any divisor of 1 (and -1 is a divisor of 1), will leave the prime ideal intact.
So yes, you can call -2 or -11 a prime number if you want to. You will not gain any results from it, though.