Why you can't divide by zero
I've always been wondering why dividing by zero is considered undefined. My intuitive answer would have always been "infinity" or "zero". I just had a discussion about this with a collegue who happens to have a degree in mathematics, and the way they explained it made it absolutely clear why it doesn't make sense to divide by zero.
Inverse Operations
Before understanding why dividing by zero is undefined, you first need to know about inverse operations. It's quite simple!
An example: 3 + 2 = 5
. The inverse of addition is subtraction, so the inverse of this equation is 5 - 2 = 3
or 5 - 3 = 2
.
The same applies to multiplication. The inverse of multiplation is division. So the inverse of 6 * 2 = 12
is 12 / 2 = 6
or 12 / 6 = 2
.
Dividing by zero
Let's try to apply the inverse rule to the number zero, starting with addition. If 2 + 0 = 2
, then 2 - 0 = 2
.
But if we have 2 * 0 = 0
, the inverse of that would be 0 / 0 = 2
, which is just not true.
Dividing by zero breaks some fundamental laws of mathematics, which is why there's a general consensus that any equasion dividing by zero has no valid answer.
This is post 090 of #100DaysToOffload.