The earliest set of numbers to be developed was the counting numbers 1, 2, 3, 4, and so on. As mathematics progressed, other types of numbers were needed to solve problems. These types of numbers form various sets.
A natural number is in the set of counting numbers: . A whole number is in the set that includes zero and the counting numbers: . Notice that the set of natural numbers is contained in the set of whole numbers. The only difference in these two sets is the number zero.
An integer is a number in the set of whole numbers and their opposites: . The difference between integers and whole numbers is that the set of integers contains negative numbers. Natural numbers are also called positive integers, while whole numbers are called nonnegative integers.
A rational number is in the set of numbers that can be written as a fraction of two integers, such as and . The set of rational numbers includes the set of whole numbers because any whole number can be written as a fraction with a denominator of 1. It also includes all decimals that terminate, such as 2.5, and all decimals that repeat because they can be written as fractions of two integers. Examples include:A real number is in the set of all rational and irrational numbers. The set of real numbers contains all of the irrational numbers, rational numbers, integers, whole numbers, and natural numbers.