Pre-Calculus for Programmers

Algebra foundations: the toolkit calculus never reteaches

1 / 397
Contents

Contents

Pre-Calculus for Programmers

0 of 397 complete

7 min read

The numbers calculus works with

One endless line, the four families of numbers sitting on it, and what a decimal expansion gives away about which family a number belongs to.

A shop counts tins in whole numbers. There are 4 tins on the shelf, and never 4.3 of them. A tape measure does not work that way: a plank can be 2.5 metres long, or 2.53, or 2.5333, and no measurement is ever the last word.

Calculus is about quantities of the second kind, the ones that vary smoothly rather than in jumps. So before anything else, this course has to say exactly which numbers are allowed, and give them names, because the names come up in every definition later.

The number line and the real numbers

Picture every number laid out on an endless horizontal line, with 0 in the middle, the positive numbers to the right and the negative numbers to the left. That picture is the number line, and the numbers on it are the real numbers. Every quantity in this course, and in all of calculus, is a real number.

The real numbers come in families that sit inside one another, each family a stricter version of the one before it. Meeting them one at a time is the fastest way to keep them apart.

The natural numbers are the counting numbers: 1, 2, 3 and on forever. They are what you get by starting at 1 and adding 1 over and over. The number of tins on the shelf is a natural number.

Add zero and the negatives to that list and you have the integers: ... −3-3, −2-2, −1-1, 0, 1, 2, 3 ... . Every natural number is an integer. The number −4-4 is an integer that is not a natural number, because you cannot reach it by counting up from 1.

A rational number is one that can be written as a fraction of two integers, with the bottom one not zero. So 34\frac{3}{4} is rational. So is −7-7, which can be written −71\frac{-7}{1}, and so is 0.250.25, which is 14\frac{1}{4}. Every integer is rational for the same reason −7-7 is.

An irrational number is a real number that cannot be written as a fraction of two integers at all. The two you will meet most are 2\sqrt{2} and π\pi. They are still perfectly ordinary points on the line: 2\sqrt{2} sits between 1.41 and 1.42, and you can draw it exactly, as the diagonal of a square whose sides are 1.

Every real number is one or the other. There is no number that is both rational and irrational, and none that is neither.

The two kinds look different when you write them as decimals. A rational number either stops or repeats forever in a pattern. An irrational number does neither. Print a few and look.

Decimals that stop, repeat, or do neitherPython

Change 1 / 7 to 1 / 11 and run it again. Then try 1 / 6. Which of them settles into a repeating block, and how long is the block?

Is 0.3750.375 rational or irrational? What about 9\sqrt{9}?

Both are rational. A decimal that stops can always be written over a power of ten, so 0.375=37510000.375 = \frac{375}{1000}, which reduces to 38\frac{3}{8}. And 9\sqrt{9} is 3, which is 31\frac{3}{1}. A root sign does not make a number irrational: 2\sqrt{2} is irrational because 2 is not a perfect square, not because of the sign in front of it.

Check yourself

Which of these numbers is irrational?

All lessons in Pre-Calculus for Programmers