Jump to bottom
The function y = 1/x. As x approaches 0 from the right, y approaches infinity (and vice versa).

In mathematics, a division is called a division by zero if the divisor is zero. Such a division can be formally expressed as a / 0 where a is the dividend. Whether this expression can be assigned a well-defined value depends upon the mathematical setting. In ordinary (real number) arithmetic, the expression has no meaning.

In computer programming, integer division by zero may cause a program to terminate or, as in the case of floating point numbers, may result in a special not-a-number value (see below).

Historically, one of the earliest recorded references to the mathematical impossibility of assigning a value to a / 0 is contained in George Berkeley's criticism of infinitesimal calculus in The Analyst; see Ghosts of departed quantities.

In elementary arithmetic

When division is explained at the elementary arithmetic level, it is often considered as a description of dividing a set of objects into equal parts. As an example, consider having ten apples and no knife, and these apples are to be distributed equally to five people at a table. Each person would receive \textstyle\frac{10}{5} = 2 apples. Similarly, if there are 10 apples, and only one person at the table, that person would receive \textstyle\frac{10}{1} = 10 apples.

So for dividing by zero – what is the number of apples that each person receives when 10 apples are fairly distributed amongst 0 people? Certain words can be pinpointed in the question to highlight the problem. The problem with this question is the "when". There is no way to distribute 10 apples amongst 0 people. In mathematical jargon, a set of 10 items cannot be partitioned into 0 subsets. So \textstyle\frac{10}{0}, at least in elementary arithmetic, is said to be meaningless, or undefined.

Similar problems occur if we have 0 apples and 0 people, but this time the problem is in the phrase "the number". A partition is possible (of a set with 0 elements into 0 parts), but since the partition has 0 parts, vacuously every set in our partition has a given number of elements, be it 0, 2, 5, or 1000. If there are, say, 5 apples and 2 people, the problem is in "fairly" and "no knife". In any partition of a 5-set into 2 parts, one of the parts of the partition will have more elements than the other.

In all of the above three cases, \textstyle\frac{10}{0}, \textstyle\frac{0}{0} and \textstyle\frac{5}{2}, one is asked to consider an impossible situation before deciding what the answer will be, and that is why the operations are undefined in these cases.

To understand division by zero, we must check it with multiplication: multiply the quotient by the divisor to get the original number. However, no number multiplied by zero will produce a product other than zero. In order to satisfy division by zero, the quotient must be bigger than all other numbers, i.e. infinity. This connection of division by zero to infinity takes us beyond elementary arithmetic (see below).

A recurring theme even at this elementary stage is that for every undefined arithmetic operation, there is correspondingly a question which is not well-defined. "How many apples will each person receive under a fair distribution of 10 apples amongst 3 people?" is a question which is not well-defined because there can be no fair distribution of 10 apples amongst 3 people.

But there is another way to explain the division: if we want to find out how many people, which are satisfied with half an apple, can we satisfy with 1 apple, we divide 1 by 0.5. The answer is 2. Similarly, if we want to know how many people, which are satisfied with nothing, can we satisfy with 1 apple, we divide 1 by 0. And the answer is any number; we can satisfy any number of people, that are satisfied with nothing, with 1 apple.

Clearly, one cannot extend the operation of division based on the elementary combinatorial considerations by which division is first defined. One needs to construct new number systems.

In arithmetic

The concept which can be used to explain division in arithmetic is that division is the inverse of multiplication. For example,

\frac{6}{3}=2

since 2 is the value for which the unknown quantity in

?\times 3=6

is true. But the expression

\frac{6}{0}=\,?

requires a value to be found for the unknown quantity in

?\times 0=6.

But any number multiplied by 0 is 0 and so there is no number that solves the equation.

The expression

\frac{0}{0}=\,?

requires a value to be found for the unknown quantity in

?\times 0=0.

Again, any number multiplied by 0 is 0 and so this time every number solves the equation instead of there being a single number which can be taken as the value of 0/0.

In general, a single value can't be assigned to a fraction where the denominator is 0 so the value remains undefined (see below for other applications).

Early attempts

The Brahmasphutasiddhanta of Brahmagupta (598–668) is the earliest known text to treat zero as a number in its own right and to define operations involving zero.[1] The author failed, however, in his attempt to explain division by zero: his definition can be easily proven to lead to algebraic absurdities. According to Brahmagupta,

"A positive or negative number when divided by zero is a fraction with the zero as denominator. Zero divided by a negative or positive number is either zero or is expressed as a fraction with zero as numerator and the finite quantity as denominator. Zero divided by zero is zero."

In 830, Mahavira tried unsuccessfully to correct Brahmagupta's mistake in his book in Ganita Sara Samgraha:

"A number remains unchanged when divided by zero."[1]

Bhaskara II tried to solve the problem by defining (in modern notation) \textstyle\frac{n}{0}=\infty.[1] This definition makes some sense, as discussed below, but can lead to paradoxes if not treated carefully. These paradoxes were not treated until modern times.

In algebra

