A number is a mathematical object used in counting and measuring. A notational symbol which represents a number is called a numeral, but in common usage the word number is used for both the abstract object and the symbol, as well as for the word for the number. In addition to their use in counting and measuring, numerals are often used for labels (telephone numbers), for ordering (serial numbers), and for codes (ISBNs). In mathematics, the definition of number has been extended over the years to include such numbers as 0, negative numbers, rational numbers, irrational numbers, and complex numbers.
Certain procedures which take one or more numbers as input and produce a number as output are called numerical operations. Unary operations take a single input number and produce a single output number. For example, the successor operation adds one to an integer, thus the successor of 4 is 5. More common are binary operations which take two input numbers and produce a single output number. Examples of binary operations include addition, subtraction, multiplication, division, and exponentiation. The study of numerical operations is called arithmetic.
The branch of mathematics that studies structure in number systems, by means of topics such as groups, rings and fields, is called abstract algebra.
Different types of numbers are used in different cases. Numbers can be classified into sets, called number systems. (For different methods of expressing numbers with symbols, such as the Roman numerals, see numeral systems.)
The most familiar numbers are the natural numbers or counting numbers: one, two, three, and so on.
In the base ten number system, in almost universal use today for arithmetic operations, the symbols for natural numbers are written using ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. In this base ten system, the rightmost digit of a natural number has a place value of one, and every other digit has a place value ten times that of the place value of the digit to its right. The symbol for the set of all natural numbers is N, also written
.
In set theory, which is capable of acting as an axiomatic foundation for modern mathematics, natural numbers can be represented by classes of equivalent sets. For instance, the number 3 can be represented as the class of all sets that have exactly three elements. Alternatively, in Peano Arithmetic, the number 3 is represented as sss0, where s is the "successor" function. Many different representations are possible; all that is needed to formally represent 3 is to inscribe a certain symbol or pattern of symbols 3 times.
Negative numbers are numbers that are less than zero. They are the opposite of positive numbers. For example, if a positive number indicates a bank deposit, then a negative number indicates a withdrawal of the same amount. Negative numbers are usually written by a negative sign (also called a minus sign) in front of the number they are the opposite of. Thus the opposite of 7 is written −7. When the set of negative numbers is combined with the natural numbers and zero, the result is the set of integer numbers, also called integers, Z also written
. Here the letter Z comes from the German word Zahl, (plural Zahlen).
A rational number is a number that can be expressed as a fraction with an integer numerator and a non-zero natural number denominator. The fraction m/n or
m represents equal parts, where n equal parts of that size make up one whole. Two different fractions may correspond to the same rational number; for example 1/2 and 2/4 are equal, that is:
If the absolute value of m is greater than n, then the absolute value of the fraction is greater than 1. Fractions can be greater than, less than, or equal to 1 and can also be positive, negative, or zero. The set of all rational numbers includes the integers, since every integer can be written as a fraction with denominator 1. For example −7 can be written −7/1. The symbol for the rational numbers is Q (for quotient), also written
.
The real numbers include all of the measuring numbers. Real numbers are usually written using decimal numerals, in which a decimal point is placed to the right of the digit with place value one. Each digit to the right of the decimal point has a place value one-tenth of the place value of the digit to its left. Thus
represents 1 hundred, 2 tens, 3 ones, 4 tenths, 5 hundredths, and 6 thousandths. In saying the number, the decimal is read "point", thus: "one two three point four five six ". In the US and UK and a number of other countries, the decimal point is represented by a period, whereas in continental Europe and certain other countries the decimal point is represented by a comma. Zero is often written as 0.0 when necessary to indicate that it is to be treated as a real number rather than as an integer. Negative real numbers are written with a preceding minus sign:
Every rational number is also a real number. To write a fraction as a decimal, divide the numerator by the denominator. It is not the case, however, that every real number is rational. If a real number cannot be written as a fraction of two integers, it is called irrational. A decimal that can be written as a fraction either ends (terminates) or forever repeats, because it is the answer to a problem in division. Thus the real number 0.5 can be written as 1/2 and the real number 0.333... (forever repeating threes) can be written as 1/3. On the other hand, the real number π (pi), the ratio of the circumference of any circle to its diameter, is
Since the decimal neither ends nor forever repeats, it cannot be written as a fraction, and is an example of an irrational number. Other irrational numbers include
(the square root of 2, that is, the positive number whose square is 2).
Thus 1.0 and 0.999... are two different decimal numerals representing the natural number 1. There are infinitely many other ways of representing the number 1, for example 2/2, 3/3, 1.00, 1.000, and so on.
Every real number is either rational or irrational. Every real number corresponds to a point on the number line. The real numbers also have an important but highly technical property called the least upper bound property. The symbol for the real numbers is R or
.
When a real number represents a measurement, there is always a margin of error. This is often indicated by rounding or truncating a decimal, so that digits that suggest a greater accuracy than the measurement itself are removed. The remaining digits are called significant digits. For example, measurements with a ruler can seldom be made without a margin of error of at least 0.01 meters. If the sides of a rectangle are measured as 1.23 meters and 4.56 meters, then multiplication gives an area for the rectangle of 5.6088 square meters. Since only the first two digits after the decimal place are significant, this is usually rounded to 5.61.
In abstract algebra, the real numbers are up to isomorphism uniquely characterized by being the only complete ordered field. They are not, however, an algebraically closed field.
Moving to a greater level of abstraction, the real numbers can be extended to the complex numbers. This set of numbers arose, historically, from trying to find closed formulas for the roots of cubic and quartic polynomials. This led to expressions involving the square roots of negative numbers, and eventually to the definition of a new number: the square root of negative one, denoted by i, a symbol assigned by Leonhard Euler, and called the imaginary unit. The complex numbers consist of all numbers of the form
where a and b are real numbers. In the expression a + bi, the real number a is called the real part and bi is called the imaginary part. If the real part of a complex number is zero, then the number is called an imaginary number or is referred to as purely imaginary; if the imaginary part is zero, then the number is a real number. Thus the real numbers are a subset of the complex numbers. If the real and imaginary parts of a complex number are both integers, then the number is called a Gaussian integer. The symbol for the complex numbers is C or
.
In abstract algebra, the complex numbers are an example of an algebraically closed field, meaning that every polynomial with complex coefficients can be factored into linear factors. Like the real number system, the complex number system is a field and is complete, but unlike the real numbers it is not ordered. That is, there is no meaning in saying that i is greater than 1, nor is there any meaning in saying that that i is less than 1. In technical terms, the complex numbers lack the trichotomy property.
Complex numbers correspond to points on the complex plane, sometimes called the Argand plane.
Each of the number systems mentioned above is a proper subset of the next number system. Symbolically,
.
Moving to problems of computation, the computable numbers are determined in the set of the real numbers. The computable numbers, also known as the recursive numbers or the computable reals, are the real numbers that can be computed to within any desired precision by a finite, terminating algorithm. Equivalent definitions can be given using μ-recursive functions, Turing machines or λ-calculus as the formal representation of algorithms. The computable numbers form a real closed field and can be used in the place of real numbers for many, but not all, mathematical purposes.