Division by zero

The usual definition of the quotient in elementary arithmetic is the number which yields the dividend when multiplied by the divisor.

Following the ordinary rules of elementary algebra while allowing division by zero can create a mathematical fallacy, a subtle mistake leading to absurd results.

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.

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.

To scale this recipe to larger or smaller quantities of cake, a ratio of flour to sugar proportional to

A geometrical appearance of the division-as-ratio interpretation is the slope of a straight line in the Cartesian plane.

For example: The fallacy here arises from the assumption that it is legitimate to cancel 0 like any other number, whereas, in fact, doing so is a form of division by 0.

For example:[18] This is essentially the same fallacious computation as the previous numerical version, but the division by zero was obfuscated because we wrote 0 as x − 1.

In this quantity consisting of that which has zero for its divisor, there is no alteration, though many may be inserted or extracted; as no change takes place in the infinite and immutable God when worlds are created or destroyed, though numerous orders of beings are absorbed or put forth.Historically, one of the earliest recorded references to the mathematical impossibility of assigning a value to

is contained in Anglo-Irish philosopher George Berkeley's criticism of infinitesimal calculus in 1734 in The Analyst ("ghosts of departed quantities").

in this case does not represent any specific real number, such limits are informally said to "equal infinity".

Such a limit may equal any real value, may tend to infinity, or may not converge at all, depending on the particular functions.

and representing a point at infinity, which is defined to be contained in every exterior domain, making those its topological neighborhoods.

This can intuitively be thought of as wrapping up the infinite edges of the complex plane and pinning them together at the single point

a one-point compactification, making the extended complex numbers topologically equivalent to a sphere.

The set is usually denoted by the symbol for the complex numbers decorated by an asterisk, overline, tilde, or circumflex, for example

For instance, in the realm of integers, subtraction is no longer considered a basic operation since it can be replaced by addition of signed numbers.

Answering this revised question precisely requires close examination of the definition of rational numbers.

First, the natural numbers (including zero) are established on an axiomatic basis such as Peano's axiom system and then this is expanded to the ring of integers.

The next step is to define the rational numbers keeping in mind that this must be done using only the sets and operations that have already been established, namely, addition, multiplication and the integers.

Nevertheless, any number system that forms a commutative ring can be extended to a structure called a wheel in which division by zero is always possible.

, and if the original system was an integral domain, the multiplication in the wheel no longer results in a cancellative semigroup.

The concepts applied to standard arithmetic are similar to those in more general algebraic structures, such as rings and fields.

In a field, every nonzero element is invertible under multiplication; as above, division poses problems only when attempting to divide by zero.

Since the field axioms only guarantee the existence of such inverses for nonzero elements, this expression has no meaning when b is zero.

In IEEE floating-point arithmetic, numbers are represented using a sign (positive or negative), a fixed-precision significand and an integer exponent.

Dividing any non-zero number by positive zero (+0) results in an infinity of the same sign as the dividend.

Dividing any non-zero number by negative zero (−0) results in an infinity of the opposite sign as the dividend.

The exact result −2150 is too large to represent as a single-precision number, so an infinity of the same sign is used instead to indicate overflow.

[32] Because of this inconsistency between platforms, the C and C++ programming languages consider the result of dividing by zero undefined behavior.

Graph showing the diagrammatic representation of limits tending to infinity
The reciprocal function y = 1 / x . As x approaches zero from the right, y tends to positive infinity. As x approaches zero from the left, y tends to negative infinity.
The slope of line in the plane is a ratio of vertical to horizontal coordinate differences. For a vertical line, this is 1 : 0 , a kind of division by zero.
Handheld calculators, such as this TI-86 , typically halt and display an error message after an attempt to divide by zero.