Skip to main content
Mental Models

New Numbers from Algorithms

New types of numbers, like negative and irrational numbers, can emerge as outputs from simple algorithms that were originally designed for existing number types. This mental model illustrates how processes can generate novel conceptual categories from seemingly familiar inputs.

THE IDEA

New Numbers

Familiar operations can lead us to extend a number system.

Algorithms seem to be a natural consequence of repetitive actions. For most humans, doing the same thing in the same way over and over gets boring. We thus wonder if there is a way to codify those repetitive actions to streamline the process. A lot of modern math seems to be a result of the codification of the processes used to manipulate numbers. When you multiply 157 by 2693, you probably don’t count the individual units in each group in sequence. You likely use a calculator (programmed with algorithms) or a pencil-and-paper method that has you starting with 7 × 3.

One interpretation of the history of numbers is that certain numbers didn’t exist until they were produced by an algorithm. Think of negative numbers. They are common enough now, especially for those of us who live in cold climates, but if you think about it, they aren’t intuitive. It’s hard to imagine ancient humans looking at a bunch of mammoths and thinking there might one day be a negative amount of them. There could be ten mammoths on the plain, two mammoths, or no mammoths, but negative five mammoths? Not likely.

In the book Arithmetic, Paul Lockhart suggests that negative numbers are the result of subtraction. Imagine you are in agriculture three thousand years ago. The addition algorithm says that when you have three bags of grain, and you trade for two more, you will have five bags of grain. But then you decide to give one to your poor cousin. Now you have to “un-add,” or subtract. The act of subtracting is really the acknowledgment of the negative. You have five bags of grain and negative one bag of grain. And if you are interested in the processes you’ve just exposed your numbers to, you’ve got an interesting problem.

Lockhart says, “The issue here is symmetry—or rather, the lack thereof. With addition, no matter what number I have and no matter what number I add to it, their sum is a perfectly valid entity, already extant in the realm of numbers. With the subtraction operation, however, we have an unpleasant restriction: the number we are taking away cannot exceed the number we have. There definitely already is a number that when added to three makes five, but (at the moment) none of our numbers play the role of ‘the thing that when added to five makes three.’ ”[23] Use of subtraction quite likely prompted the idea of negative numbers, which aren’t obvious in the physical representations of amounts we encounter in everyday life.

Essentially our process might have gone something like this. Let’s say our ancient subtraction algorithm for two values is something along the lines of: Input two distinct, countable whole quantities. Remove the quantity of the second value from the quantity of the first value. So five bags of grain minus one bag of grain becomes four bags of grain. But because our algorithm doesn’t say anything about the minimum value of the quantities, we could easily input six and then nine. Which leaves us with what? The nonintuitive concept of a number representing negative three.

The same thinking gives us an understanding of how we got irrational numbers. After some playing around with numbers and their properties, a process was invented called “square root.” The square root of a number is another number that, when multiplied by itself, gives you the original number. So the square root of 9 is 3, and the square root of 64 is 8. We can have a lot of fun plugging various number inputs into the algorithm that calculates a square root. Rational inputs can also have fractional rational roots. Other inputs produce irrational roots. However, use the algorithm to calculate the square root of 2 (and why wouldn’t you, it’s such an accessible little number) and you get an irrational number, which cannot be expressed as a ratio of integers.

When to use it

  • Teaching why extending familiar arithmetic operations can require new kinds of numbers.

  • Understanding how new financial instruments (like derivatives) emerge from applying basic algorithms to existing assets.

  • Designing software features where a simple algorithm on common data types might generate innovative data structures or user behaviors.

  • Exploring scientific experiments where pushing the boundaries of a standard procedure (e.g., extreme temperatures, unusual inputs) leads to new phenomena or states of matter.

FROM THEORY TO EVERYDAY LIFE

In practice

01

Subtraction Creates Negative Numbers

In the imagined farming example, 6 minus 9 cannot be represented by a nonnegative count of grain bags. Extending subtraction to this case introduces negative three as a number, even though a farmer cannot point to a pile containing negative bags.

02

Square Root of 2 Produces an Irrational Number

Applying a square-root procedure to 2 leads to a number whose decimal expansion neither terminates nor eventually repeats. It cannot be expressed as a fraction of integers, illustrating why arithmetic may require a broader number system.

✳

A MOMENT TO REFLECT

Put it to work.

  1. Can you think of other algorithms (in math, computing, or daily life) that have produced unexpected new concepts or categories?

  2. How does the idea that numbers can be 'created' by processes challenge your understanding of what is fundamental or real?

  3. In your own field, what repetitive processes might, if explored, yield novel insights or tools?

References

  1. Arithmetic — Paul Lockhart

CONTINUE THE CONVERSATION

Source texts

  • The Great Mental Models Volume 3 Systems and Mathematics
← More mental models