Negative and non-negative numbers
A negative number is a number that is less than zero, such as -3. A positive number is a number that is greater than zero, such as 3. Zero itself is neither negative nor positive. The non-negative numbers are the positive numbers together with zero. Note that some numbers are neither negative nor non-negative, for example the imaginary unit i.
| Table of contents |
|
2 Positive numbers 3 Non-negative numbers 4 Sign function 5 Arithmetic involving signed numbers 6 Computing |
Negative numbers
These include negative integers, negative rational numbers, negative real numbers, negative hyperreal numbers, and negative surreal numbers.
Negative integers can be regarded as an extension of the natural numbers, such that the equation x - y = z has a meaningful solution for all values of x and y. The other sets of numbers are then derived as progressively more elaborate extensions and generalizations from the integers.
Negative numbers are useful to describe values on a scale that goes below zero, such as temperature, and also in bookkeeping where they can be used to represent debts. In bookkeeping, debts are often represented by red numbers, or a number in parentheses.
A number is positive if it is strictly greater than 0. Zero is not a positive number, though in computing zero is sometimes treated as though it were a positive number (due to the way that numbers are typically represented).
In the context of complex numbers positive implies real, but for clarity one may say "positive real number".
A number is nonnegative if and only if it is greater than or equal to zero, i.e. positive or zero. Thus the nonnegative integers are all the integers from zero on upwards, and the nonnegative reals are all the real numbers from zero on upwards.
A real matrix A is called nonnegative if every entry of A is nonnegative.
A real matrix A is called totally nonnegative by matrix theorists or totally positive by computer scientists if the determinant of every square submatrix of A is nonnegative.
It is possibe to define a function sign(x) on the real numbers which is 1 for positive numbers, -1 for negative numbers and 0 for zero:
This can in a sense be extended to complex numbers, by writing then as z = r eiθ, with r>0 and real, and looking at eiθ, i.e. . Again 0 needs to be treated as a special case.
For purposes of addition and subtraction, one can think of negative numbers as debts.
Adding a negative number is the same as subtracting the corresponding positive number:
Multiplication of a negative number by a positive number yields a negative result: (-2) · 3 = -6. The reason is that this multiplication can be understood as repeated addition: (-2) · 3 = (-2) + (-2) + (-2) = -6. Alternatively: if you have a debt of $2, and then your debt is tripled, you end up with a debt of $6.
Multiplication of two negative numbers yields a positive result: (-3) · (-4) = 12. This situation cannot be understood as repeated addition, and the analogy to debts doesn't help either. The ultimate reason for this rule is that we want the distributive law to work:
Positive numbers
Non-negative numbers
Sign function
We then have (except for x=0):
where |x| is the absolute value of x and H(x) is the Heaviside step function. Arithmetic involving signed numbers
Addition and subtraction
Subtracting a positive number from a smaller positive number yields a negative result:
Subtracting a positive number from any negative number yields a negative result:
Subtracting a negative is equivalent to adding the corresponding positive:
Also: Multiplication
The left hand side of this equation equals 0 · (-4) = 0. The right hand side is a sum of -12 + (-3) · (-4); for the two to be equal, we need (-3) · (-4) = 12.