| |||||||||
In mathematics, a division is called a division by zero if the divisor is zero. Such a division can be formally expressed as <math>\frac{a}{0}<math>, where a is the dividend. Whether or not this expression has a value depends on which rules of arithmetic are adopted.
Under the standard rules for arithmetic on integers, rational numbers, and real numbers, the value of a division by zero is undefined. The reason is that division is defined to be the inverse operation of multiplication. This means that the value of
is the unique solution x of the equation
whenever such a value exists and is unique. Otherwise the expression <math>{a \over b}<math> is undefined.
For b = 0, the equation b x = 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, <math>{a \over b}<math> is undefined.
It is possible to disguise a division by zero in an algebraic argument, leading to spurious proofs that <math>2 = 1<math> such as the following:
The fallacy is in the assumption that division by x - x is defined.
More practically, division by a term in any algebraic argument will require an explicit assumption that the term cannot be equal to zero or a separate mathematical argument showing that the term can never be zero.
At first glance it seems possible to define <math>{a \over 0}<math> by considering the limit of <math>{a \over b}<math> as b approaches 0. For any nonzero a, it is known that
From this we may consider defining <math>{a \over 0}<math> as infinity for nonzero a. However, with this definition, division is no longer the inverse of multiplication: setting x equal to infinity does not solve
Without the inverse relation between division and multiplication, the definition <math>{a \over 0} = \infty<math> isn't generally useful.
As for the case a = 0, there is not any obvious definition of <math>{0 \over 0}<math> that can be derived from considering the limit of a ratio. The limit
does not exist. In addition, limits of the form
in which both f(x) and g(x) approach 0 as x approaches zero, may converge to any value or may not converge at all. See l'Hopital's rule for discussion and examples of limits of ratios.
In distribution theory one can extend the function
to a distribution on the whole space of real numbers (in effect by using Cauchy principal values). It does not, however, make sense to ask for a 'value' of this distribution at <math>x = 0<math>.
Although division by zero is undefined with real numbers and integers, it is possible to consistently define division by zero in other mathematical structures, for instance on the Riemann sphere. See also hyperreal numbers and surreal numbers where division by non-zero infinitesimals is possible. If a number system forms a commutative ring, as does the integers, the real numbers, and the complex numbers, for instance, it can be extended to a wheel in which division by zero is always possible, but division has then a slightly different meaning.
For the complex plane, see also pole (complex analysis).
IEEE 754 specifies that every floating point arithmetic operation, including division by zero, has a well-defined result. In IEEE 754 arithmetic, a/0 is positive infinity when a is positive, negative infinity when a is negative, and NaN ("not a number") when a = 0. These definitions are derived from the properties of limits of ratios, as discussed above. At present, IEEE 754 is the most common floating point specification, as it is implemented by Intel processors and others.
Integer division by zero may be handled differently than floating point. Intel processors generate an interrupt when an attempt is made to divide an integer by zero.
To ensure that every operation yields a finite, numerical result (floating point), and avoids an interrupt (integer), a computer program may refuse to execute a division if the divisor is zero.