|Binary||−1 or 11111111 |
(two's complement signed byte)
|Hexadecimal||−1 or FF |
(two's complement signed byte)
Negative one has some similar but slightly different properties to positive one. Negative one would be a multiplicative identity if it were not for the sign change:
We make the definition that x−1 = 1/x, meaning that we define raising a number to the power −1 to have the same effect as taking its reciprocal. This is a sensible definition to make since it preserves the exponential law xaxb = x(a + b) in the case when a or b is negative (i.e. in the case when a and b are not both nonnegative.)
The two square roots of the real number negative one are the imaginary units i and −i.
Negative one bears relation to Euler's identity since .
Why is -1 times -1 equal to 1?
Why is −1 multiplied by −1 equal to 1? More simply, why is a negative times a negative a positive? There are two ways to answer this question. The first is intuitive and conceptual; the second is formal and algebraic.
There are many ways to conceptualise multiplication. Let's confine ourselves to positive numbers, for the moment.
Now, multiplication is basically repeated addition. To multiply 5 by 3, we can imagine a straight stick 5 metres long in front of us. We lay it out flat 3 times in the same direction, with the back tip of the stick placed where the front tip was on the previous time. After we lay it down 3 times, the front tip will lie exactly 5 × 3 = 15 metres from the back tip where we originally placed it.
What would it mean to lay down a stick "negatively many times"? One answer is to say that it would result in a displacement where, if we were to lay it down 3 times immediately after, we would return to where we started. Imagine performing this. It is the same action as multiplying by a positive number except we are pointing in the opposite direction. If we were going east to multiply by a positive, we go west to multiply by a negative.
This is fine, but it only covers a stick of "positive length". How do we multiply using this type of stick? If we assume that multipliction should not depend on order, then 5 × −3 = −3 × 5 = − 15. Now, stand at a point. Laying out a stick of length 5 minus 3 times sends us 15 metres west, (using the east/west above). However, this is the same result as if we had pointed west originally and laid a stick of 3 metres down 5 times. In other words, to multiply using a stick of negative length, we should point ourselves in the opposite direction before laying down the stick.
Now, we can see why −1 × −1 = 1. We point east originally. Our stick has length −1, so we turn ourselves to point west. Then, we lay the stick down negative one times, i.e. we point ourselves back again in the east direction and lay the stick down. This is the same as if we had simply dropped the stick in front of us pointing east without moving ourselves at all.
The algebraic explanation is essentially a formalisation of the above intuitive explanation. Start with the equation
The first equality follows from the fact that "anything times zero is zero". The second follows from the definition of −1 as additive inverse of 1: it is precisely that number that when added to 1 gives 0. Now, using the distributive law, we see that
The second equality follows from the fact that 1 is a multiplicative identity and simple addition. But now we an add 1 to both sides of this last equation to see that −1 × −1 = 1.
The above argument holds in any associative ring with 1. It has a flavour common to some of the basic results in abstract algebra.
There are a variety of ways that −1 (and negative numbers in general) can be represented in computer systems, the most common being as two's complement of their positive form. Since this representation could also represent a positive integer in standard binary representation, a programmer must be careful not to confuse the two. Negative one in two's complement could be mistaken for the positive integer 2n − 1, where n is the number of digits in the representation (that is, the number of bits in the data type). For example, 11111111 represents −1 in two's complement, but represents 255 in standard binary representation.