Shelves / Arithmetic and Numbers
AN·06
Fractions
What a fraction is (a part, a point, a division, a scale factor) and why those are the same thing; equivalent fractions and lowest terms; comparing; adding with a common denominator and why you can't add the bottoms; multiplying as area; dividing by flipping, and why it works; and Egyptian unit fractions, computed exactly.
Start here
What this chapter answers
What does actually mean, and why is it the same as ? Why are and equal? Why is not , and when does turn out to be the right answer to a different question? Why does "of" mean multiply? Why do you flip and multiply to divide, and why does dividing by a half double things? And why does a computer get slightly wrong when Python's Fraction gets it exactly right?
A fraction in one picture
Cut a chocolate bar into 4 equal pieces and take 3. You have of the bar. The bottom number, the denominator, names the size of the pieces (quarters); the top number, the numerator, counts how many you have. Equal is essential: three of four unequal pieces isn't three quarters of anything.
Now share 3 bars equally among 4 people. Cut each bar into quarters, and give each person one quarter of each bar: everyone gets 3 quarters, of a bar. So is also 3 divided by 4. That coincidence isn't one, and it's what makes fractions numbers you can calculate with.
What a fraction is
Four readings of one number
can be read four ways, and fluent use of fractions means moving between them:
- A part of a whole: 3 of 4 equal parts.
- A division: , the share each of 4 people gets from 3 wholes.
- A point on the number line: split the stretch from 0 to 1 into 4 equal steps and take 3 of them.
- A scale factor (an operator): of 20 is 15: shrink to three quarters. Chapter 8 calls this a ratio.
This definition is chapter 1's definition of division, so and are the same number by definition, and it explains the others: pieces of size make one whole, so such pieces are . Fractions are the numbers that make every division of whole numbers (except by zero) possible.
Proper, improper and mixed
A proper fraction has numerator less than denominator, so it's less than 1. An improper fraction has numerator at least the denominator: is eleven quarters, more than two wholes. Writing it as a whole number and a proper fraction gives a mixed number: , because . That's the division algorithm: the quotient is the whole part, the remainder the numerator. Going back: .
Improper fractions are usually easier to calculate with; mixed numbers are easier to picture ("two and three-quarter cups").
Equivalent fractions
Same amount, different pieces
Cut each quarter of the bar in half. The 3 quarters you had are now 6 eighths, and you have exactly as much chocolate: . In general, multiplying the numerator and denominator by the same number gives an equal fraction: the pieces become times smaller and there are times as many.
Lowest terms
Going the other way, dividing numerator and denominator by a common factor, is simplifying. Dividing by their greatest common divisor (chapter 5) does it in one step and leaves a fraction in lowest terms, whose numerator and denominator are coprime: .
Every fraction has exactly one lowest-terms form. If with both in lowest terms, then ; divides and shares no prime with , so every prime of is in (unique factorisation): . By the same argument , so and then . That's why "simplify" has a single right answer.
Comparing fractions
Same denominator, or same numerator
With the same denominator, the pieces are the same size: compare numerators (). With the same numerator, you have the same number of pieces: the one with smaller pieces, the bigger denominator, is smaller ().
Anything else: a common denominator
Rewrite both fractions with a common denominator and compare numerators. or ? With 40ths: against , so is larger, by . The shortcut is cross-multiplying: exactly when (for positive denominators), because and are the numerators over the common denominator .
Quick checks help too: compare with (is the numerator more or less than half the denominator?) or with 1 (how far short of a whole?). and are each one piece short of 1, and ninths are smaller pieces, so is closer to 1 and larger.
Between any two fractions
Between two different fractions there's always another, for example their average. So there's no "next" fraction after : fractions are dense on the number line. Chapter 12 shows that even so, they don't fill it.
Adding and subtracting
Same denominator: add the pieces
. Three eighths and two eighths are five eighths, exactly as three apples and two apples are five apples. The denominator names the kind of piece, so it stays.
Different denominators: make the pieces the same
You can't add thirds to quarters until they're the same size of piece. Rewrite both over a common denominator, ideally the least common multiple (chapter 5):
Any common denominator works (the product always does), and the answer is the same after simplifying; the lcm keeps the numbers small. The general formula is
Why not add the tops and the bottoms?
is not : half a bar plus a third of a bar is more than half a bar, and is less. The correct answer is .
But , the mediant, is the right answer to a different question. If a batter scores 1 run off 2 balls in one match and 1 off 3 in the next, the combined record is 2 runs off 5 balls: . Combining two ratios of counts adds tops and bottoms; adding two amounts doesn't. The mediant always lies between the two fractions, closer to the one with more behind it, which is why an overall average can surprise you; chapter 8 shows how it can even reverse a comparison.
Mixed numbers
Add whole parts and fraction parts separately, then tidy: . For subtraction, borrow a whole when the fraction part is short, exactly as in chapter 3: .
Multiplying
"Of" means times
of 20 is 15: split 20 into 4 equal parts (5 each) and take 3. That's , and it's what means: scaling by . So "a fraction of" a quantity is multiplication, which is why the word "of" in problems so often signals .
Multiplying two fractions: area
Chapter 1 promised to show why multiplication of fractions still commutes, when "half a row" isn't a row. The picture that survives is area. Take a square of side 1. Mark of the way across and of the way up. The rectangle wide and tall has area .
The marks cut the square into equal small rectangles, each of area . The shaded rectangle covers of them. So
In general : multiply the tops, multiply the bottoms. Turning the square on its side swaps the two lengths and leaves the area alone, so : the rule survives, because the area picture works where the rows-and-columns picture didn't.
Multiplying makes smaller, sometimes
Multiplying by a fraction less than 1 shrinks: . Chapter 1's warning ("multiplication always makes bigger") fails exactly here. Multiplying by an improper fraction greater than 1 enlarges, and by 1 (in any form, like ) leaves the number alone, which is the equivalent-fractions rule again.
Dividing
How many halves in 3?
Chapter 1's grouping story asks: means "how many halves fit into 3?" Each whole holds two halves, so 3 holds 6. Dividing by doubles. In general, dividing by a fraction less than 1 gives a bigger answer, because small pieces fit in more times.
: how many three-eighths fit into three-quarters? , which is two lots of : the answer is 2. With a common denominator, dividing fractions is dividing numerators: .
Why "flip and multiply" works
The usual rule: . Two ways to see it:
- From the definition of division. is the number that multiplied by gives . Try : multiplying it by gives . It works, and division has only one answer, so that's the answer.
- From a common denominator. Over the denominator , and , so the quotient is , which is .
is the reciprocal of : the number that multiplies it to give 1. Dividing by a number is multiplying by its reciprocal. Zero has no reciprocal (nothing times 0 is 1), which is chapter 1's division by zero again.
Sharing by a fraction
The sharing story needs rewording but still works: " of a tank holds 12 litres; how much does the whole tank hold?" is litres. Dividing by answers "if this is three quarters, what is the whole?"
Lab: exact fractions in code
Experiment 1: exact versus approximate
Python's fractions.Fraction stores a numerator and denominator as whole numbers and keeps them in lowest terms, so its arithmetic is exact. Ordinary decimals (float) are approximations in binary.
from fractions import Fraction as F
third = F(1, 3)
print(third + third + third, third + third + third == 1)
print(1/3 + 1/3 + 1/3 == 1, 0.1 * 3 == 0.3, F(1, 10) * 3 == F(3, 10))
print(F(6, 8), F(84, 120), F(3, 4) / F(1, 2), F(2, 3) * F(4, 5))
print(F(1, 2) + F(1, 3), F(1, 2) - F(1, 3), F(3, 4) / F(3, 8))
print(F("0.125"), F(0.1))
1 True
True False True
3/4 7/10 3/2 8/15
5/6 1/6 2
1/8 3602879701896397/36028797018963968
Every fraction comes out in lowest terms automatically (F(84, 120) is 7/10: the gcd at work). The second line is instructive: in floating point, happens to round back to exactly 1, but does not round to 0.3. Neither result can be trusted without knowing how the rounding falls; the Fraction results are exact every time. The last line shows what the float written 0.1 really is: the fraction with denominator nearest to . (Chapter 7 explains why no binary fraction equals it.)
Experiment 2: Egyptian fractions
Fibonacci's method for writing a fraction as different unit fractions: take the largest unit fraction that fits, and repeat with what's left. What's left always has a smaller numerator, so the process ends.
from fractions import Fraction as F
import math
def egyptian(q):
"""Fibonacci's greedy method: take the largest unit fraction that fits, repeat on what's left."""
out = []
while q > 0:
n = math.ceil(1 / q) # smallest n with 1/n <= q
out.append(n)
q -= F(1, n)
return out
for q in (F(4, 5), F(2, 3), F(7, 15), F(5, 121)):
parts = egyptian(q)
print(f"{str(q):>6} = " + " + ".join(f"1/{n}" for n in parts))
4/5 = 1/2 + 1/4 + 1/20
2/3 = 1/2 + 1/6
7/15 = 1/3 + 1/8 + 1/120
5/121 = 1/25 + 1/757 + 1/763309 + 1/873960180913 + 1/1527612795642093418846225
It always works, but not always well: produces a denominator with 25 digits, while also works. Egyptian scribes chose their decompositions by skill and tables, not by this rule. The greedy method is a reminder that "an algorithm that always finishes" and "a good answer" are different things.
Experiment 3: exact answers can get big
from fractions import Fraction as F
h = F(0)
for n in range(1, 101):
h += F(1, n)
if n in (5, 10, 20, 50, 100):
print(f"H_{n:<3} = {float(h):.6f} denominator has {len(str(h.denominator)):>2} digits")
print(F(1, 1) + F(1, 2) + F(1, 3) + F(1, 4) + F(1, 5))
H_5 = 2.283333 denominator has 2 digits
H_10 = 2.928968 denominator has 4 digits
H_20 = 3.597740 denominator has 8 digits
H_50 = 4.499205 denominator has 22 digits
H_100 = 5.187378 denominator has 40 digits
137/60
The sum (the harmonic number ) grows very slowly, past 5 only at , but its exact denominator grows fast: 40 digits by , because the common denominator must include every prime up to . That's the price of exactness. It's why fractions are perfect for money, recipes and anything with a few steps, and why long numerical computations use floating point and manage the rounding instead.
Experiment 4: two ways to combine fractions
from fractions import Fraction as F
# Two matches: 45 runs off 30 balls, then 20 runs off 25 balls. Strike rates per ball:
a, b = F(45, 30), F(20, 25)
combined = F(45 + 20, 30 + 25)
print("rates", a, b, " combined", combined, "=", round(float(combined), 4), " average of rates", (a + b) / 2)
print("1/2 + 1/3 =", F(1, 2) + F(1, 3), " the mediant (1+1)/(2+3) =", F(2, 5))
rates 3/2 4/5 combined 13/11 = 1.1818 average of rates 23/20
1/2 + 1/3 = 5/6 the mediant (1+1)/(2+3) = 2/5
The batter's overall rate, 65 runs off 55 balls, is the mediant , not the average of the two rates (), because the first match had more balls behind it. Adding the fractions themselves, , is a third, different operation. Which one is right depends entirely on what the fractions stand for.
Worked examples
A recipe, scaled
Adding with the lcm
Dividing, and checking it makes sense
Exercises
Practice
- Write each as a mixed number or an improper fraction: (a) ; (b) ; (c) ; (d) .
- Simplify to lowest terms: (a) ; (b) ; (c) .
- Which is larger? (a) or ; (b) or ; (c) or .
- Calculate: (a) ; (b) ; (c) ; (d) .
- Calculate: (a) ; (b) of 56; (c) .
- Calculate: (a) ; (b) ; (c) .
- Find a fraction between and in two different ways.
Answers
- (a) ; (b) ; (c) ; (d) .
- (a) (gcd 15); (b) (gcd 42); (c) (gcd 143).
- (a) : . (b) : each is one piece short of 1, and thirteenths are smaller. (c) : .
- (a) ; (b) ; (c) ; (d) .
- (a) ; (b) 21; (c) .
- (a) 6; (b) 2; (c) .
- The average: . The mediant: . Check with 120ths: , , , .
Harder
- Prove that if (all positive), the mediant lies strictly between them.
- A tank is full. After 20 litres are added it is full. How much does it hold?
- Explain with a picture or the grouping story why and .
- Someone simplifies to . Find values for which this is wrong, and values for which it happens to be right. When exactly is it right?
- Show that , and use it to find without adding 99 fractions.
Answers
- means . Then , so . Similarly , so .
- The 20 litres fill of the tank, so the tank holds litres.
- A half contains two quarters, so two quarters fit into a half: 2. A half doesn't fit into a quarter even once; half of it does, so the answer is .
- , not . It's right when , that is , : when or . Any other "cancellation" of added terms is an error.
- . So the sum is ; everything cancels except .
Challenge
- Every fraction between 0 and 1 can be written as a sum of different unit fractions (the lab's method proves it). Prove that the greedy method always stops: if is not a unit fraction and is the largest unit fraction below it, show that has a numerator smaller than (before simplifying).
Discussion
is the smallest whole number with , so , that is , so . Now , whose numerator is less than (and positive, since when isn't itself a unit fraction). Numerators are whole numbers that strictly decrease, so after at most steps the numerator reaches 1 and the process ends with a unit fraction. The unit fractions are all different because each remainder is smaller than the unit fraction just taken, so the next one taken is smaller still.
In real life
Misconceptions and limits
The model to keep
Common misconceptions
| Misconception | What's actually true | Where it's shown |
|---|---|---|
| " ." | Unlike pieces must be made alike first: . is the mediant, which combines records, not amounts. | Why not add the tops and the bottoms? |
| "A bigger denominator means a bigger fraction." | A bigger denominator means smaller pieces: . | Same denominator, or same numerator |
| "Multiplying always makes bigger; dividing always makes smaller." | By a fraction less than 1, multiplying shrinks and dividing enlarges: . | How many halves in 3? |
| "You can cancel any matching digits or terms." | Only common factors of the whole numerator and denominator cancel; . | Lowest terms |
| "Flip and multiply is just a rule to memorise." | It follows from the definition of division, or from a common denominator. | Why "flip and multiply" works |
| "The average of two rates is the overall rate." | Combining records gives the mediant, weighted by how much is behind each rate. | Experiment 4: two ways to combine fractions |
| "A fraction is part of a pizza, so it can't be bigger than 1." | Improper fractions are bigger than 1, and fractions are also divisions, points and scale factors. | Four readings of one number |
Limits and trade-offs
- Fractions don't cover the number line. Between any two fractions lies another, yet some lengths, such as the diagonal of a unit square, are no fraction at all (chapter 12).
- Exact fractions grow. Long chains of fraction arithmetic produce huge numerators and denominators (Experiment 3); numerical work uses decimals and controls the rounding instead.
- Fractions here are positive. Negative fractions follow the same rules with the sign rules of chapter 9.
Revision sheet
Key ideas
- = : the number that times gives . Part, division, point, scale factor.
- Mixed ↔ improper is the division algorithm: .
- Equivalent: ; . Lowest terms: divide by the gcd; unique.
- Compare by common denominator or cross-multiplying; benchmarks and 1.
- Add/subtract: common denominator (lcm best): . Never add the bottoms.
- Mediant combines records; lies between the two.
- Multiply: tops × tops, bottoms × bottoms (area). "Of" means ×. Cancel common factors first.
- Divide: multiply by the reciprocal. Dividing by a fraction below 1 enlarges.
- Fractions are dense: always another between two.
Glossary
- Fraction: a number (), the number that multiplied by gives .
- Numerator: the top number of a fraction; how many pieces.
- Denominator: the bottom number; what size of piece (into how many equal parts the whole is split).
- Unit fraction: a fraction with numerator 1.
- Proper fraction: numerator less than denominator; less than 1.
- Improper fraction: numerator at least the denominator; 1 or more.
- Mixed number: a whole number and a proper fraction written together, such as .
- Equivalent fractions: fractions that name the same number, like and .
- Lowest terms: a fraction whose numerator and denominator are coprime.
- Common denominator: a denominator shared by two or more fractions after rewriting; the lcm of their denominators is the least.
- Reciprocal: the number that multiplies a given non-zero number to give 1; for it is .
- Mediant: for fractions and ; it lies between them.
- Egyptian fraction: a sum of different unit fractions.