The other comments are correct: is undefined. Similarly, the limit of
as
approaches
is also undefined. However, if you take the limit of
as
approaches zero from the left or from the right, you get negative and positive infinity respectively.
Like 10/2- imagine a 10 square foot box, saying 10 divided by 2 is like saying “how many 2 square foot boxes fit in this 10 square foot box?” So the answer is 5.
But if you take the same box and ask “how many boxes that are infinitely small, or zero feet squared, can fit in the same box the answer would be infinity not “undefined”. So 10/0=infinity.
I understand why 2/0 can’t be 0 not only because that doesn’t make and since but also because it could cause terrible contradictions like 1=2 and such.
Ah math is so cool. I love infinity so if anyone wants to talk about it drop a comment.
Edit: thanks everyone so much for the answers. Keep leaving comments though because I’m really enjoying seeing it explained in different ways. Also it doesn’t seem like anyone else has ever been confused by this judging by the comment but if anyone is I really liked this video https://www.khanacademy.org/math/algebra/x2f8bb11595b61c86:foundation-algebra/x2f8bb11595b61c86:division-zero/v/why-dividing-by-zero-is-undefined
The other comments are correct: is undefined. Similarly, the limit of
as
approaches
is also undefined. However, if you take the limit of
as
approaches zero from the left or from the right, you get negative and positive infinity respectively.
does tend to
as you approach zero from the left, and
as you approach from the right:

That these limits are not equal is why is undefined.
Videos
If I lower down from positive numbers it can be positive infinite, if I lower down from negative ones, it can be negative infinite so one of the proves of it being undefined, why not both, why not simply infinite
So I have this f : R -> [0, "infinity sign") with f(x) = x^2
Is it R numbers from zero to infinity? Could someone please explain the meaning of square and normal brackets?
It's a nonsense from the mathematical perspective.
Yes. No. Sort of.
The thing is: Floating-point numbers are approximations. You want to use a wide range of exponents and a limited number of digits and get results which are not completely wrong. :)
The idea behind IEEE-754 is that every operation could trigger "traps" which indicate possible problems. They are
- Illegal (senseless operation like sqrt of negative number)
- Overflow (too big)
- Underflow (too small)
- Division by zero (The thing you do not like)
- Inexact (This operation may give you wrong results because you are losing precision)
Now many people like scientists and engineers do not want to be bothered with writing trap routines. So Kahan, the inventor of IEEE-754, decided that every operation should also return a sensible default value if no trap routines exist.
They are
- NaN for illegal values
- signed infinities for Overflow
- signed zeroes for Underflow
- NaN for indeterminate results (0/0) and infinities for (x/0 x != 0)
- normal operation result for Inexact
The thing is that in 99% of all cases zeroes are caused by underflow and therefore in 99% of all times Infinity is "correct" even if wrong from a mathematical perspective.
In mathematics, division by zero is undefined because zero has no sign, therefore two results are equally possible, and exclusive: negative infinity or positive infinity (but not both).
In (most) computing, 0.0 has a sign. Therefore we know what direction we are approaching from, and what sign infinity would have. This is especially true when 0.0 represents a non-zero value too small to be expressed by the system, as it frequently the case.
The only time NaN would be appropriate is if the system knows with certainty that the denominator is truly, exactly zero. And it can't unless there is a special way to designate that, which would add overhead.