TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why you can't divide by zero

67 pointsby sharjeelsayedover 1 year ago

30 comments

cvossover 1 year ago
This explanation isn&#x27;t logically complete. It starts by asking why division by zero is undefined and concludes with &quot;0&#x2F;0 = 2, which is just not true.&quot;<p>But how can it be &quot;just not true&quot;? The point of this exercise was to investigate whether we can find a definition for division by zero, and here we&#x27;ve just produced a candidate! You could just define division by zero to be 2 and move on. To throw away this possibility at this point is to assume the conclusion.<p>It&#x27;s not obviously false that 0&#x2F;0 = 2 (yet).<p>The problem comes in when you repeat the exercise on a different example and find that also 0&#x2F;0 = 3, or whatever. And now you start to see something is really amiss.
评论 #38505348 未加载
评论 #38505129 未加载
评论 #38508273 未加载
评论 #38505387 未加载
评论 #38507508 未加载
somatover 1 year ago
The thing about division by zero is that it does not make sense only because you don&#x27;t know the math to make sense of it.<p>Math has a long honorable tradition of things that did not make sense until somebody invented the math to describe them.<p>A inane short list of stuff invented just to deal with results that did not make sense from a person who is terrible at math.<p>Subtract 5 from 3, the result does not make sense, someone had to invent a whole new category of numbers to handle screw ball results like this.<p>The square roots of negative numbers. What sort of black magic is this.<p>divide something by nothing. get out of here you witch. The interesting thing is that the mechanics of computation(which surprisingly has little to do with actual math) has to do something with the operation. My favorite is this one. <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=7Kd3R_RlXgc" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=7Kd3R_RlXgc</a> (curiousmarc)
评论 #38505334 未加载
评论 #38505076 未加载
评论 #38507761 未加载
评论 #38505572 未加载
评论 #38506074 未加载
评论 #38506220 未加载
kwk1over 1 year ago
Math is like a game where you can pick the rules but you have to live with the consequences, and if we choose to define division by zero, a result is that we can prove any number equal to another, e.g. 1 = 2. This ruleset is not fruitful, so we don&#x27;t do it, but it can be that a new choice unlocks interesting dynamics, like choosing a definition that allows handling roots of negative numbers.
评论 #38507649 未加载
jjgreenover 1 year ago
Of course you can&#x27;t<p><pre><code> irb(main):004:0&gt; 1&#x2F;0 Traceback (most recent call last): 5: from ...&#x2F;bin&#x2F;irb:23:in `&lt;main&gt;&#x27; 4: from ...&#x2F;bin&#x2F;irb:23:in `load&#x27; 3: from ...&#x2F;gems&#x2F;irb-1.2.6&#x2F;exe&#x2F;irb:11:in `&lt;top (required)&gt;&#x27; 2: from (irb):4 1: from (irb):4:in `&#x2F;&#x27; ZeroDivisionError (divided by 0) </code></pre> unless your number system has infinities<p><pre><code> irb(main):005:0&gt; 1.0&#x2F;0.0 =&gt; Infinity irb(main):006:0&gt; 1.0&#x2F;-0.0 =&gt; -Infinity </code></pre> Bah, that&#x27;s just computers, not proper maths ... <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Riemann_sphere" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Riemann_sphere</a>
评论 #38504904 未加载
评论 #38504684 未加载
SAI_Peregrinusover 1 year ago
I find the explanation by limits more convincing. The limit of 1&#x2F;n as n approaches 0 from the positive direction is a positive infinity. The limit of 1&#x2F;n as n approaches 0 from the negative direction is a negative infinity. Those are different, the overall limit diverges, so 1&#x2F;0 is undefined. The same argument applies to all nonzero numbers in glace of 1. 0&#x2F;n as n goes to 0 does limit to 0 but it&#x27;s &quot;cleaner&quot; to not have the special case.
评论 #38505195 未加载
评论 #38504984 未加载
评论 #38506631 未加载
marcusverusover 1 year ago
here’s how it makes sense to me:<p>What question are we actually asking when we ask “what is 8 divided by 2”? We’re asking “If I have 8 jellybeans and break then into two groups, how many jellybeans are in each group?” So Consider the question for 8&#x2F;0: “If I have 8 jellybeans and break them into zero groups, how many jellybeans are in each group?” The question itself is invalid. Answering with any number wouldn’t make sense, the only response that would make sense would be “what do you mean? There are no groups!” It’s almost like it stops being a math problem at all, hence no mathematical answer.
评论 #38505434 未加载
评论 #38505415 未加载
评论 #38510332 未加载
Spivakover 1 year ago
One of my favorite math quotes -- definitions are neither true nor false, they&#x27;re either useful or not useful.<p>So this misses it a bit. You can divide 0 by 0 for example and it&#x27;s 1. In fact you&#x27;ve probably already done it without thinking about it because it&#x27;s so intuitive.<p><pre><code> f(x) = sum(x^n, n=0, 2) = x^2 + x + 1 f(0) = 0^0 + 0^1 + 0^2 = 1 </code></pre> and 0^0 = 0&#x2F;0. It&#x27;s a definition that&#x27;s useful. If you remember your calculus you probably also remember that inf * 0 is also indeterminate but in measure theory you just define it to be 0 and move on.<p>Also you can just straight up divide any number by 0 on the Riemann Sphere (the complex numbers adjoin infinity) and such a construction turns out to be good for modeling real world things.<p>The floating point numbers adjoin infinity and make some definitions to make them work and it&#x27;s good because again it&#x27;s useful for the calculations people want to do.<p>I get that it&#x27;s not satisfying but division by 0 is whatever we want it to be because the answer isn&#x27;t prescribed by the ring axioms. But if you make it too weird it won&#x27;t by good for anything and every theorem and formula will have to account for your special case.
csomarover 1 year ago
&gt; But if we have 2 * 0 = 0, the inverse of that would be 0 &#x2F; 0 = 2, which is just not true.<p>This is complete non-sense. You defined a number (zero) and defined a relation (2 * 0 = 0). Then you concluded that 0 &#x2F; 0 = 2 is not true? You could also equally say that 0 &#x2F; 0 = 2 or any number or non-number really.
评论 #38505624 未加载
jasonhanselover 1 year ago
Sure you can: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Projectively_extended_real_line" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Projectively_extended_real_lin...</a>
FireInsightover 1 year ago
I was somehow thinking of division by zero in the shower or something the other day, and got something that convinced me about it&#x27;s undefined-ness.<p>If we take the equation `x = a&#x2F;0` and solve for a we get:<p>``` x = a&#x2F;0 |*0 a = 0x a = 0 ```<p>Since `a` could be any number, the statement is false unless `a` is defined as zero or there exists some number `x` which when multiplied by zero does not yield zero.<p>In this case though, even if `a = 0`, we can&#x27;t really determine `x` because `0&#x2F;0` is not something commonly defined in mathematics.<p>I don&#x27;t know what the point is of having no apples and no baskets to divide them in to.
fxjover 1 year ago
In non-standard analysis a whole set of infinitesinal numbers is introduced which are essentially zero. But you can do math with them (including division) and they are very useful for an alternative version of calculus.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Nonstandard_analysis" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Nonstandard_analysis</a><p>and<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Nonstandard_calculus" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Nonstandard_calculus</a>
8bitsruleover 1 year ago
My first, empirical answer: physically, dividing a candybar into x parts leaves x parts. Dividing it by 1 OR 0 or -x is not dividing it. You&#x27;re left with 1 candybar. Infinity? is overthinkig it.<p>It also depends on how you divide. Dividing the Rosetta Stone into two parts, much information can be lost depending on the orientation of the cut. Say you divide it at a 45° angle from top left to bottom right) might be ok, depending on how much the pieces are separated.<p>Clearly the simple little word &#x27;divide&#x27; is carrying too much weight here. Mathers, feh.
PopAlongKidover 1 year ago
&gt;But if we have 2 * 0 = 0, the inverse of that would be 0 &#x2F; 0 = 2, which is just not true<p>By the article&#x27;s own definition, there are two inversions for each operation so why is only one of them given as &quot;proof&quot;? Taking the other inversion, we have 0 &#x2F; 2 = 0 which is perfectly correct, and contradicts the claim that inversions &quot;prove&quot; why we can&#x27;t divide by zero.<p>Why can&#x27;t 0 &#x2F; 0 be defined to be any number you wish? The inversions would work fine.
redbellover 1 year ago
Eddie Woo has an excellent explanation on this topic [1] that I came across a few years ago. After watching it, I was really questioning why on earth we never had this concept discussed in school, and we were only told that <i>we can&#x27;t</i> and <i>it&#x27;s undefined</i>. Other simple math operations like why 0!=1 and e0=1 are cool to explore too.<p>_________________<p>1. <a href="https:&#x2F;&#x2F;youtu.be&#x2F;J2z5uzqxJNU" rel="nofollow noreferrer">https:&#x2F;&#x2F;youtu.be&#x2F;J2z5uzqxJNU</a>
评论 #38508564 未加载
nyc111over 1 year ago
İt depends on how number is defined. Euclid defined number as multitude of units. Zero does not have units so zero is not a number and cannot enter arithmetic operations such addition and subtraction. (Division is repeated subtraction.) For the same reason one was not a number in Euclid.<p>I’m trying to find out when did Euclid lose his authority. By 1901, Bertrand Russell was defining number as an abstract relation, namely, as a one-to-one relation between two sets.
Charon77over 1 year ago
A gradient is defined by dy&#x2F;dx.<p>And it&#x27;s associated with lines.<p>If you have gradient=2, you&#x27;ll have a line that goes through origin and (1,2).<p>If you increase the gradient, it&#x27;ll decrease the apparent &#x27;dy&#x27;. You do it until the line becomes vertical, equivalent of dy=0. A vertical line is a valid object, but mathematically, it&#x27;s no longer a function. You might say your math breaks describing the thing so you&#x27;ll need a different math.
评论 #38505055 未加载
Jimmc414over 1 year ago
&quot;Zero: Biography of a Dangerous Idea&quot; by Charles Seife is a great read you can finish in a few sittings.
djmipsover 1 year ago
Or sometimes you CAN divide by zero (on a computer) and use it to your advantage!<p>&quot;Stand Back, I&#x27;m Gonna Divide By Zero&quot; <a href="https:&#x2F;&#x2F;youtu.be&#x2F;6BIfqfC1i7U?t=1233" rel="nofollow noreferrer">https:&#x2F;&#x2F;youtu.be&#x2F;6BIfqfC1i7U?t=1233</a>
sowbugover 1 year ago
If you try it with long division, you&#x27;ll notice that the process never terminates, regardless of the digits you put as the answer. It&#x27;s hardly a rigorous proof, but it&#x27;s a good hint that something strange is happening.
phaedryxover 1 year ago
Because you can take something and divide it into zero equally sized groups
mo_42over 1 year ago
Alternative but similar explanation: because e * 0 = 0 cancels the information e. So when doing (e * 0) &#x2F; 0 we don&#x27;t get e back.<p>I wasn&#x27;t aware of this unique property of &#x2F; in arithmetic.
kamma4434over 1 year ago
One of the first functions I define in a new environment&#x2F;language is div(int m, int n) that returns 0 if n is 0. Maths apart, is what you want almost always IRL - if you have 0 pages visited out of 0 pages, 0% will do. It saves me from tracking an exception, hamming result that is not an integer and handling the case when printing it. in practice it’s good enough.
jancsikaover 1 year ago
How does mathematics avoid technical debt?<p>Like &quot;division by zero is one and only one of the following: a) zero in the case of 1,273 historical contexts where that answer just made things work out smoothly for everyone involved, b) zero in a new case, pending addition to the official tally in &#x27;a&#x27; above, c) infinity, for use in science fiction, or d) undefined.&quot;
RcouF1uZ4gsCover 1 year ago
More interestingly, there is a nice proof of 1 = 2 if you divide by zero<p><a href="https:&#x2F;&#x2F;www.math.toronto.edu&#x2F;mathnet&#x2F;falseProofs&#x2F;first1eq2.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.math.toronto.edu&#x2F;mathnet&#x2F;falseProofs&#x2F;first1eq2.h...</a>
kuratkullover 1 year ago
I have always thought of it as (using people for easier understanding): dividing something to nobody means nothing was divided. Eg. I have to give away 8 apples to 0 people, so no action was taken due to there being no recipients, the whole action was a NOP.
smusamashahover 1 year ago
I understand it as num &#x2F; 1 = num. num &#x2F; 0.5 = num * 2. Smaller the number I try to divide with, larger the answer. Means closer you get to zero the answer is already too large and at 0 it has to be infinite. The answer can&#x27;t be just 0 at that point.
评论 #38505991 未加载
imetatrollover 1 year ago
The actual reason is asymptotes. I leave it as an exercise to the reader to see what happens as you divide by smaller and smaller numbers as they approach zero.<p>In calculus you want continuity. You don&#x27;t want your curve to suddenly jump to some inane location - like zero - as some have suggested for the solution to 2&#x2F;0.<p>Tragically this is a blog post where the author clearly doesn&#x27;t have any math background at all.
gbro3nover 1 year ago
The inverse of 2 * 0 = 0 would be 2 &#x2F; 0 = 0, not 0 &#x2F; 0 = 2
dudulover 1 year ago
Yesterday on my X timeline there was a woman explaining how her daughter&#x27;s teacher had told the kids that 1&#x2F;0=0.<p>The woman wrote to the teacher to explain that no, this is incorrect. The teacher got so mad she looped in the principal who sided with the teacher.<p>Parents, teach your kids that even teachers make mistake and can be petty :) and also, that you can&#x27;t divide by zero...
评论 #38504653 未加载
评论 #38505053 未加载
评论 #38504611 未加载
评论 #38504618 未加载
评论 #38505090 未加载
评论 #38504596 未加载
imetatrollover 1 year ago
. . . . . . . . . -------------------------------------------------------&gt;