While mathematicians publicly cringe at the idea of such divisions, we don't really worry too much about them in practice... they're easy enough to avoid and when the problem does arise, well -- we have our tricks!
So what happens when you divide by zero? Broadly speaking, a few things can happen. No, the universe won't explode or anything like that, although you can do fun tricks like "prove" that 1=2 (see below).
What really happens -- if you're just dividing a number by zero -- is the outcome is undefined. Not a number. No solution. It's nonsense. Nothing interesting happens. But suppose you divide by almost zero? Then what? Can we learn anything about these "almost zero" cases?
It turns out we can, and the mathematical tools used to do so turn out to be fundamental to our ability to use math to understand real-world processes. To understand all this, however, we need to begin by thinking about such divisions in the context of functions.
Suppose you have two functions f(x) and g(x) -- that is, two curves like the ones shown above -- and you make a new curve h(x) = g(x)/f(x) that is their ratio. If the denominator f(x) is somewhere equal to zero -- in our example, at x=0 and x=1 -- then what happens for nearby values of x?
At this point, we're doing homework straight out of a first course in Calculus. To do this properly, we'd draw on one of the most useful tools in mathematics -- the notion of limits -- which allow us to formalize some otherwise intuitive ideas and develop a ton of really useful tools for understanding more complicated looking functions (tools like, oh, say... all of calculus).
Without going into the mathematical details, these allow us to obtain precise (and often very general) statements similar to the following statements about our function h(x).
First, we know h(x) is undefined at x=0 and x=1. If we ask what happens to values of h(x) close to x=0, we begin to learn something more about h(x) which, in some applications might be the answer to an important question. Here, lets take a look at our toy example as define above.
Graphically, we can see that as x nears 0 from either direction, h(x) nears negative infinity. In this case, we'd say the limit as x goes to zero is negative infinity. On the other hand, as we consider x values near 1 we see that h(x) either runs off to negative infinity (x<1) or positive infinity (x>1). In this case, as the limit goes two different directions depending on whether you approach x=1 from above or below. In this case we say that at x=1, the limit does not exist. The usual pre-calculus questions about limits of (mostly) continuous functions.
So what does any of this have to do with dividing by zero? After all, graphically this all seems a bit pointless!
It turns out that the problem of dividing by zero is the comical counterpart to some of the most powerful and ubiquitous tools in mathematics. The same properties of limits used to derive results like those above (from equations, instead of graphs) are the same concepts that provide a foundation for scientific theories in engineering, statistics, biology, chemistry, physics, and medicine.
A great place to build a foundation for understanding and using those tools is with a little bit of calculus, probability and statistics - any one of which would require more than another post or two, but might be well worth doing.
Until then, if you'd like a little calculus refresher there are a handful of free resources online including those here, here and here (all three of which are reviewed here).
As always, suggestions and requests can be shared via email or in the comments below.
R code for the figures above:
f = function(x) x^2*(x-1)*exp(-x^2); g = function(x) 0.2*sin(10*x)+3; win.graph(); par(mfrow=c(1,3), cex=1.3); curve(f(x), from = -0.5, to=1.5, lwd=2); abline(h=0, lty=2); curve(g(x), from = -0.5, to=1.5, ylim=c(0,4), lwd=2); curve(g(x)/f(x), from=-0.5, to=1.5, lwd=2, ylim=c(-1000,200)); abline(h=0, lty=2); abline(v=1, lty=3, col="darkgray"); abline(v=0, lty=3, col="darkgray");