In mathematics, division by zero, division where the divisor (denominator) is zero, is a unique and problematic special case. Using fraction notation, the general example can be written as , where is the dividend (numerator).
The usual definition of the quotient in elementary arithmetic is the number which yields the dividend when multiplied by the divisor. That is, is equivalent to By this definition, the quotient is nonsensical, as the product is always rather than some other number Following the ordinary rules of elementary algebra while allowing division by zero can create a mathematical fallacy, a subtle mistake leading to absurd results. To prevent this, the arithmetic of real numbers and more general numerical structures called fields leaves division by zero undefined, and situations where division by zero might occur must be treated with care. Since any number multiplied by zero is zero, the expression is also undefined.
Calculus studies the behavior of functions in the limit as their input tends to some value. When a real function can be expressed as a fraction whose denominator tends to zero, the output of the function becomes arbitrarily large, and is said to "tend to infinity", a type of mathematical singularity. For example, the reciprocal function, tends to infinity as tends to When both the numerator and the denominator tend to zero at the same input, the expression is said to take an indeterminate form, as the resulting limit depends on the specific functions forming the fraction and cannot be determined from their separate limits.
As an alternative to the common convention of working with fields such as the real numbers and leaving division by zero undefined, it is possible to define the result of division by zero in other ways, resulting in different number systems. For example, the quotient can be defined to equal zero; it can be defined to equal a new explicit point at infinity, sometimes denoted by the infinity symbol ; or it can be defined to result in signed infinity, with positive or negative sign depending on the sign of the dividend. In these number systems division by zero is no longer a special exception per se, but the point or points at infinity involve their own new types of exceptional behavior.
In computing, an error may result from an attempt to divide by zero. Depending on the context and the type of number involved, dividing by zero may evaluate to positive or negative infinity, return a special not-a-number value, or crash the program, among other possibilities.