Why you can't divide by zero
garrit.xyz
garrit.xyz
But how can it be "just not true"? The point of this exercise was to investigate whether we can find a definition for division by zero, and here we'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.
It's not obviously false that 0/0 = 2 (yet).
The problem comes in when you repeat the exercise on a different example and find that also 0/0 = 3, or whatever. And now you start to see something is really amiss.
Or in the blog terms, the inverse of multiplying by nothing is dividing by everything.
Yes, that's the obvious part.
If dividing by nothing is congruent with no operation, then the original set, unmodified should be returned.
Math has a long honorable tradition of things that did not make sense until somebody invented the math to describe them.
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.
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.
The square roots of negative numbers. What sort of black magic is this.
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. https://www.youtube.com/watch?v=7Kd3R_RlXgc (curiousmarc)
Any nonzero number divided by zero is infinity. Zero divided by zero is undefined. The operation of adding 1 has a parabolic fixed point at infinity.
The Riemann sphere is not a group, but it still has many very nice properties. For instance, the set of analytic maps from the Riemann sphere to itself is precisely the set of rational functions (together with the constant map infinity).
A much more profound statement is Thurston’s characterization of rational functions [1], which states that every orientation preserving branched covering map F from the sphere to itself is equivalent (topologically conjugate) to a rational map on the Riemann sphere, unless F satisfies a certain computable property.
In other words, maps on one of the most ubiquitous topological spaces, namely the sphere, are often best understood by introducing a structure where division by zero is allowed.
[0] https://en.m.wikipedia.org/wiki/Riemann_sphere
[1] https://pi.math.cornell.edu/~hubbard/ThurstonRatMaps.pdf
There was an interesting comment in the CouriusMarc video I linked. Quoted in full.
"Folks, no need to argue about colorful alternative mathematical theories - the thorny problem of division by zero was solved for good over 100 years ago by the rigorous development of infinitesimal calculus. Which says: division of a positive non-zero constant by something that tends to zero, tends to infinity [added note: dividing "zero by zero", or more exactly, two things that tend towards zero, is more complicated: it can give zero, infinity, or anything in-between, but that's for another time...]. So the calculator sort of gives the right answer, using almost the correct method: trying to fit an infinitesimally small number into a big one, and finding it fits so many times it goes to infinity. I would put it in the category of happy mechanical accidents."
Which fails to entirely satisfy, I suspect this is because it focuses on the mechanics of one view of the problem and leaves many other views still conflicting. The heart of the problem, that is, why the operation tends to be left as undefined, is that to be mathematically rigorous you have to satisfy all views as to what division actually means.
I have an anecdote here too. When I learned about automatic differentiation, I very excitedly told one of my formalist math professors about the quantity e, e^2=0, e!=0, and how it could be used to compute the derivative of a function. He couldn't understand and essentially asked me to motivate the number and sketch the proofs that it's a well-behaved extension, which I couldn't do at all at the time, and he dismissed the whole thing which is actually the basis for some pretty important machine learning these days, among other things. So sometimes you can do pretty weird operations to get an extension, but without an intuitive grasp of how it works - either with a proof it is a well -behaved extension or by analogy for example, it's really hard to tell how useful such a concept is to a mathematician, how well it plays by the rules.
Being mathematically rigorous, you will have to define what the views you are talking about. In the one input function limit case, you need to check the limit from both sides. In the 2 input case, you need to check all possible approach paths to prove the limit exists. It gets out of hand. However, these are different views within a formal mathematical system. We don't need to reach consensus among different formal systems which happen to use the same symbols. For instance, I can define the set {cow,0} and equip it with operator '/' such that cow/0= and 0/cow=0 etc. This might be isomorphic to Z mod 2. Then cow by zero is defined, yet we can still agree that division by 0 is undefined, because when we are in general talking about division by 0, we're talking about an operation in a relatively specific context - how numbers behave. So, there really can be a very wide set of perspectives, and being rigorous must also specify the perspectives that count. Also - the cow case is pretty trivial, though this point could also be made with more complex structures, like wheels, that may also have useful physical interpretations, and they still wouldn't affect the collective agreement here because it's a contextually isolated case.
Formally, it’s just e = dx, with implicit dx -> 0, semantically, but seems so much easier to think about as just e^2 = 0, in practice.
Never came across that.
Do you have a source for e = dx perspective? I haven't seen it explained this way before.
Which is to say:
1) create the function f(x + dx)
2) ignore (subtract away) the terms not proportional to dx
3) of the terms proportional, only care about terms minimally proportional (i.e. divide by dx, keep terms no longer proportional to dx, eliminate any still proportional to dx.)
The last step corresponds to eliminating terms proportional to dx^2 or higher
No, that's inaccurate.
Division by zero cannot be defined in a consistent way in the domain that most people talk about it, which is arithmetic.
In other domains, sure, there are useful other definitions of division by zero (as you alluded to in another comment, calculus is one such domain).
But none of those other domains will impact arithmetic, which cannot have a consistent concept of division by zero.
I am pointing out that calling something “arithmetic” in a narrow sense, then declaring that extended concepts can’t be handled within your previous narrow definition is just a tautology of terminology choice.
Yes, a change is a change. And an extension is an extension.
irb(main):004:0> 1/0
Traceback (most recent call last):
5: from .../bin/irb:23:in `<main>'
4: from .../bin/irb:23:in `load'
3: from .../gems/irb-1.2.6/exe/irb:11:in `<top (required)>'
2: from (irb):4
1: from (irb):4:in `/'
ZeroDivisionError (divided by 0)
unless your number system has infinities irb(main):005:0> 1.0/0.0
=> Infinity
irb(main):006:0> 1.0/-0.0
=> -Infinity
Bah, that's just computers, not proper maths ... https://en.wikipedia.org/wiki/Riemann_sphereThis is a really weird thing for someone to say. Everything a computer does is, by definition, proper math. Any system of rules of any kind is math; that's all math is.
Computers don’t do proper math, they use math. For example: We usually try to remove all tautologies from our programs.
A system of rules is not math. We can sometimes use math to analyze such a system though. For example: Law is a system of rules that’s definitely not math.
You forgot about axioms and definitions. If all you have is tautologies, you can never get to the point that 1+1 is 2, because 1 won't have a meaning.
But by the time you're defining objects and their behavior, you've already lost the hypothetical distinction between "proper math" and "using math". There is no such distinction.
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/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.
Changing the sign is harder, but let's say your group of jellybeans was actually a loan, and you borrowed from two people... beans / -2
So this misses it a bit. You can divide 0 by 0 for example and it's 1. In fact you've probably already done it without thinking about it because it's so intuitive.
f(x) = sum(x^n, n=0, 2)
= x^2 + x + 1
f(0) = 0^0 + 0^1 + 0^2 = 1
and 0^0 = 0/0. It's a definition that'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.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.
The floating point numbers adjoin infinity and make some definitions to make them work and it's good because again it's useful for the calculations people want to do.
I get that it's not satisfying but division by 0 is whatever we want it to be because the answer isn't prescribed by the ring axioms. But if you make it too weird it won't by good for anything and every theorem and formula will have to account for your special case.
This is complete non-sense. You defined a number (zero) and defined a relation (2 * 0 = 0). Then you concluded that 0 / 0 = 2 is not true? You could also equally say that 0 / 0 = 2 or any number or non-number really.
when you have "x * y = z" you can perform "x = z / y"
ie: "2 * 3 = 6" therefore "2 = 6 / 3"
But it breaks if you try to do division by zero
ie: "2 * 0 = 0" translates into "2 = 0 / 0", we could assume this is good, but if you use any different value for X, you get other nonsensical answers , say "x = 3" ... so "3 * 0 = 0" therefore "3 = 0 / 0"
So as long as you don't divide by zero, the conversion of "x * y = z" into "x = z / y" will work. If "y" is zero, then the conversion breaks down. Hence division by zero is undefined because there is no correct answer.
----
The other argument one could do, not mention in the article, is the "limit of division by zero", which is a fancy way, what is the result if we don't divide by zero but get close to it.
Say we have number 2, and we keep dividing it by a number that gets closer and closer to zero
2 / 1 = 2
2 / 0.5 = 4
2 / 0.25 = 8
2 / 0.125 = 16
2 / 0.0625 = 32
So as our divisor gets closer to zero, our result gets closer to infinity.
But the problem is, what happens if we approach the zero from the other side,
2 / -1 = -2
2 / -0.5 = -4
2 / -0.25 = -8
2 / -0.125 = -16
2 / -0.0625 = -32
So as the divisor gets closer from the 'left side', from the negative side, the result is going to negative infinity.
This means that there is no convergence because dividing left of zero, and right of zero, leads to different result.
This is same as studying limit of lim of x->0 for cot(x) where the result leads to undefined value because limit approaching from left side does not converge to the limit approaching from the right side.
Isn't this related to the reason why if a series can be proven to converge absolutely it's considered convergent? And the simpler tests like comparison, limit comparison, integral test for absolute value by just forcing the expression to be absolute notation?
I always just chalk this up to resolving an ambiguous meaning of "less than", in one sense referring to a relative X position from another spot A on the number line, and another sense referring to a relative X position from zero in either direction.
If we take the equation `x = a/0` and solve for a we get:
``` x = a/0 |*0 a = 0x a = 0 ```
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.
In this case though, even if `a = 0`, we can't really determine `x` because `0/0` is not something commonly defined in mathematics.
I don't know what the point is of having no apples and no baskets to divide them in to.
https://en.wikipedia.org/wiki/Nonstandard_analysis
and
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.
Clearly the simple little word 'divide' is carrying too much weight here. Mathers, feh.
By the article's own definition, there are two inversions for each operation so why is only one of them given as "proof"? Taking the other inversion, we have 0 / 2 = 0 which is perfectly correct, and contradicts the claim that inversions "prove" why we can't divide by zero.
Why can't 0 / 0 be defined to be any number you wish? The inversions would work fine.
_________________
People have a very funny view of education sometimes. Like, this thing exists, so we should’ve been told about it in school. Like, imagine the consequences of that kind of pedagogy. In order to know something about the subject and be able to learn more about it, you must know everything there is to know about it. Learning is a good example of the hermeneutic circle at work. On first entry into a topic, you don’t know anything and are bewildered by everything. Slowly, you begin to get a foothold where you recognize things vaguely. Then, as you go deeper, your understanding of what you learned at the beginning, also becomes deeper and richer. The simplifications begin to fall away. Complexity emerges, complexity that you are now in a position to handle because you are not completely lost anymore.
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.
And it's associated with lines.
If you have gradient=2, you'll have a line that goes through origin and (1,2).
If you increase the gradient, it'll decrease the apparent 'dy'. You do it until the line becomes vertical, equivalent of dy=0. A vertical line is a valid object, but mathematically, it's no longer a function. You might say your math breaks describing the thing so you'll need a different math.
What the vertical line tells us is that division by zero can’t map to a unique value — it has to give us back the whole set. So we can discuss division by zero in the contexts of inverse maps, but there’s no way to have a function that inverts multiplication by zero.
Small technical note: I think you mean ‘dx=0’.
"Stand Back, I'm Gonna Divide By Zero" https://youtu.be/6BIfqfC1i7U?t=1233
I wasn't aware of this unique property of / in arithmetic.
Like "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 'a' above, c) infinity, for use in science fiction, or d) undefined."
https://www.math.toronto.edu/mathnet/falseProofs/first1eq2.h...
In calculus you want continuity. You don't want your curve to suddenly jump to some inane location - like zero - as some have suggested for the solution to 2/0.
Tragically this is a blog post where the author clearly doesn't have any math background at all.
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.
Parents, teach your kids that even teachers make mistake and can be petty :) and also, that you can't divide by zero...
There are practical reasons why we leave division by 0 undefined in "normal" arithmetic but we could, just as easily, operate in a world where 1/0 is defined. In some contexts, 1/0 = 0 is a totally sensible convention! In others, we can define it to be ∞ or, hell, something else entirely.
This approach of teaching math as a bunch of universal facts that are either true or false is actively harmful—but super convenient for top-down education and assessment!—because it teaches people the wrong way to think about math or even about conceptual models in general.
Except that for all other numbers we have 1/x * x = 1, while 0*0 = 0. Defining division by zero this way breaks existing rules.
Calling the color of the sky blue is just a matter of convention as well, but if one random teacher starts calling it green, she’s doing a terrible disservice to her students. It doesn’t matter that there exists some languages without a difference between blue and green.
Right — because it’s impossible to have an inverse of zero multiplication.
Eg, 0 = 0 + 0 -> 1 = 1 + 1 -> 0 = 1 if you have a multiplicative inverse to 0, and hence you have collapsed your entire system to a single value.
These are students we’re still teaching that basic algebraic structure to — that it’s not possible to have a multiplicative inverse to zero.
Calling that a “convention” is wrong.
1/1000000 = 0.000001
...
1/10 = 0.1
1/1 = 1
1/0.1 = 10
1/0.0001 = 1000
1/0.0000001 = 1000000
...
1/0 = ... 0? WTF
What is the application for 1/0 = 0? Where is this used? Does it actually make a meaningful appearance outside of drunken barroom conversations, and classrooms staffed by clowns? ceil(0.000001) = 1
ceil(0) =... 0? Wtf?
But that's a perfectly well defined function. Not every function has to be continuous.If you know more than others, that's great, but in that case the thing to do is to share some of what you know, so others can learn. If you don't want to do that, that's fine, but in that case please don't post. Putdowns and swipes only degrade the discussion.
https://hn.algolia.com/?dateRange=all&page=0&prefix=true&sor...
I thought the worst part is that in context of "normal" mathematics taught in schools one is obviously wrong, and also unable to do research and admit own mistakes, and that one is actually teaching children.
> This approach of teaching math as a bunch of universal facts that are either true or false is actively harmful
Kids are taught not philosophy or logic but certain mathematical paradigm (that you call "normal") in which division by zero is an error. If you have a formula you decompose it to smaller formulas, if in a smaller formula you have a division by zero you simplify it to zero then you screwed up the entire thing. There's no true or false value for 1/0, the right move is not to play and not solve any equation in which division by zero appears.
Actually, let me rephrase. It's a bad situation all-round. I assume you didn't tell your friend's kid to go in and argue with her teacher. (If you did, then you are a prick. Otherwise, I rescind the above.) At that age, kids want to tell people when they learn fun or exciting things (well, that's not really restricted to that age), but they don't always think through the effects of saying them. Now, I definitely do know a number of elementary teachers who aren't great at math, but even if the teacher is good at math, imagine their perspective. Off the top of my head, I can only think of a small number of options: 1. agree, move on, and have a bunch of kids who are either confused or are going around telling everyone they know "1 + 1 = 10" without understanding why; 2. scrap whatever lesson they were supposed to do and go into a long, unplanned explanation of how different number bases work and interact with place value; 3. tell the girl she's wrong. Quite frankly, none of these are good options.
I can't really fault you for teaching her fun math, but for an elementary teacher that's a really rough spot to be put in.
And yes, letting everyone be argumentative all the time is how classroom management goes out the window.
it's people like you that are pricks for thinking that anyone with extra learning are punishing everyone else in class. it's never a problem for keeping students ready to advance faster than the rest of class keeping them all held back at the slower pace.
you're also a prick for assuming the way the conversation came about. you're a prick for not thinking that the conversation was about how math can be fun where things that are simple and considered basic can be different and more advanced where 1+1=2 can also be 1+1=10. but now, you just go off and assume i'm a dick saying 1+1=2 is wrong and the correct answer is 1+1=10 or whatever nonsense led you to thinking i'm a prick.
I never said this and do not think this.
I was attempting to provide more nuance to the situation and evidently failed.
how about teachers should be much less aggrieved that an elementary student is probably smarter than they are. when a student shows initiative to learn something on their own, rather than being an ignorant person and send the kid to the principal's office because they think the kid made a bomb or is learning maths at a pace faster than the hayseed teacher is.
see, that whole paragraph has a point that would probably be made much more acceptable if I didn't phrase it in an insulting manner
You're referring to this reddit post.
#eval (1/0 : Nat) -- 0
#eval (1/0 : Int) -- 0
There are good reasons for this convention in the context of Lean, although I doubt that teacher had formal verification in mind :DIt's one of the best places! You know how in programming, your code looks like this?
func my_function(inputs) -> output { do something }
In theorem proving, it's almost the same: theorem my_theorem(assumptions) -> conclusion { prove something }
But there's a single crucial difference: in programming, the "do something" is really important, whereas in Lean, the "prove something" isn't important at all: as long as the typechecker is happy with it, everyone can forget about it once it's written.So as long as your assumptions and conclusion don't involve any division by zero, it doesn't matter what goes on inside the proof.
Regarding division by zero, you sort of have three options:
* Output an error / checked null when there's division by zero.
* Require a proof that the denominator is nonzero before you're even allowed to use division.
* Allow division by zero, making it return some nonsense. Then, add an assumption that the denominator is nonzero to all your theorems about division.
The first two options (especially the second one) make the definition of functions that involve division horrifically messy. (Idk, it might be easier if Lean had exceptions, but that also sounds messy.) I think that's why Lean goes with the third option.
https://xenaproject.wordpress.com/2020/07/05/division-by-zer...
Trying to solve the problem with e.g. dependent typechecking quickly gets complicated (both implementation and theory). And adding a concept such as infinity may complicate proofs which now need to deal with infinity being a "number" but which behaves differently from other numbers.
Thankfully mathematics has the nice property that you can define concepts any way you want so long as they're self-consistent and match one's expectations. So rather than treating division by zero as an exceptional case -- either by disallowing it in the typesystem, "raising an error", or by introducing a "special" value -- some (most?) verification languages simply define division by zero to have a numeric value, and make it known that this is the case. Users know that they must then write expressions to be explicit about division by zero if they care about that case. (This turns out to be not much different than having to write expressions to satisfy a dependent type system.)
More generally, in normal math, every theorem that involves division by some value Y which could be zero must have as hypothesis that Y is not equal to zero. All these theorems still work in systems like Lean where division by zero is defined to be zero, so nothing is lost.
You could write all your formulas in the Maybe / Option monad (which I guess is the same as 'introducing a "special" value') but that sounds painful...
There are good reasons for the convention of assigning nonsense values to computations that are formally invalid. The convention is so important that it is introduced in the Natural Number Game, where the remarks include a brief discussion of why the predecessor of 0 is defined to be 37.
I don't think there's any particular reason why you'd assign 0 as the nonsense value?