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.
The division can be conceptually interpreted in several ways. [1]
In quotitive division, the dividend is imagined to be split up into parts of size (the divisor), and the quotient is the number of resulting parts. For example, imagine ten slices of bread are to be made into sandwiches, each requiring two slices of bread. A total of five sandwiches can be made (). Now imagine instead that zero slices of bread are required per sandwich (perhaps a lettuce wrap). Arbitrarily many such sandwiches can be made from ten slices of bread, as the bread is irrelevant. [2]
The quotitive concept of division lends itself to calculation by repeated subtraction: dividing entails counting how many times the divisor can be subtracted before the dividend runs out. Because no finite number of subtractions of zero will ever exhaust a non-zero dividend, calculating division by zero in this way never terminates. [3] Such an interminable division-by-zero algorithm is physically exhibited by some mechanical calculators. [4]
In partitive division, the dividend is imagined to be split into parts, and the quotient is the resulting size of each part. For example, imagine ten cookies are to be divided among two friends. Each friend will receive five cookies (). Now imagine instead that the ten cookies are to be divided among zero friends. How many cookies will each friend receive? Since there are no friends, this is an absurdity. [5]
In another interpretation, the quotient represents the ratio [6] For example, a cake recipe might call for ten cups of flour and two cups of sugar, a ratio of or, proportionally, To scale this recipe to larger or smaller quantities of cake, a ratio of flour to sugar proportional to could be maintained, for instance one cup of flour and one-fifth cup of sugar, or fifty cups of flour and ten cups of sugar. [7] Now imagine a sugar-free cake recipe calls for ten cups of flour and zero cups of sugar. The ratio or proportionally is perfectly sensible: [8] it just means that the cake has no sugar. However, the question "How many parts flour for each part sugar?" still has no meaningful numerical answer.
A geometrical appearance of the division-as-ratio interpretation is the slope of a straight line in the Cartesian plane. [9] The slope is defined to be the "rise" (change in vertical coordinate) divided by the "run" (change in horizontal coordinate) along the line. When this is written using the symmetrical ratio notation, a horizontal line has slope and a vertical line has slope However, if the slope is taken to be a single real number then a horizontal line has slope while a vertical line has an undefined slope, since in real-number arithmetic the quotient is undefined. [10] The real-valued slope of a line through the origin is the vertical coordinate of the intersection between the line and a vertical line at horizontal coordinate dashed black in the figure. The vertical red and dashed black lines are parallel, so they have no intersection in the plane. Sometimes they are said to intersect at a point at infinity, and the ratio is represented by a new number ; [11] see § Projectively extended real line below. Vertical lines are sometimes said to have an "infinitely steep" slope.
Division is the inverse of multiplication, meaning that multiplying and then dividing by the same non-zero quantity, or vice versa, leaves an original quantity unchanged; for example . [12] Thus a division problem such as can be solved by rewriting it as an equivalent equation involving multiplication, where represents the same unknown quantity, and then finding the value for which the statement is true; in this case the unknown quantity is because so therefore [13]
An analogous problem involving division by zero, requires determining an unknown quantity satisfying However, any number multiplied by zero is zero rather than six, so there exists no number which can substitute for to make a true statement. [14]
When the problem is changed to the equivalent multiplicative statement is ; in this case any value can be substituted for the unknown quantity to yield a true statement, so there is no single number which can be assigned as the quotient
Because of these difficulties, quotients where the divisor is zero are traditionally taken to be undefined, and division by zero is not allowed. [15] [16]
A compelling reason for not allowing division by zero is that allowing it leads to fallacies.
When working with numbers, it is easy to identify an illegal division by zero. 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.
Using algebra, it is possible to disguise a division by zero [17] to obtain an invalid proof. 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.
The Brāhmasphuṭasiddhānta of Brahmagupta (c. 598–668) is the earliest text to treat zero as a number in its own right and to define operations involving zero. [17] 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, Mahāvīra unsuccessfully tried to correct the mistake Brahmagupta made in his book Ganita Sara Samgraha: "A number remains unchanged when divided by zero." [17]
Bhāskara II's Līlāvatī (12th century) proposed that division by zero results in an infinite quantity, [19]
A quantity divided by zero becomes a fraction the denominator of which is zero. This fraction is termed an infinite quantity. 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"). [20]
Calculus studies the behavior of functions using the concept of a limit, the value to which a function's output tends as its input tends to some specific value. The notation means that the value of the function can be made arbitrarily close to by choosing sufficiently close to
In the case where the limit of the real function increases without bound as tends to the function is not defined at a type of mathematical singularity. Instead, the function is said to "tend to infinity", denoted and its graph has the line as a vertical asymptote. While such a function is not formally defined for and the infinity symbol in this case does not represent any specific real number, such limits are informally said to "equal infinity". If the value of the function decreases without bound, the function is said to "tend to negative infinity", In some cases a function tends to two different values when tends to from above () and below (); such a function has two distinct one-sided limits. [21]
A basic example of an infinite singularity is the reciprocal function, which tends to positive or negative infinity as tends to :
In most cases, the limit of a quotient of functions is equal to the quotient of the limits of each function separately,
However, when a function is constructed by dividing two functions whose separate limits are both equal to then the limit of the result cannot be determined from the separate limits, so is said to take an indeterminate form, informally written (Another indeterminate form, results from dividing two functions whose limits both tend to infinity.) Such a limit may equal any real value, may tend to infinity, or may not converge at all, depending on the particular functions. For example, in
the separate limits of the numerator and denominator are , so we have the indeterminate form , but simplifying the quotient first shows that the limit exists:
The affinely extended real numbers are obtained from the real numbers by adding two new numbers and read as "positive infinity" and "negative infinity" respectively, and representing points at infinity. With the addition of the concept of a "limit at infinity" can be made to work like a finite limit. When dealing with both positive and negative extended real numbers, the expression is usually left undefined. However, in contexts where only non-negative values are considered, it is often convenient to define .
The set is the projectively extended real line, which is a one-point compactification of the real line. Here means an unsigned infinity or point at infinity, an infinite quantity that is neither positive nor negative. This quantity satisfies , which is necessary in this context. In this structure, can be defined for nonzero a, and when a is not . It is the natural way to view the range of the tangent function and cotangent functions of trigonometry: tan(x) approaches the single point at infinity as x approaches either +π/2 or −π/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, is undefined in this extension of the real line.
The subject of complex analysis applies the concepts of calculus in the complex numbers. Of major importance in this subject is the extended complex numbers the set of complex numbers with a single additional number appended, usually denoted by the infinity symbol 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. This equivalence can be extended to a metrical equivalence by mapping each complex number to a point on the sphere via inverse stereographic projection, with the resulting spherical distance applied as a new definition of distance between complex numbers; and in general the geometry of the sphere can be studied using complex arithmetic, and conversely complex arithmetic can be interpreted in terms of spherical geometry. As a consequence, the set of extended complex numbers is often called the Riemann sphere. The set is usually denoted by the symbol for the complex numbers decorated by an asterisk, overline, tilde, or circumflex, for example
In the extended complex numbers, for any nonzero complex number ordinary complex arithmetic is extended by the additional rules However, , , and are left undefined.
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. [22]
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. [23] 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, {(a, b)} with b ≠ 0, define a binary relation on this set by (a, b) ≃ (c, d) if and only if ad = bc. 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). [24] [25] [26]
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.
In the hyperreal numbers, division by zero is still impossible, but division by non-zero infinitesimals is possible. [27] The same holds true in the surreal numbers. [28]
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 x = 0; a sophisticated answer refers to the singular support of the distribution.
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. [29] For example, a matrix containing only zeros is not invertible.
One can define a pseudo-division, by setting a/b = ab+, in which b+ represents the pseudoinverse of b. It can be proven that if b−1 exists, then b+ = b−1. If b equals 0, then b+ = 0.
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. [30] 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 Z/6Z of integers mod 6. The meaning of the expression should be the solution x of the equation . But in the ring Z/6Z, 2 is a zero divisor. This equation has two distinct solutions, x = 1 and x = 4, so the expression is undefined.
In field theory, the expression is only shorthand for the formal expression ab−1, where b−1 is the multiplicative inverse of b. Since the field axioms only guarantee the existence of such inverses for nonzero elements, this expression has no meaning when b is zero. Modern texts, that define fields as a special type of ring, include the axiom 0 ≠ 1 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 are not sufficient to exclude division by zero in a field.
In computing, most numerical calculations are done with floating-point arithmetic, which since the 1980s has been standardized by the IEEE 754 specification. In IEEE floating-point arithmetic, numbers are represented using a sign (positive or negative), a fixed-precision significand and an integer exponent. Numbers whose exponent is too large to represent instead "overflow" to positive or negative infinity (+∞ or −∞), while numbers whose exponent is too small to represent instead "underflow" to positive or negative zero (+0 or −0). A NaN (not a number) value represents undefined results.
In IEEE arithmetic, division of 0/0 or ∞/∞ results in NaN, but otherwise division always produces a well-defined result. 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. This definition preserves the sign of the result in case of arithmetic underflow. [31]
For example, using single-precision IEEE arithmetic, if x = −2−149, then x/2 underflows to −0, and dividing 1 by this result produces 1/(x/2) = −∞. 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.
Integer division by zero is usually handled differently from floating point since there is no integer representation for the result. CPUs differ in behavior: for instance x86 processors trigger a hardware exception, while PowerPC processors silently generate an incorrect result for the division and continue, and ARM processors can either cause a hardware exception or return zero. [32] Because of this inconsistency between platforms, the C and C++ programming languages consider the result of dividing by zero undefined behavior. [33] In typical higher-level programming languages, such as Python, [34] an exception is raised for attempted division by zero, which can be handled in another part of the program.
Many proof assistants, such as Coq and Lean, define 1/0 = 0. This is due to the requirement that all functions are total. Such a definition does not create contradictions, as further manipulations (such as cancelling out) still require that the divisor is non-zero. [35] [36]
Some other operations, including division, can also be performed by the desk calculator (but don't try to divide by zero; the calculator never will stop trying to divide until stopped manually).For a video demonstration, see: What happens when you divide by zero on a mechanical calculator?, 7 Mar 2021, retrieved 2024-01-06– via YouTube
{{citation}}
: CS1 maint: DOI inactive as of November 2024 (link)With appropriate care to be certain that the algebraic signs are not determined by rounding error, the affine mode preserves order relations while fixing up overflow. Thus, for example, the reciprocal of a negative number which underflows is still negative.
{{cite conference}}
: CS1 maint: overridden setting (link)ZeroDivisionError
", retrieved 2024-01-22The standard division function on natural numbers in Coq, div, is total and pure, but incorrect: when the divisor is 0, the result is 0.
{{cite conference}}
: CS1 maint: overridden setting (link)In number theory, an arithmetic, arithmetical, or number-theoretic function is generally any function f(n) whose domain is the positive integers and whose range is a subset of the complex numbers. Hardy & Wright include in their definition the requirement that an arithmetical function "expresses some arithmetical property of n". There is a larger class of number-theoretic functions that do not fit this definition, for example, the prime-counting functions. This article provides links to functions of both classes.
In mathematics, the greatest common divisor (GCD), also known as greatest common factor (GCF), of two or more integers, which are not all zero, is the largest positive integer that divides each of the integers. For two integers x, y, the greatest common divisor of x and y is denoted . For example, the GCD of 8 and 12 is 4, that is, gcd(8, 12) = 4.
Multiplication is one of the four elementary mathematical operations of arithmetic, with the other ones being addition, subtraction, and division. The result of a multiplication operation is called a product.
In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members. The number of elements is called the length of the sequence. Unlike a set, the same elements can appear multiple times at different positions in a sequence, and unlike a set, the order does matter. Formally, a sequence can be defined as a function from natural numbers to the elements at each position. The notion of a sequence can be generalized to an indexed family, defined as a function from an arbitrary index set.
In number theory, a Gaussian integer is a complex number whose real and imaginary parts are both integers. The Gaussian integers, with ordinary addition and multiplication of complex numbers, form an integral domain, usually written as or
In mathematics, the extended real number system is obtained from the real number system by adding two elements denoted and that are respectively greater and lower than every real number. This allows for treating the potential infinities of infinitely increasing sequences and infinitely decreasing series as actual infinities. For example, the infinite sequence of the natural numbers increases infinitively and has no upper bound in the real number system ; in the extended real number line, the sequence has as its least upper bound and as its limit. In calculus and mathematical analysis, the use of and as actual limits extends significantly the possible computations. It is the Dedekind–MacNeille completion of the real numbers.
The imaginary unit or unit imaginary number is a mathematical constant that is a solution to the quadratic equation x2 + 1 = 0. Although there is no real number with this property, i can be used to extend the real numbers to what are called complex numbers, using addition and multiplication. A simple example of the use of i in a complex number is 2 + 3i.
In number theory, Euler's totient function counts the positive integers up to a given integer n that are relatively prime to n. It is written using the Greek letter phi as or , and may also be called Euler's phi function. In other words, it is the number of integers k in the range 1 ≤ k ≤ n for which the greatest common divisor gcd(n, k) is equal to 1. The integers k of this form are sometimes referred to as totatives of n.
Division is one of the four basic operations of arithmetic. The other operations are addition, subtraction, and multiplication. What is being divided is called the dividend, which is divided by the divisor, and the result is called the quotient.
In mathematics, a multiplicative inverse or reciprocal for a number x, denoted by 1/x or x−1, is a number which when multiplied by x yields the multiplicative identity, 1. The multiplicative inverse of a fraction a/b is b/a. For the multiplicative inverse of a real number, divide 1 by the number. For example, the reciprocal of 5 is one fifth (1/5 or 0.2), and the reciprocal of 0.25 is 1 divided by 0.25, or 4. The reciprocal function, the function f(x) that maps x to 1/x, is one of the simplest examples of a function which is its own inverse (an involution).
In mathematics, analytic number theory is a branch of number theory that uses methods from mathematical analysis to solve problems about the integers. It is often said to have begun with Peter Gustav Lejeune Dirichlet's 1837 introduction of Dirichlet L-functions to give the first proof of Dirichlet's theorem on arithmetic progressions. It is well known for its results on prime numbers and additive number theory.
In arithmetic, a quotient is a quantity produced by the division of two numbers. The quotient has widespread use throughout mathematics. It has two definitions: either the integer part of a division or a fraction or ratio. For example, when dividing 20 by 3, the quotient is 6 in the first sense and in the second sense.
Indeterminate form is a mathematical expression that can obtain any value depending on circumstances. In calculus, it is usually possible to compute the limit of the sum, difference, product, quotient or power of two functions by taking the corresponding combination of the separate limits of each respective function. For example,
Balanced ternary is a ternary numeral system that uses a balanced signed-digit representation of the integers in which the digits have the values −1, 0, and 1. This stands in contrast to the standard (unbalanced) ternary system, in which digits have values 0, 1 and 2. The balanced ternary system can represent all integers without using a separate minus sign; the value of the leading non-zero digit of a number has the sign of the number itself. The balanced ternary system is an example of a non-standard positional numeral system. It was used in some early computers and has also been used to solve balance puzzles.
In mathematics, the remainder is the amount "left over" after performing some computation. In arithmetic, the remainder is the integer "left over" after dividing one integer by another to produce an integer quotient. In algebra of polynomials, the remainder is the polynomial "left over" after dividing one polynomial by another. The modulo operation is the operation that produces such a remainder when given a dividend and divisor.
In computing, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another, called the modulus of the operation.
In number theory, natural density, also referred to as asymptotic density or arithmetic density, is one method to measure how "large" a subset of the set of natural numbers is. It relies chiefly on the probability of encountering members of the desired subset when combing through the interval [1, n] as n grows large.
A division algorithm is an algorithm which, given two integers N and D, computes their quotient and/or remainder, the result of Euclidean division. Some are applied by hand, while others are employed by digital circuit designs and software.
In mathematics, a rational number is a number that can be expressed as the quotient or fraction of two integers, a numerator p and a non-zero denominator q. For example, is a rational number, as is every integer. The set of all rational numbers, also referred to as "the rationals", the field of rationals or the field of rational numbers is usually denoted by boldface Q, or blackboard bold
In mathematics, division by infinity is division where the divisor (denominator) is ∞. In ordinary arithmetic, this does not have a well-defined meaning, since ∞ is a mathematical concept that does not correspond to a specific number, and moreover, there is no nonzero real number that, when added to itself an infinite number of times, gives a finite number, unless you address the concept of indeterminate forms. However, "dividing by ∞" can be given meaning as an informal way of expressing the limit of dividing a number by larger and larger divisors.