It is generally regarded among mathematicians that a natural way to interpret division by zero is to first define division in terms of other arithmetic operations. Under the standard rules for arithmetic on integers, rational numbers, real numbers and complex numbers, division by zero is undefined. Division by zero must be left undefined in any mathematical system that obeys the axioms of a field. The reason is that division is defined to be the inverse operation of multiplication. This means that the value of a/b is the solution x of the equation bx = a whenever such a value exists and is unique. Otherwise the value is left undefined.

For b = 0, the equation bx = a can be rewritten as 0x = a or simply 0 = a. Thus, in this case, the equation bx = a has no solution if a is not equal to 0, and has any x as a solution if a equals 0. In either case, there is no unique value, so \textstyle\frac{a}{b} is undefined. Conversely, in a field, the expression \textstyle\frac{a}{b} is always defined if b is not equal to zero.

Fallacies based on division by zero

It is possible to disguise a special case of division by zero in an algebraic argument,[1] leading to spurious proofs that 1 = 2 such as the following:

With the following assumptions:

\begin{align}
0\times 1 &= 0 \\
0\times 2 &= 0.
\end{align}

The following must be true:

0\times 1 = 0\times 2.\,

Dividing by zero gives:

\textstyle \frac{0}{0}\times 1 = \frac{0}{0}\times 2.

Simplified, yields:

1 = 2.\,

The fallacy is the implicit assumption that dividing by 0 is a legitimate operation.

Although most educated people would probably recognize the above "proof" as fallacious, the same argument can be presented in a way that makes it harder to spot the error. For example, consider the following equations:

\begin{align}
 (x-x)x &= 0 = x^2-x^2 \\
 (x-x)x &= (x-x)(x+x)
\end{align}

Dividing by x − x gives:

x = x+x\,

and dividing by x gives:

1 = 2.\,

In calculus

Extended real line

At first glance it seems possible to define a/0 by considering the limit of a/b as b approaches 0.

For any positive a, the limit from the right is

\lim_{b \to 0^+} {a \over b} = +\infty

however, the limit from the left is

\lim_{b \to 0^-} {a \over b} = -\infty

and so the \lim_{b \to 0} {a \over b} is undefined (the limit is also undefined for negative a).

Furthermore, there is no obvious definition of 0/0 that can be derived from considering the limit of a ratio. The limit

 \lim_{(a,b) \to (0,0)} {a \over b}

does not exist. Limits of the form

 \lim_{x \to 0} {f(x) \over g(x)}

in which both ƒ(x) and g(x) approach 0 as x approaches 0, may equal any real or infinite value, or may not exist at all, depending on the particular functions ƒ and g (see l'Hôpital's rule for discussion and examples of limits of ratios). These and other similar facts show that the expression 0/0 cannot be well-defined as a limit.

Formal operations

A formal calculation is one which is carried out using rules of arithmetic, without consideration of whether the result of the calculation is well-defined. Thus, it is sometimes useful to think of a/0, where a≠0, as being \infty. This infinity can be either positive, negative or unsigned, depending on context. For example, formally:

\lim\limits_{x \to 0} {\frac{1}{x} =\frac{\lim\limits_{x \to 0} {1}}{\lim\limits_{x \to 0} {x}}} = \frac{1}{0} = \infty.

As with any formal calculation, invalid results may be obtained. A logically rigorous as opposed to formal computation would say only that

\lim\limits_{x \to 0^+} {\frac{1}{x}} = \frac{1}{0^+} = +\infty\text{ and }\lim\limits_{x \to 0^-} {\frac{1}{x}} = \frac{1}{0^-} = -\infty.

(Since the one-sided limits are different, the two-sided limit does not exist in the standard framework of the real numbers. Also, the fraction 1/0 is left undefined in the extended real line, therefore it and

 \frac{\lim\limits_{x \to 0} {1}}{\lim\limits_{x \to 0} {x}}

are meaningless expressions that should not rigorously be used in an equation.)

Real projective line

The set \mathbb{R}\cup\{\infty\} is the real projective line, which is a one-point compactification of the real line. Here \infty means an unsigned infinity, an infinite quantity which is neither positive nor negative. This quantity satisfies -\infty = \infty which is necessary in this context. In this structure, \scriptstyle a/0 = \infty can be defined for nonzero a, and \scriptstyle a/\infty = 0. It is the natural way to view the range of the tangent and cotangent functions of trigonometry: tan(x) approaches the single point at infinity as x approaches either \scriptstyle+\pi/2 or \scriptstyle-\pi/2 from either direction.

This definition leads to many interesting results. However, the resulting algebraic structure is not a field, and should not be expected to behave like one. For example, \infty + \infty is undefined in the projective line.

Riemann sphere

The set \mathbb{C}\cup\{\infty\} is the Riemann sphere, which is of major importance in complex analysis. Here too \infty is an unsigned infinity – or, as it is often called in this context, the point at infinity. This set is analogous to the real projective line, except that it is based on the field of complex numbers. In the Riemann sphere, 1/0=\infty, but 0/0 is undefined, as is 0\times\infty.