There is a discussion in this post's comments section⁽¹⁾ that this works for fields and rings too.
I know there are precise definitions for fields and rings but can someone here give me some good examples of fields and rings? Being a non-mathematician, I find it easy to manipulate examples than manipulate definitions.
Are the set of integers a field? I guess not because the multiplicative inverse of 2 is not present in this set.
Is the set of integers a ring? I think, yes.
For prime p, is Z_p = {0, 1, ..., p - 1} a field? I think, yes.
Are there any non-numeric rings where product of negatives is positive?
There's a subtle point to keep in mind when generalizing to rings/fields. The concept of 'positive' and 'negative' are defined in terms of an order relation,
e.g., 'positive' means >0 and 'negative' means <0. The integers / real numbers have the usual order relation such that the additive inverse of a positive number is negative and vice versa, but an arbitrary ring or field might not even have an order relation.
For example, the integers mod n is a ring, so (-a) * (-b) = a * b holds, but it doesn't make sense to call a number mod n positive or negative, since -a mod n effectively means n - a mod n.
(posted an earlier version of this comment on susam.in.)
> The concept of 'positive' and 'negative' are defined in terms of an order relation, e.g., 'positive' means >0 and 'negative' means <0.
I thought the concept of "negative" was defined by reference to an operation. "Negative 5" is whatever value Q satisfies the equation 5 + Q = 0.
That definition immediately tells you that the negative of a negative is a positive. Once we know 5 + Q = 0, we ask what the negative of Q is. It's the value V such that Q + V = 0. But by the definition of Q (and the commutativity of addition), we already know V = 5.
Once you define negatives this way, it's trivial to show that negatives obey the standard ordering. But that ordering wasn't necessary in order to define them.
Summing up, the product of negatives is positive because negation is a kind of inversion (additive inversion), and two successive inversions always cancel in any context.
That's precisely the subtlety I'm talking about, in which additive inverses and real numbers less than 0 can both be referred to as 'negatives', and that the operation of taking additive inverses and real numbers less than 0 both use the symbol '-'.
It's pretty standard, though, that a 'negative number' is one that is less than 0, and a 'positive number' is one that is greater than 0, where a 'number' is an element of some subring of the reals.
I don't understand the point you're trying to make. You claimed that negative and positive are defined by absolute reference to zero. I claimed that they aren't. But you're presenting an example that assumes I'm right and you're wrong!
> For example, the integers mod n is a ring, so (-a) * (-b) = a * b holds, but it doesn't make sense to call a number mod n positive or negative, since -a mod n effectively means n - a mod n.
If negative numbers were defined by reference to a comparison to zero, then the expression (-a) * (-b) would be meaningless nonsense in Z mod 5 -- as you point out yourself, Z mod 5 is not ordered in that way. But it isn't nonsense, and you're not saying it is -- instead, you assume it's obviously valid when you observe that the equality (-a)(-b) = ab holds.
I guess I'm not being too clear, so I'll try again. There are two concepts:
1) Positive and negative numbers (defined in terms of comparison to 0)
2) The negation of a number (i.e., the additive inverse)
They're related in that when both concepts are defined, a negative number is the negation of a positive number. However, the two concepts don't coincide. I'm sure you know this, but even over the reals '-x' is the negation of a number, but not necessarily a negative number.
(-a) * (-b) = a * b is an equation about #2, and it holds in any ring/field, even ones where #1 doesn't make sense, e.g. Z mod 5. If #1 makes sense, then this immediately implies that the product of two negative numbers is positive.
My original point was that the blog post is talking about real numbers, for which #1 and #2 are both defined. However, if it's generalized to arbitrary rings/fields, where only #2 is defined, then you can't really refer to the equation '(-a) * (-b) = a * b' as 'the product of two negative numbers is positive'.
In Z mod 5 using your notation, you have that 3 = -2. It doesn't make sense to distinguish two classes of "negative" and "positive" numbers in that case, but it still makes sense to talk about -2.
That was precisely the original point - the distinction only makes sense in an ordered set; otherwise, calling -2 "negative" may be devoid of any meaning (e.g. when -2 = 3).
The typical example of a field is the collection of rational numbers. These are still numeric, so they might not seem too exotic. Similarly, the typical example of a ring is the collection of single-variable polynomials with ringed (integer) coefficients. In both of these examples, the product of negatives is positive.
A more interesting example: If R is a ring, then R-valued square matrices of fixed size also give a ring, using addition and multiplication of matrices. Matrices aren't just positive, negative, or zero; they can have a mix of positive and negative entries. In these "matrix rings", the product of negatives isn't exactly positive, although I bet that somebody can make this more rigorous. (Come to think of it, this applies to the rings of polynomials, too.)
I know there are precise definitions for fields and rings but can someone here give me some good examples of fields and rings? Being a non-mathematician, I find it easy to manipulate examples than manipulate definitions.
Are the set of integers a field? I guess not because the multiplicative inverse of 2 is not present in this set.
Is the set of integers a ring? I think, yes.
For prime p, is Z_p = {0, 1, ..., p - 1} a field? I think, yes.
Are there any non-numeric rings where product of negatives is positive?
⁽¹⁾ https://susam.in/blog/product-of-negatives/comments/