Chapter 3
Looking at the Numbers that Count:
Natural Numbers
Natural numbers are basic numbers, which are also called counting numbers.
Most people just call them numbers. Natural numbers have a familiar look: 1, 2, 3, 4, 5, 6, and so forth. They’re whole numbers (as opposed to fractions) and they don’t include zero (0) or negative numbers. They serve two purposes:
✓ Counting: Counting is the technique you use for inventory and all stock keeping. Natural numbers are also the fundamental unit of purchas- ing, no matter what your line of business is. Today, online shopping carts ask the fundamental counting question “How many?” Whether you’re counting or buying 500 milliliter Erlenmeyer flasks or barrels of transmission fluid, you’ve got to know what quantity you have or want.
Using natural numbers takes on a personal meaning after work. As you stand in the express checkout line, your blood is chilled by a sign reading “Ten items or less.” You must quickly count the items in your cart (notice that the types of products, their prices, or their sizes don’t matter anymore) to make sure you’re not above the maximum.
✓ Ordering: You use natural numbers for ordering, describing things in a certain order. When you list the first (1st), second (2nd), third (3rd), and fourth (4th) largest cities in your state, you’re using natural numbers for ordering. In your personal life, using numbers for ordering becomes painfully clear at the Department of Motor Vehicles. You hold a small piece of paper that says “#89,” and an electric sign says “Now serving
#4.” The numbers show the order in which people are being served and your position in that order. They also show that you’re in for a long wait.
The set of natural numbers doesn’t include zero. In simple counting, you can’t have zero apples or zero oranges. Zero is part of a larger group of numbers.
Check out “Zero: Making math easier” later in the chapter for more on this number.
However, an exception exists in the field of computing: Zero becomes the first counting number and takes the first position in arrays and other data struc- tures. Don’t be surprised to see for(i=0;i < 100;++i); sum = sum + grades [i];
used to loop through positions 0 to 99 in a 100-element array.
Integers: Counting numbers with extras
Integers are like counting numbers, but there are more of them. The set not only includes the counting numbers (1, 2, 3, 4, 5, 6, and so forth) but includes zero (0) and negative numbers (–1, –2, –3, –4, –5, –6, and so forth). You can
07_598740-ch03.indd 32
07_598740-ch03.indd 32 5/26/10 10:12 AM5/26/10 10:12 AM
33
Chapter 3: Zero to One and Beyond
also call these numbers whole numbers. Say the word integer with a soft g.
That is, say “in-tuh-jer.” Taken together, integers form a nice line:
. . . –6 –5 –4 –3 –2 –1 0 1 2 3 4 5 6 . . .
Integers can be positive or negative, odd or even. A negative number is a number that’s less than zero. Of course, a positive number is greater than zero.
An even number can be divided by 2 with no remainder. An odd number can’t be evenly divided by 2. Zero is an even number. However, it’s not positive or negative — it’s just zero.
These integers look as orderly and evenly spaced as the chorus line in a Broadway musical. And it’s no wonder, since each integer differs from the others beside it by just one. As you can imagine, if you have an infinitely wide stage, the negative integers at the left extend forever. The positive integers at the right do the same thing.
Integers are the numbers you use to perform all simple math. You can do all arithmetic operations (addition, subtraction, multiplication, and most divi- sion) with integers. Integers are also useful for plotting the points on a graph or chart.
Where do they get these names? The word integer comes from Latin and means untouched. You can’t touch an integer, so you can’t break it — it’s an unbroken or whole number. (Speaking of untouchable, integer is a relative of the word integrity.)
Zero: Making math easier
What is zero (0)? How can it be important when it’s really nothing at all? Zero may look like nothing, but it represents something — it appears in numbers and in calculations where digits ought to be. It’s a placeholder, a kind of punc- tuation mark that helps you interpret numbers correctly.
And why’s that valuable? Because you (and most of the world) use a decimal number system, and it’s a positional system. In a three-digit number, such as 123, those digits are more than just a 1, a 2, and a 3:
✓ The position of the 1 means that 1 is the number of hundreds, because it’s in the third column from the right.
✓ The position of the 2 means that 2 is the number of tens, because it’s in the second column from the right.
✓ The position of the 3 means that 3 is the number of ones, because it’s in the first column from the right.
07_598740-ch03.indd 33
07_598740-ch03.indd 33 5/26/10 10:12 AM5/26/10 10:12 AM
Pretty straightforward so far, because you don’t need a placeholder. But what happens when you have one hundred and three single items? How do you write that without a placeholder?
✓ You can write 13, but that’s misleading and just plain wrong.
✓ You can try 100 + 3, but such a system of notation makes math opera- tions much tougher.
✓ You can try Roman numerals and write 103 as CIII, but the disadvantages of Roman numerals (with only seven symbols and no zero) are many and make the system a poor candidate for math.
Ladies and gentlemen, boys and girls, what you need is a placeholder. In the number one hundred and three, let the 1 show one hundred, use a 0 show no tens, and have the 3 show three units, giving you 103.
Zero and the decimal system made most other math systems obsolete.
Mathematicians point out that the decimal system is a base 10 system. The Maya of Central America used a base 20 system, and they used zero, too.
There are vestiges of the base 12 system in today’s twelve-hour clocks. And for the nerdy band of brothers, the computer age brought forth the base 2 (binary) and base 16 (hexadecimal) systems.
Zero can be your biggest friend in mathematics because it makes for quick work:
✓ Whenever you multiply anything by zero, the answer is always zero. For example, 3 × 0 = 0; 274,561 × 0 = 0; and so forth.
✓ When you add 0 to a number, the answer is the same number. For exam- ple, 2 + 0 = 2, 27 + 0 = 27, and so forth.
✓ Any number raised to the power of 0 is 1. For example 7560 = 1, and 70 = 1.
See Chapter 11 for more on powers and exponents.
See how nice zero can make your math life? Anytime you’re solving a math problem, look for zero. It doesn’t look like much, but it can help you.