Path
Foundations · Lesson 3
Fractions and ratios
A fraction is a number; a ratio is a comparison. Both speak the language of relative size - the same language probability and many ML metrics will speak later.
Core ~19 minDeep study ~54 minWhat is a ratio really?Why do probabilities look like fractions?
Before this: What numbers are, Operations as transformations
How this idea was born
People rarely need only absolute size. A harvest of forty measures means little until you know forty out of two hundred. Maps need "this length stands for that length." Recipes, wages, and medicine doses speak in parts and comparisons: relative size, not only raw count.
Greek mathematics ran into a crisis when lengths appeared that were not ratios of whole numbers (the diagonal of a unit square is the classic case). The hope that "all is whole-number ratio" cracked. Eudoxus of Cnidus answered by rebuilding comparison carefully. His theory of proportion, preserved in Euclid's Book V, treats two ratios as matching when no whole-number test can tell them apart. Dedekind later tipped his hat to the same spirit while constructing the reals. The ethic is refusing to abandon a question just because the first story failed.
For a modern rereader, this chapter is still the language of relative size: fractions as numbers on the line, ratios as comparisons of like magnitudes. You will return here for percentages, map scales, probability, precision and recall, and every time someone confuses "part of a whole" with "how this compares to that."
First principles
Two ideas people blur
People say "fraction" and "ratio" as if they were twins. They are relatives, not clones.
- A fraction (with ) is a number on the line.
- A ratio is a comparison of two magnitudes of the same kind.
You can often encode a ratio as , but Euclid's Book V is careful: it talks about when two comparisons are the same.
Start with same-kind quantities - length with length, mass with mass. Mixing kinds (" meters to kilograms") is a rate with units, not a pure Euclidean ratio.
Parts of a whole
The school fraction says: partition a whole into equal parts and take . Equivalently, is the number such that .
Equivalent fractions are the same relationship wearing different clothes:
because . Cross-multiplying is not a magic spell; it is the sameness of relative relationship.
Ratios: sameness of comparison
Euclid's Book V, Definition 5 says - in modern paraphrase - that when for every pair of whole numbers , the comparison of with matches the comparison of with .
The spirit is light: two ratios are the same when no whole-number test can tell them apart.
This mattered because some lengths are incommensurable - not a ratio of whole numbers - yet still comparable. The diagonal of a unit square and the side still have a ratio in Eudoxus's sense.
Attribution note: Archimedes associates a key proportion idea with Eudoxus; the theory as we meet it is preserved in Euclid. Historians urge some caution about sole attribution. The ethic is solid either way: rebuild comparison carefully when the first story fails.
Percentages and normalization
Percentages are ratios with denominator by convention. Softmax (later) and probability distributions are families of relative weights forced to sum to . Same dialect, different clothes.
Worked intuition
Example 1 - equivalence.
Is the same as ? Check and . Same relative relationship.
Is the same as ? Check and . Same relative relationship.
Example 2 - map scale.
A map marked means one unit on the map corresponds to of the same length unit on the ground. That is length-to-length ratio language, often written like a fraction of like quantities.
A map marked means one unit on the map corresponds to of the same length unit on the ground. That is length-to-length ratio language, often written like a fraction of like quantities.
Example 3 - dose as rate.
" mg per kg" mixes mass of drug with mass of body. It is a rate, not a pure Euclidean ratio of one kind. Keep the kinds straight so the units stay honest.
" mg per kg" mixes mass of drug with mass of body. It is a rate, not a pure Euclidean ratio of one kind. Keep the kinds straight so the units stay honest.
Example 4 - class imbalance.
A dataset with cats and dogs has class fractions and . Accuracy can look high while the rare class is ignored. Relative size tells the truth absolute counts hide.
A dataset with cats and dogs has class fractions and . Accuracy can look high while the rare class is ignored. Relative size tells the truth absolute counts hide.
Example 5 - Hilbert's Hotel as countable infinity.
The positive rationals are infinite, yet they can be paired with the natural numbers (they are countable). The reals between and will not fit that pairing (Cantor's diagonal argument). Some infinities are larger than others. Fractions sit on the "listable" side of that cliff.
The positive rationals are infinite, yet they can be paired with the natural numbers (they are countable). The reals between and will not fit that pairing (Cantor's diagonal argument). Some infinities are larger than others. Fractions sit on the "listable" side of that cliff.
Common confusions
- "Fraction and ratio are synonyms." Fraction: number. Ratio: comparison. Encoding a ratio as a fraction is common and useful, but Euclid's care still matters.
- "Every comparison is a fraction of whole numbers." Not if you allow arbitrary lengths. is a ratio of magnitudes that is not a ratio of integers.
- "Bigger denominator means bigger fraction." Only with fixed numerator. . Relative size depends on both parts.
- "Percentages always clarify." They can hide base rates. " improvement" from a tiny baseline is not the same story as from a large one.
- "Probability is a different subject." Probability compares like outcomes to like totals. It speaks this chapter's language.
History and stories
Once you see ratios, you start seeing them everywhere: recipes, map scales, medical dosages per kilogram, batting averages, model precision and recall.
Real world
Cooking dilutions, map scales, medicine doses per kilogram, interest rates, gear ratios - all designed so one quantity tracks another.
Surveying and architecture lean on similar figures (geometry track) whose side ratios match. Probability in medicine (true positive rates, base rates) is ratio literacy with consequences.
Open when you want the machine-learning connection. Skip freely.
Field notes, extra examples, and glossary live here when you want more than the core path.
Carry this forward
- Fractions are numbers; ratios are comparisons.
- Equivalence means the same relative relationship.
- Probability and many metrics speak this language.
- Next: variables - naming what we do not yet know.
Read more
Go deeper when curiosity hits - videos, essays, and primary trails.
- referenceMacTutor - Eudoxus of CnidusProportion theory, astronomy, and why Book V matters.
- referenceJoyce - Euclid Elements Book V, Definition 5Read the actual definition of equal ratios.
- videoKhan Academy - Intro to ratiosWarm visual intro to ratio language.
- articleAlgebrica - Rational numbers (intuition companion)Friendly first-principles essay on what fractions mean.
- articleSteven Strogatz - The Hilbert Hotel (NYT)The infinity parable that also appears in The Joy of X.
- bookSteven Strogatz - The Joy of XHilbert Hotel and the jump from countable fractions to uncountable reals.
- articleAlgebrica - Rational numbersFractions as numbers, with supporting diagrams.
Check your understanding
A short learning loop - try a few, learn from misses, mark complete when you have engaged. No timer, no scoreboard.
Try at least 3 core prompts, or choose I'll return later.