Why Dividing by Zero Can Get You into Trouble?

Fasrin Aleem
Nerd For Tech
Published in
3 min readOct 9, 2021

Since childhood, we’ve all understood that dividing any number by zero is impossible. In mathematics, division by zero is considered as infinite (e.g. 10/0). But why won’t the computer accept it? After dividing by zero, the result is undefined. If you keep dividing any number by smaller numbers, the value of the result keeps increasing.

But why is it so? Why is it impossible to divide by a number as simple as zero? In this blog we are going to find the answer for “WHY ?” question.

Before that,
Let’s discuss the definition of the division as from the computer.

What is Division ?

If “a” divided by “b” = “c,” and “c” is unique, then “b” times “c” equals “a,” according to the concept of division.

Definition of the division

If computer wants to divide any number, it simply subtract the given number until it meets zero.

For example,

Example 1
Example 2

So, to get to zero the computer must 4 times subtract 5 from 20. Also, to get zero for value 15, the computer must 5 times subtract 3. This is how computer do the division. Same way, if computer go through the multiplication, it do the addition.

Multiplication

In this case, 20 divided by 5 is 4, and 4 multiplied by 5 equals 20. 15 divided by 3 equals 5, while 5 multiplied by 3 equals 15.

Let’s Divide by Zero

Math teachers will teach their students that dividing any number or integer by itself always equals one. Consider the following scenario:

Dividing number by itself

According to mathematical theory, 1 divided by 0 is infinite, and 2 divided by 0 is infinite as well. Using the same multiplication logic, infinite into 0 equals 1 and infinite into 0 equals 2. This means that 1 equals 2. This isn’t possible. As a result, any number divided by zero is not considered infinite by a computer.

Number divide by

Why?

One divide by positive decimal number

We can see, when we try to reach a zero, we go towards to the zero. The value is going upwards. The result will getting very large.

One divide by negative decimal number

If we go with the negative value, the result will getting very small.

Number divide by 0 graph

As shown in the diagram above, if we try to reach zero by x, the y value will rise, as will the negative value. As a result, we can’t even define infinite values, which is why they’re called undefined values. As a result, we consider divide by zero to be undefinable or undefined.

References

2020, Why division by zero is not infinity, [Video] — https://www.youtube.com/watch?v=sCW5dbk4C_o

--

--