CS 100 (Learn)CS 100 (Web)Module 01


Math Review — Integers and Real Numbers

In this section we want to review some terminology in mathematics and discuss different types of numbers.

You intuitively know what an integer is, but it's probably not a terminology that you use every day.

Integers are the whole natural numbers such as one, two, three and twenty-two [1, 2, 3, 22], but they also include the number zero and negative numbers like minus one and minus two [-1, -2].

Numbers that have fractional parts are not integers. The numbers one third [1/3] and three point one [3.1] are not integers; those are known as real numbers.

The real numbers include all of the integers, so the number three is both an integer and a real number. But real numbers also include every possible number that exists between the integers, such as three point five, three point one and three point zero zero one [3.5, 3.1, 3.001].

It is a weird terminology to refer to these numbers as "real" numbers, but it was adopted to distinguish them from "imaginary" numbers, which we're not going to concern ourselves with in this course.

If it helps, any value you encounter in the natural (or real world) must be a real number. For example, if you encounter a goose, the height of the goose, the mass of the goose, and the number of feathers on the goose are all real numbers.

While we're reviewing number terminology, we might as well discuss rational and irrational numbers, even though if it's not as important in this course. Many people confuse real and rational numbers.

Rational numbers are real numbers that can be represented as a fraction, such as one third [1/3] or two point one, which is twenty-one over ten [2.1 = 21/10] and integers are also rational: fours is four over one [4/1].

Irrational numbers can not be represented as a fraction. For example, the square root of two is one point four one four two one [1.41421] and then continues on forever without ever repeating. The most famous irrational number is pi, which is three point one four one five nine [3.14159] and so forth.

The real numbers include both the rational numbers and irrational numbers.

To put it all together we have integers, rational numbers (which includes the integers), irrational numbers, and all of them combined are the real numbers.