The four basic operations – addition, subtraction, multiplication and division – as applied to whole numbers (positive integers), with some restrictions, in elementary arithmetic are used as a framework to support the extension of the realm of numbers to which they apply. For instance, to make it possible to subtract any whole number from another, the realm of numbers must be expanded to the entire set of
integers in order to incorporate the negative integers. Similarly, to support division of any integer by any other, the realm of numbers must expand to the
rational numbers. During this gradual expansion of the number system, care is taken to ensure that the "extended operations", when applied to the older numbers, do not produce different results. Loosely speaking, since division by zero has no meaning (is
undefined) in the whole number setting, this remains true as the setting expands to the
real or even
complex numbers. As the realm of numbers to which these operations can be applied expands there are also changes in how the operations are viewed. 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. Similarly, when the realm of numbers expands to include the rational numbers, division is replaced by multiplication by certain rational numbers. In keeping with this change of viewpoint, the question, "Why can't we divide by zero?", becomes "Why can't a rational number have a zero denominator?". Answering this revised question precisely requires close examination of the definition of rational numbers. In the modern approach to constructing the field of real numbers, the rational numbers appear as an intermediate step in the development that is founded on
set theory. 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. Starting with the set of
ordered pairs of integers, {{tmath| \{(a,\, b)\} }} with , define a
binary relation on this set by if and only if . This relation is shown to be an
equivalence relation and its
equivalence classes are then defined to be the rational numbers. It is in the formal proof that this relation is an equivalence relation that the requirement that the second coordinate is not zero is needed (for verifying
transitivity). Although division by zero cannot be sensibly defined with real numbers and integers, it is possible to consistently define it, or similar operations, in other mathematical structures.
Non-standard analysis In the
hyperreal numbers, division by zero is still impossible, but division by non-zero
infinitesimals is possible. The same holds true in the
surreal numbers.
Distribution theory 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 ; a sophisticated answer refers to the
singular support of the distribution.
Linear algebra In
matrix algebra, square or rectangular blocks of numbers are manipulated as though they were numbers themselves: matrices can be
added and
multiplied, and in some cases, a version of division also exists. Dividing by a matrix means, more precisely, multiplying by its
inverse. Not all matrices have inverses. For example, a
matrix containing only zeros is not invertible. One can define a pseudo-division, by setting , in which represents the
pseudoinverse of . It can be proven that if {{tmath|\textstyle b^{-1} }} exists, then {{tmath|1=\textstyle b^+ = b^{-1} }}. If , then .
Abstract algebra In
abstract algebra, the integers, the rational numbers, the real numbers, and the complex numbers can be abstracted to more general algebraic structures, such as a
commutative ring, which is a mathematical structure where addition, subtraction, and multiplication behave as they do in the more familiar number systems, but division may not be defined. Adjoining a multiplicative inverses to a commutative ring is called
localization. However, the localization of every commutative ring at zero is the
trivial ring, where , so nontrivial commutative rings do not have inverses at zero, and thus division by zero is undefined for nontrivial commutative rings. 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. However, the resulting mathematical structure is no longer a commutative ring, as multiplication no longer distributes over addition. Furthermore, in a wheel, division of an element by itself no longer results in the multiplicative
identity element , 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. This is likewise true in a
skew field (which for this reason is called a
division ring). However, in other rings, division by nonzero elements may also pose problems. For example, the ring of integers
modulo 6. The meaning of the expression should be the solution of the equation . But in the ring , is a
zero divisor. This equation has two distinct solutions, and , so the expression is
undefined. In field theory, the expression is only shorthand for the formal expression {{tmath|\textstyle ab^{-1} }}, where {{tmath|\textstyle b^{-1} }} is the multiplicative inverse of . Since the field axioms only guarantee the existence of such inverses for nonzero elements, this expression has no meaning when is zero. Modern texts, which define fields as a special type of ring, include the axiom for fields (or its equivalent) so that the
zero ring is excluded from being a field. In the zero ring, division by zero is possible, which shows that the other field axioms alone are not sufficient to exclude division by zero in defining a field. == Computer arithmetic ==