# Divide by zero - huh?

**URL:** <https://boards.straightdope.com/t/divide-by-zero-huh/150165>\
**Category:** Factual Questions\
**Created:** [January 22, 2003, 5:25am UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165 "2003-01-22T05:25:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![samarm](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@samarm](https://boards.straightdope.com/u/samarm)\
**Post date:** [January 22, 2003, 5:25am UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/1 "2003-01-22T05:25:42Z")

</div>

Can someone explain to me why dividing by zero is an impossibilty?

I understand that you can’t divide something into zero parts, but shouldn’t there at least be a mathematical answer. I tend to think that the answer would be “0” rather than “ERROR”?

I just can’t understand the whole concept of it being impossible. Is this a special case, or are there other simple mathematical operations that are impossible?

---

<div class="post-metadata">

**Author:** ![zev\_steinhardt](https://avatars.discourse-cdn.com/v4/letter/z/97f17d/32.png) [@zev\_steinhardt](https://boards.straightdope.com/u/zev_steinhardt)\
**Post date:** [January 22, 2003, 5:28am UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/2 "2003-01-22T05:28:55Z")

</div>

Technically, the answer isn’t “Error,” but “Undefined.”

The concept should be fairly simple to grasp. If you have 50 items, and put 0 in each box, how many boxes will you use?

Zev Steinhardt

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [January 22, 2003, 5:31am UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/3 "2003-01-22T05:31:12Z")

</div>

0 \* 1 = 0 \* 2. Divide by zero, and you’ve got 1 = 2. See where that could lead to problems?

The whole point of division is uniqueness. Fix y and z, and there’s only one number x such that xy = z. If y = 0 and z = 2, what’s x?

The reason why we don’t generally say that it’s 0 is because that violates the division theorem. For any numbers a and b, there are numbers q and r such that a = bq + r, where 0 \< r \< b. You’re saying that q should be 0 if b is; in that case, what would you choose for r?

There are some mathematicians who do define it that way, for technical reasons, but it’s not a popular view.

This should be in GQ, by the way.

---

<div class="post-metadata">

**Author:** ![viking](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@viking](https://boards.straightdope.com/u/viking)\
**Post date:** [January 22, 2003, 5:32am UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/4 "2003-01-22T05:32:01Z")

</div>

Well, take a piece of graph paper (or Gnumeric or even excel, if you must) and plot out X vs 1/X as X starts getting pretty small. You’ll quickly see that 1/0 blows off to infinity, which is undefined…

e.g. if X is one, 1/X is 1  
if X is 0.5, 1/X is 2  
if X is 0.0000000001, then 1/X is 10000000000  
and so on…

---

<div class="post-metadata">

**Author:** ![samarm](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@samarm](https://boards.straightdope.com/u/samarm)\
**Post date:** [January 22, 2003, 5:34am UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/5 "2003-01-22T05:34:49Z")

</div>

Thanks guys.

So division by zero produces infinty? I like the way you explained that, **viking** , as I can follow that through logically.

---

<div class="post-metadata">

**Author:** ![j\_kat\_251](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@j\_kat\_251](https://boards.straightdope.com/u/j_kat_251)\
**Post date:** [January 22, 2003, 5:52am UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/6 "2003-01-22T05:52:05Z")

</div>

Another undefined moment in mathematics, I believe, is the gradient of a vertical line. That might not be right though, I only took it in high school.

---

<div class="post-metadata">

**Author:** ![samarm](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@samarm](https://boards.straightdope.com/u/samarm)\
**Post date:** [January 22, 2003, 5:55am UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/7 "2003-01-22T05:55:21Z")

</div>

I’ve heard that another undefined moment is the number of sides to a circle?

A related question: If computers were not programmed to catch “divide by 0” would they get stuck in an infinite loop, and everntually crash?

---

<div class="post-metadata">

**Author:** ![Triskadecamus](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@Triskadecamus](https://boards.straightdope.com/u/Triskadecamus)\
**Post date:** [January 22, 2003, 8:04am UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/8 "2003-01-22T08:04:00Z")

</div>

**samarm** Yes.

And they used to.

Tris

---

<div class="post-metadata">

**Author:** ![Andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Andy](https://boards.straightdope.com/u/Andy)\
**Post date:** [January 22, 2003, 8:21am UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/9 "2003-01-22T08:21:39Z")

</div>

> [@](#):
>
> \*Originally posted by samarm \*  
> I’ve heard that another undefined moment is the number of sides to a circle?

I thought that was defined as reciprocal zero…

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [January 22, 2003, 8:27am UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/10 "2003-01-22T08:27:57Z")

</div>

> [@](#):
>
> \*Originally posted by samarm \*  
> So division by zero produces infinty?

You can think of it that way, except for 0/0, which is also undefinded. In some ways, 1/0 is no number, and 0/0 is every number.

---

<div class="post-metadata">

**Author:** ![everton](https://avatars.discourse-cdn.com/v4/letter/e/ecb155/32.png) [@everton](https://boards.straightdope.com/u/everton)\
**Post date:** [January 22, 2003, 11:07am UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/11 "2003-01-22T11:07:39Z")

</div>

> [@](#):
>
> \*Originally posted by zev\_steinhardt \*  
> \*\*Technically, the answer isn’t “Error,” but “Undefined.”
> 
> The concept should be fairly simple to grasp. If you have 50 items, and put 0 in each box, how many boxes will you use?
> 
> Zev Steinhardt \*\*

That doesn’t seem like a good example to me, **zev**. Surely you would use zero boxes?

---

<div class="post-metadata">

**Author:** ![VunderBob](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@VunderBob](https://boards.straightdope.com/u/VunderBob)\
**Post date:** [January 22, 2003, 12:09pm UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/12 "2003-01-22T12:09:23Z")

</div>

> [@](#):
>
> \*Originally posted by samarm \*  
> \*\*
> 
> A related question: If computers were not programmed to catch “divide by 0” would they get stuck in an infinite loop, and everntually crash? \*\*

I can’t answer for the earlier ones, but processor architecture since at least the early '70s would catch a divide by zero as an underflow error (think of ‘not enough data’), and quit the program unless told to do something else.

Also, 1/0 = infinity is just one possible answer; as others have explained, finite numbers are also possible. Infinity happens to be the easiest concept for lay people to grasp when this comes up. In electrical engineering, there is the impulse function (Dirac delta for you mathmagicians) which has a finite area, but occurs in 0 elapsed time.

---

<div class="post-metadata">

**Author:** ![kabbes](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@kabbes](https://boards.straightdope.com/u/kabbes)\
**Post date:** [January 22, 2003, 12:22pm UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/13 "2003-01-22T12:22:36Z")

</div>

If you think about it, you’ll realise that there are actually a whole lot of things that are undefined in mathematics. If it is important for us to have a solution then we make one up. If not then we leave it undefined.

For example, “naturally” (arguably) only the numbers 1, 2, 3,… exist. But we want to be able to subtract one of these numbers from another. 2 - 1 is fine but 1 - 2 is not. So we “invent” negative numbers.

Similarly 1 / 2 makes no sense so we have to “invent” fractions.

And so it goes on. The square root of negative four makes no sense unless we invent complex numbers.

So it’s not an unusual situation for the answer to a mathematical question to be undefined. It’s just that for division by zero there is no useful single mapping that we should define.

pan

---

<div class="post-metadata">

**Author:** ![robertliguori](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@robertliguori](https://boards.straightdope.com/u/robertliguori)\
**Post date:** [January 22, 2003, 1:07pm UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/14 "2003-01-22T13:07:55Z")

</div>

> [@](#):
>
> That doesn’t seem like a good example to me, zev. Surely you would use zero boxes?

You’d never terminate, because you’d never put an item in a box. In fact, you could use an infinite number of boxes, and still never put 50 items away at 0 items per box. Hence, there is no number of boxes that can hold 50 items put away at 0 items per box.

---

<div class="post-metadata">

**Author:** ![UncleBeer](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@UncleBeer](https://boards.straightdope.com/u/UncleBeer)\
**Post date:** [January 22, 2003, 2:54pm UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/15 "2003-01-22T14:54:54Z")

</div>

Off to GQ.

---

<div class="post-metadata">

**Author:** ![RTFirefly](https://avatars.discourse-cdn.com/v4/letter/r/c77e96/32.png) [@RTFirefly](https://boards.straightdope.com/u/RTFirefly)\
**Post date:** [January 22, 2003, 3:30pm UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/16 "2003-01-22T15:30:24Z")

</div>

As **kabbes** has correctly pointed out, there are lots of undefined expressions in mathematics. And he further pointed out the crux of why 1/0 isn’t defined:

> [@](#):
>
> for division by zero there is no useful single mapping that we should define.

**viking** has shown why 1/0 = infinity, but it can be -infinity just as easily: if we take a sequence 1/X, where X approaches zero from below (X= -1, -0.1, -0.01, etc.) then 1/X = -1, -10, -100, etc., so by a parallel logic to **viking** ’s, 1/0 should be minus-infinity.

There are two things one can do with a mathematical expression that has multiple ‘natural’ values. One is to choose one value and declare it to be the ‘principal’ value (as we do with square roots of positive numbers, e.g. _the_ square root of 4 is 2, but -2 is also _a_ square root of 4) so as to create a well-defined function or expression.

The other thing we can do is let the expression be undefined, which is what we do with 1/0, or with _c_/0 generally, where _c_ is a nonzero real constant.

Why do we go the principal-value route sometimes, and leave things undefined other times? I don’t know. My _guess_ is that it has to do with which way makes more sense for mathematicians in their work. We _need_ a well-defined _n_th-root function. But we don’t need 1/0 to take on a particular value, and it doesn’t do us any particular good for it to do so, except to possibly confuse students when we begin to discuss infinities.

---

<div class="post-metadata">

**Author:** ![Whack-a-Mole](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/whack-a-mole/32/141_2.png) [@Whack-a-Mole](https://boards.straightdope.com/u/Whack-a-Mole)\
**Post date:** [January 22, 2003, 3:52pm UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/17 "2003-01-22T15:52:52Z")

</div>

> [@](#):
>
> \*Originally posted by samarm \*  
> \*\*A related question: If computers were not programmed to catch “divide by 0” would they get stuck in an infinite loop, and everntually crash? \*\*

You bet. And in some fairly spectacular fashions too. A divide by zero error disabled the AEGIS Cruiser USS Yorktown awhile back.

> [@](#):
>
> The Yorktown lost control of its propulsion system because its computers were unable to divide by the number zero, the memo said. The Yorktown’s Standard Monitoring Control System administrator entered zero into the data field for the Remote Data Base Manager program. That caused the database to overflow and crash all LAN consoles and miniature remote terminal units, the memo said.
> 
> SOURCE: [Software glitches leave Navy Smart Ship dead in the water](http://www.gcn.com/archives/gcn/1998/july13/cov2.htm)

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [January 22, 2003, 4:44pm UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/18 "2003-01-22T16:44:35Z")

</div>

First, I would like to _strongly_ echo what **RTFirefly** , division by zero _cannot_ be equated with either positive or negative infinity.

As to the last part of the OP, there are absolutely, postively an incredible number of mathematical operations that, in certain circumstances, do not have a solution. The log of zero, the arcsin of 2, etc. You feed such values into a computer math library and it will either throw an error or GIGO. Ditto complicated or multivariable equations such as solving for x,y: x+y =2, 2x+2y=3.

Division by zero is only special since it is the only case of the “big four” operations that is not defined for the entire set of reals or integers.

Also, in the realm of computers, bit limitations also affect all basic arithmetic operations. E.g., adding 2 billion and 2 billion doesn’t give you 4 billion when adding signed 32 bit numbers. (It usually gives a large negative number, depending on the hardware.)

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [January 22, 2003, 4:52pm UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/19 "2003-01-22T16:52:03Z")

</div>

Division could be defined as “the number of times that one can wholly subtract X from Y”  
if X is 2 and Y is 6 then I can wholly subtract x from y 3 times 6/2 = 3

If x is zero, I can wholly subtract it from any number until I’m blue in the face; in this sense, dividing a number by zero produces an undefined infinity.

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [January 22, 2003, 4:53pm UTC](https://boards.straightdope.com/t/divide-by-zero-huh/150165/20 "2003-01-22T16:53:28Z")

</div>

(and 6 can be wholly subtracted from 3 exactly half a time, or 3/6 = 0.5)

[Next page](https://boards.straightdope.com/t/divide-by-zero-huh/150165.md?page=2)
