freeCodeCamp/guide/english/mathematics/definition-of-real-number/index.md

4.1 KiB

title
Definition of Real Number

Definition of Real Number

Real numbers can be thought of as points on an infinitely long line.

Real numbers include all rational numbers, such as 1/2, 0, 103.644, and 271/272, as well as all of the irrational numbers, such as pi, the square root of 2, and e. Note that the "Complex Numbers", numbers who include non-zero imaginary magnitude, are not included.

So, any number with decimal representation, even if that representation is infinite, is real, e.g. 1.234567891... We note that the square root of a negative number does not have decimal representation, so the square root of any negative number is not real. It just so happens that the square root of -1 just so happens to be the definition of "i", the unit length in the system of imaginary numbers. Below is something of an outline for how one could derive and define the real numbers, but it is certainly not a formal proof.

Consider the notion of 1, a single entity, a unit. Let the set of natural numbers, N be described by the rules:

  • 1 is a natural number
  • Every natural number has exactly one successor (a number greater than itself).
  • 1 has no successor.

These define the notion of counting, and with a few more rules beyond the scope of this article, rules such as addition and closure can be defined within this new set of numbers, N. This set, along with the notion of 0, creates the set of whole numbers. When the notion of a "negative number" is added to this set of "whole numbers", the integers are formed. A negative number is a number b such that a + b = 0, where a is in N (so a is neither 0 nor negative itself). We call this union of 0, N, and the negative numbers Z, or the integers.

We define multiplication under the operation "*" to be such that if a and b are in Z, then a * b = c if c = a + ... + a, b times. So multiplication in the integers is really just a sum. Note, by this definition, addition can be done a negative number of times. We now use multiplication to define division, which will allow us to define the rational numbers.

We define division under the operation "/", to be such that if a and b are in Z, then c = a / b if and only if there exists a = b * c + r, where r = 0, and c is in Z. But what if a = b * c + r, where 0 < r < b? Then b does not evenly divide a, and this equation is unsolvable within our number system Z. But what if this equation were solvable, and c could be expressed as a ratio, such that c = a / b despite b not evenly dividing a? This hints at a set of numbers known as the rational numbers, Q, whose members can be expressed as a / b, where a and b are in Z. We note that all decimal representations of numbers in Q are either finite or repeating.

Some numbers are not able to be described as a ratio of integers, however, such as the square root of 2, pi, and e. All non-repeating non-finite length decimal numbers are irrational. This property holds for all rational bases of numbers, in fact. By "filling in the gaps" between the rational numbers with these irrational numbers, the real numbers R can be constructed.

Please note that computers do not actually work on real numbers, rather, computers work on binary integers that can be used to represent either "floating point" numbers, or integers.

More Information: