A sports league table, a list of high scores, the class lined up shortest to tallest — all of these are numbers put in order. Being able to sort a jumble of numbers yourself is a handy everyday skill.
Once you can
The trick is simple: compare the numbers in pairs to find the smallest one, set it down
first, then look for the next smallest from what is left, and keep going. So a jumble like
Read smallest first, the order is two, five, nine. Turn the whole row around and you get the
same numbers in descending order,
Suppose three friends each bring their pets. Sara brings
two cats, Tom brings
five ducks, and Mia brings nine fish. To line them up smallest group first we
ask "who has the fewest?" — two cats. Then five ducks. Then nine fish. The order of the
groups is exactly the order of their counts:
For bigger numbers the safe way to compare is to line them up and read from the left
— the most important digit first. The leftmost digit is worth the most (it is the
Take
Only when the leftmost digits are equal do you move one place to the right. To order
Use the same recipe every time: pick the smallest, set it down, repeat.
Here is a lovely shortcut: every number has its own home on the
number line, and homes are arranged small-on-the-left, big-on-the-right.
So if you simply drop each number onto the line, they sort themselves — reading
left to right gives ascending order for free. That is why ordering and the number line are
best friends: the line is a picture of order.
A few numbers turn up out of order. Step through: we find the next smallest and drop it onto its home on the line. Because the line already runs small-to-large, the numbers land in ascending order from left to right. Press Refresh for a new set.
Here is the same idea as an animation. Press play. A few numbers appear out of order; we pick the smallest and slide it to its place, then the next, until they sit neatly along the line from small to large. Replay it: each time it shuffles a fresh set of numbers.
Khan Academy works through ordering numbers here: