Shelves / Arithmetic and Numbers
AN·01
Start Here: What Numbers Are
The chapter to read first: what a number is and isn't, how counting works, the four operations as stories about the world, the rules they obey, and the conventions we add on top. Nothing is assumed.
Start here
How to read this book
Every chapter starts with Start here: the idea in plain words, with everyday examples, before any symbols. Then come the full-depth sections: why each method works, proved where a proof helps; worked examples to try before you open them; and a Lab where the arithmetic meets a computer, with results that came from running the code shown. Each chapter ends with a Revision sheet, exercises from routine to hard, and a short quiz.
Tick a topic's Done box only when you can explain it without looking. "I've read it" is not the same thing, and the difference is the whole point.
What this chapter answers
What is a number, really? Why is a phone number not a number in the same sense as the number of people in a room? Why does division sometimes mean sharing and sometimes mean grouping, and why does it matter? Which rules of arithmetic are facts about the world, and which are conventions we agreed on? This chapter gives the plain answers; the rest of the book makes each one exact.
What a number is
Counting without numbers
Imagine a shepherd with no words for numbers who wants to know, in the evening, whether every sheep has come back. In the morning, as each sheep leaves the pen, she drops one pebble in a bag. In the evening, as each sheep returns, she takes one pebble out. If the bag is empty when the last sheep is in, none is missing. If pebbles are left, some sheep are still out, and the number of pebbles left is how many.
She never counted. She matched: each sheep with one pebble, each pebble with one sheep. This matching is called a one-to-one correspondence, and it is older and more basic than counting. Two collections have the same size exactly when you can pair them off with nothing left over on either side.
Counting is matching against a standard collection we carry with us: the words one, two, three, … (or our fingers). When you count chairs, you pair each chair with the next counting word, and the last word you say is the size of the collection. Children learning to count show this clearly: first they recite the words, then they learn to point at one thing per word, and only later do they understand that the last word answers "how many?"
A number is what equal collections share
Three apples, three chairs and three days have nothing physical in common. What they share is that any two of them can be paired off exactly. A number, in its first and most basic sense, is that shared property: the size that all collections of that size have in common. We write it with a symbol (3, ३, ٣, III) but the symbol is not the number. The symbols are numerals; the number is the idea they name.
This distinction sounds pedantic until you meet it in practice. "Is 10 bigger than 9?" Yes. "Is the numeral 10 bigger than the numeral 9?" It has more symbols; in binary, 10 means two. Chapter 2 is about numerals: how place value lets ten symbols name every whole number.
Three different jobs for numbers
Numbers do at least three different jobs, and arithmetic only makes sense for some of them.
| Job | Example | Does arithmetic make sense? |
|---|---|---|
| Cardinal: how many | 12 eggs, 3 children | Yes: 12 eggs + 6 eggs = 18 eggs |
| Ordinal: which position | 3rd in a queue, floor 7 | Partly: you can compare and count steps between, but "3rd + 5th" means nothing |
| Nominal: a label | phone number 98480 22338, bus 47, PIN 500039 | No: adding two phone numbers gives nonsense |
A pincode is written with digits, but nobody adds pincodes. A useful test: if doubling it means something, it's a quantity. Twice 12 eggs is 24 eggs; twice bus 47 is not bus 94.
The counting numbers and zero
Start at one and keep adding one: 1, 2, 3, 4, … Each number has a successor, the next one. There is no last number: whatever number you name, its successor is bigger. These are the natural numbers.
Zero needs its own thought. It answers "how many?" for an empty collection: the number of sheep still out when the bag is empty. For most of history zero wasn't treated as a number at all; you simply didn't count when there was nothing. Writing it as a digit (so that 105 and 15 look different) and then treating it as a number you can add and multiply are two separate inventions, and the second is the harder one. Mathematicians today disagree, by convention, about whether "natural numbers" start at 0 or 1; this book includes 0 and says so whenever it matters.
The map of this book
Every kind of number in this book was invented because an earlier kind couldn't answer a question.
| Kind | Examples | Invented to answer | Chapter |
|---|---|---|---|
| Natural numbers | 0, 1, 2, 3 | How many? | this one |
| Integers | −3, 0, 7 | How much less? Debts, temperatures below zero | 9 |
| Rational numbers | ¾, −2.5, 0.333… | How much of something? Sharing into equal parts | 6, 7 |
| Real numbers | √2, π | How long is the diagonal of a unit square? | 12 |
Each kind contains the one before it: every natural number is an integer, every integer is a rational number, every rational number is a real number. Chapter 12 shows that the reals are where this ladder stops for measuring lengths.
The four operations as stories
Arithmetic's four operations each began as a story about things in the world. Knowing the stories is what lets you decide which operation a problem needs, which is most of the difficulty in real problems.
Addition: putting together
Addition answers "how many altogether?" when two collections are combined. Three cups on one shelf and four on another make seven cups. Formally, if you have a collection of size and another of size with nothing in common, the combined collection has size .
Addition is also counting on: start at 3 and take four steps forward: 4, 5, 6, 7. That is the same answer, and it is how a number line shows addition: is where you land after starting at and stepping units to the right.
Subtraction: three different stories
Subtraction has at least three stories, and they lead to the same number, which is easy to miss.
- Taking away: 7 cups, 4 are broken; how many are left? .
- Comparing: Asha has 7 cups, Ravi has 4; how many more does Asha have? . Nothing is taken away; you're measuring a difference.
- Missing part: you need 7 cups and have 4; how many more do you need? , so .
The third story is the most important: subtraction is the inverse of addition. is the number you add to 4 to get 7. That definition works even when the "taking away" picture breaks down, as it does in chapter 9 when we subtract a bigger number from a smaller one.
Multiplication: repeated addition, arrays and scaling
can be read as three groups of four (4 + 4 + 4), or as a rectangle of 3 rows and 4 columns. The rectangle picture shows at a glance something repeated addition hides: turn the rectangle on its side and 3 rows of 4 become 4 rows of 3, so .
A third reading, scaling, becomes essential once fractions appear: is not "half a group of eight" in any repeated-addition sense, but it is 8 scaled down to half its size. Chapter 6 builds on this.
Division: sharing or grouping
has two stories.
- Sharing (also called partitive division): 12 sweets shared equally among 3 children. How many does each get? You know the number of groups and want the size of each.
- Grouping (quotitive division, or measurement): 12 sweets put into bags of 3. How many bags? You know the size of each group and want the number of groups.
Both give 4, and both are "the number you multiply 3 by to get 12": division is the inverse of multiplication. But they are different questions, and one of them often fits a problem far better. "How many 250 ml glasses can I fill from a 2-litre bottle?" is grouping; picturing it as sharing ("share 2 litres among 250 ml") makes no sense. Grouping is also the story that still works when you divide by a fraction: "how many halves are in 3?" has the answer 6, and .
The rules arithmetic obeys
Rules that come from the stories
Some rules of arithmetic aren't conventions at all: they follow from the stories.
Associativity says that when you add (or multiply) three numbers, it doesn't matter which pair you do first. A box of cubes can be counted as layers of rows or as rows of layers.
Distributivity is the reason long multiplication works (chapter 4), and it's how you do mental arithmetic without noticing: .
Rules that fail
Subtraction and division are not commutative or associative, and assuming they are is a classic error.
- but is not 3 (chapter 9 says what it is).
- but .
- but .
That is why, when there are no brackets, we need an agreed reading. Which brings us to conventions.
Division by zero
is the number you multiply by 3 to get 12. So would be the number you multiply by 0 to get 12. But anything times 0 is 0, never 12. There is no such number, so is undefined: not infinity, not zero, not an error to be fixed with cleverness, but a question with no answer.
fails differently: you need a number that gives 0 when multiplied by 0, and every number does. A question with every number as its answer is as useless as one with none, so is undefined too.
Conventions: the rules we agreed on
Order of operations
Without brackets, could mean or . Nothing about the world decides this. Mathematicians agreed on a convention: multiplication and division before addition and subtraction, powers before both, brackets first of all, and operations of equal rank from left to right. So .
Schools teach this with acronyms (BODMAS, PEMDAS, BIDMAS). They are memory aids for the same convention, and they all mislead in one way: they list multiplication before division (or addition before subtraction) as if one had priority. It doesn't: multiplication and division have equal rank and go left to right, as do addition and subtraction. So , not .
When the convention runs out
Some expressions sit exactly where conventions disagree, and you'll meet them online as "viral maths problems". The usual one is . Using the convention above literally, . But many people, and some textbooks and calculators, give juxtaposition (writing with no sign) higher priority than an explicit , which gives . Both readings are in real use. The honest answer is that the expression is ambiguous, and the fix is not to argue but to write or .
Programming languages had to decide, and they decided differently in the places the convention is unclear. The lab measures some of them.
Powers
Repeated multiplication gets its own notation: . Chapter 10 covers powers properly; for now two conventions matter. Powers come before multiplication, so . And a tower of powers is read from the top down: , not , because can already be written and a convention should give you something new.
Lab: numbers meet a computer
Experiment 1: how long is a number?
How many symbols does it take to write a number? The code writes every number from 1 to 3,999 as a tally (one mark per unit), as a Roman numeral, in decimal and in binary, and measures the lengths.
def roman(n):
out = ""
for v, s in [(1000, "M"), (900, "CM"), (500, "D"), (400, "CD"), (100, "C"), (90, "XC"),
(50, "L"), (40, "XL"), (10, "X"), (9, "IX"), (5, "V"), (4, "IV"), (1, "I")]:
while n >= v:
out += s; n -= v
return out
N = range(1, 4000)
for name, f in [("tally", lambda n: n), ("Roman", lambda n: len(roman(n))),
("decimal", lambda n: len(str(n))), ("binary", lambda n: len(bin(n)) - 2)]:
ls = [f(n) for n in N]
print(f"{name:8} average {sum(ls)/len(ls):7.1f} symbols, longest {max(ls):5}")
print("longest Roman numeral below 4000:", max(N, key=lambda n: len(roman(n))), roman(max(N, key=lambda n: len(roman(n)))))
tally average 2000.0 symbols, longest 3999
Roman average 7.5 symbols, longest 15
decimal average 3.7 symbols, longest 4
binary average 11.0 symbols, longest 12
longest Roman numeral below 4000: 3888 MMMDCCCLXXXVIII
A tally grows as fast as the number itself. Roman numerals are far shorter, but their length jumps around (3,888 needs 15 symbols while 3,900 needs 4: MMMCM) and, worse, there is no simple method for multiplying them. Decimal never needs more than four symbols below 10,000: with place value, each extra digit multiplies the range by ten, so the length grows like the number of times you can divide by 10. Binary uses only two symbols, so it needs about 3.3 times as many digits as decimal, which costs a person a lot and a circuit nothing. Chapter 2 explains why place value wins, and this plot shows the pattern for any base : the number of digits needed to write is .
Experiment 2: the same expressions, three readings
print(8 / 2 * (2 + 2))
print(2 ** 3 ** 2)
print(-3 ** 2)
16.0
512
-9
console.log(8 / 2 * (2 + 2));
console.log(2 ** 3 ** 2);
16
512
Python and JavaScript both read 8 / 2 * (2 + 2) left to right (16), and both read power towers from the top down (512). Python gives -3 ** 2 as −9: the power is done first, then the minus. That matches the usual mathematical reading of . Spreadsheets are a famous exception: Microsoft Excel documents that its negation operator is applied before ^, so =-3^2 gives 9 there, and =2^3^2 is evaluated left to right as 64. Neither is wrong; they are different conventions, which is exactly why careful people add brackets.
Experiment 3: whole numbers in a computer
print(2 ** 100)
1267650600228229401496703205376
console.log(2**53, 2**53 + 1, 2**53 + 1 === 2**53);
9007199254740992 9007199254740992 true
Python's integers grow as large as memory allows, so is exact. JavaScript's ordinary numbers are 64-bit floating-point values, which store whole numbers exactly only up to ; beyond that, can't be represented and comes back as . The natural numbers have no largest member; a computer's number types do, and each language chose a different place to stop. (JavaScript also has BigInt, written 2n ** 100n, for exact large integers.)
Experiment 4: a sum every calculator gets "wrong"
print(0.1 + 0.2, 0.1 + 0.2 == 0.3)
from fractions import Fraction
print(Fraction(1, 10) + Fraction(2, 10))
0.30000000000000004 False
3/10
exactly. The computer's answer is off because 0.1 has no exact representation in binary, just as has none in decimal (0.333… never ends). Python's Fraction type stores the numerator and denominator as whole numbers and gets 3/10 exactly. Chapter 7 shows precisely which fractions have finite decimals (and finite binary expansions), and why.
Worked examples
Which operation?
Using the rules to calculate
Reading an expression
Exercises
Practice
- Classify each as cardinal, ordinal or nominal: (a) the 4th of July; (b) 4 litres of milk; (c) jersey number 4; (d) 4 chapters left to read.
- Write a one-sentence story for of each kind: taking away, comparing, missing part.
- Write a sharing story and a grouping story for .
- Evaluate: (a) ; (b) ; (c) ; (d) .
- Calculate mentally, saying which rule you used: (a) ; (b) ; (c) .
- A lift holds 8 people. 50 people are waiting. How many trips does it take? Which story is this?
Answers
- (a) ordinal (a position in the month); (b) cardinal; (c) nominal; (d) cardinal.
- For example: 15 mangoes, 6 eaten, how many left? Kiran scored 15, Anu scored 6, how many more did Kiran score? You need 15 chairs and have 6, how many more do you need? All give 9.
- Sharing: 24 pencils shared among 6 children, how many each? Grouping: 24 pencils in packs of 6, how many packs? Both give 4.
- (a) 23; (b) (left to right); (c) ; (d) .
- (a) (commutativity, associativity); (b) (distributivity); (c) (commutativity, associativity).
- remainder 2: 7 trips. Grouping, and the remainder means one more trip.
Harder
- Show with a counter-example that subtraction isn't associative, then find three numbers for which does happen to hold. What must be true of them?
- Explain to someone who believes why it can't be. Use the definition of division as the inverse of multiplication, not an appeal to authority.
- Two collections can be paired off exactly. One of them has 37 items. Without counting the other, what do you know about it, and why?
- A spreadsheet gives
=-2^2as 4 and a calculator gives as −4. Explain each, and write the expression so that both agree on −4.
Answers
- but . Expanding, while ; these are equal exactly when . So any with works, e.g. .
- would be the number with . But for every , and . No number works, so the expression has no value. If were 0, then would have to be 5.
- It also has 37 items. Same size means exactly "can be paired off"; counting is pairing with the words one to thirty-seven, and pairing is transitive: if A pairs with B and B pairs with the counting words, A pairs with the counting words.
- The spreadsheet applies negation before the power: . The calculator follows the usual mathematical convention, power first: . Writing (or
=-(2^2)) gives −4 in both.
Challenge
- The rectangle argument shows for whole numbers. Does the argument still work when ? When ? What about , where "half a row" isn't a row at all? Write down what a convincing argument would need, and come back after chapter 6.
Discussion
With there are no rows: both and count an empty rectangle, so both are 0, and the picture still works if you accept an empty rectangle. With it's one row of , rotated into rows of one. With fractions the rows-and-columns picture breaks, but the area picture survives: a rectangle unit by units has the same area turned on its side. That is the move chapter 6 makes: from counting squares to measuring area. The deeper point is that a rule proved for one kind of number has to be proved again, or the definition extended carefully, for the next kind.
In real life
Misconceptions and limits
The model to keep
Common misconceptions
| Misconception | What's actually true | Where it's shown |
|---|---|---|
| "Multiplication always makes bigger, division always makes smaller." | True only for whole numbers above 1. Multiplying by ½ makes smaller; dividing by ½ makes bigger. | Multiplication: repeated addition, arrays and scaling; Division: sharing or grouping |
| "BODMAS means division comes before multiplication." | Division and multiplication have equal rank and are done left to right; so do addition and subtraction. | Order of operations |
| "Anything divided by zero is infinity (or zero)." | Division by zero is undefined: no number times 0 gives a non-zero result. Infinity in computers is an engineering convention for floating point. | Division by zero |
| "Subtraction and division are commutative, like addition and multiplication." | They aren't: and . | Rules that fail |
| "The order of operations is a mathematical truth." | It's a convention chosen for convenience; tools differ where it's unclear (Excel's =-3^2 is 9). |
Experiment 2: the same expressions, three readings |
| "A remainder is always rounded down." | What you do with a remainder depends on the story: buses round up, shares round down or split. | Worked example: buses and sweets |
| "Phone numbers and pincodes are numbers." | They're labels written with digits; arithmetic on them is meaningless, and storing them as numbers loses leading zeros. | Three different jobs for numbers |
Limits and trade-offs
- Pictures run out. The collection and rectangle pictures prove the rules for whole numbers only. Each extension (negatives, fractions, irrationals) needs the rules re-established, which later chapters do.
- "Natural numbers" is ambiguous. Whether 0 is included is a convention that varies by country and field. Say which you mean.
- Infinite collections behave strangely. Pairing still defines "same size" for infinite collections, with surprising results (there are exactly as many even numbers as natural numbers); that belongs to set theory, not arithmetic.
Revision sheet
Key ideas
- One-to-one correspondence (pairing) defines "same size"; counting is pairing with the counting words.
- A number is a quantity; a numeral is a name for it. Numbers do cardinal, ordinal and nominal jobs; arithmetic applies to quantities.
- Natural numbers 0, 1, 2, … never end: every number has a successor.
- Addition combines; subtraction takes away, compares, or finds a missing part, and is the inverse of addition.
- Multiplication is repeated addition, a rectangle, or scaling; division is sharing or grouping, and is the inverse of multiplication.
- Commutative, associative, distributive and the identities follow from the stories; subtraction and division are neither commutative nor associative.
- Division by zero is undefined; is undefined too.
- Order of operations is a convention: brackets, powers, then × and ÷ left to right, then + and − left to right; power towers read top down.
Glossary
- One-to-one correspondence: a pairing of two collections in which every item on each side has exactly one partner on the other.
- Numeral: a symbol or string of symbols that names a number, such as 7, VII or सात.
- Cardinal number: a number used to say how many.
- Ordinal number: a number used to say which position in an order (first, second, third).
- Nominal number: a numeral used only as a label, like a phone number or pincode, on which arithmetic is meaningless.
- Natural numbers: 0, 1, 2, 3, …, each the successor of the one before (some books start at 1).
- Successor: the next natural number, obtained by adding one.
- Partitive division: division as sharing, where the number of groups is known and the size of each is wanted.
- Quotitive division: division as grouping (or measuring), where the size of each group is known and the number of groups is wanted.
- Commutative property: an operation is commutative when swapping its inputs doesn't change the result, as with .
- Associative property: an operation is associative when the grouping of a chain doesn't change the result, as with .
- Distributive property: multiplication distributes over addition: .
- Identity element: a number that leaves others unchanged under an operation: 0 for addition, 1 for multiplication.
- Inverse operation: an operation that undoes another: subtraction undoes addition, division undoes multiplication.
- Order of operations: the agreed convention for evaluating an expression without brackets: brackets, powers, multiplication and division left to right, addition and subtraction left to right.