Useful Math Fun

A little fun with math (don’t be afraid), and it might even be useful.

Have you ever tried to find a simple error when you have two numbers that are supposed to be same, but they aren’t?  Maybe you have a bunch of numbers entered in an Excel spreadsheet; maybe you are even trying to balance your checkbook.

One of the most common data entry errors that can be hidden is the transpose: you’ve swapped a digit.  Maybe a number like 19,243 was incorrectly entered as 13, 249 [see how the 3 and the 9 were swapped?]  Your eyes are glazed over and you can’t find the error, looking over long columns of  numbers.

When this happens the error will always be divisible by 9.  For our example the error is 5,994 (19,243 – 13,240).  But   how do you quickly tell if that number is divisible by 9?  Simply add the digits.  For our example with 5994, compute 5+9+9+4 = 27.  If the sum of the digits is divisible by 9, then the original number was divisible by 9.  If you still can’t tell if the number is divisible by 9), then add the digits again.  For 27, use 2+7=9.  In fact you can just keep adding the digits of the resulting sum until you get to a single digit number; if it is 9, then the original was divisible by 9.

On occasion, I’ve found these tricks very handy over the decades.

A couple of caveats.  If the error is divisible by 9, you could actually have several transpose errors, since each error contributes a sum error divisible by 9, and any time we’re adding multiple numbers, each of them divisible by 9, the sum is of course divisible by 9.  I’ve had to fix several transpose errors in a row.  Sigh.

Another caveat is that you could have a transpose error and another error (like reading or writing a 4 instead of a 9), which would mask the transpose error.


Next we’ll wander over to logarithms.  Don’t worry, I promise there is something useful here too.  [Skip to the last paragraph in this section to get the useful part and avoid the math].

First, a quick story.   A few years ago someone asked me the logarithm of “i” (i.e. i = the square root of -1).  My first inclination was to respond “That’s illogical; there cannot be any such thing.”  But I paused and thought a moment, recalling Euler’s relationship: e = cos Θ + i sin Θ.

Since ex, the exponential (exp) function is the inverse of the logarithm function (just like squaring is the inverse function of taking a square root), I deduced that there was a whole universe of logarithms that I had never thought of.  For example the logarithm of e = iΘ

So I typed “ln(i)” into my Google search bar (“ln” is the usual notation for the natural logarithm function) and up popped “1.570796 i” — a number.  An imaginary number, but a number.  In fact it appeared to be, π/2 times “i”.

Then every number — real, positive, negative, imaginary, even complex numbers — must have a logarithm. They don’t teach that in college calculus.

After a chat with my math genius coworker down the hall (Nicholas is wicked smart) and my son (the math and physics whiz)  via email I was educated, and then produced my own non-rigorous proof [logarithms-derivation] that shows not only that every number  — even negative numbers and imaginary numbers — has logarithms … each has infinitely many logarithms.  And each follows the rules we expect them to follow, namely: that multiplication can be achieved by adding logarithms, and then taking the inverse log (or the exp function).

Besides “Joe is weird!”, what useful thing did you learn in this section?  Yes!  Good for you.  The Google search bar has a calculator built in.  Open a search bar and type “1+1”, or “sin(30 deg)” or “sin(pi/6)” if you prefer radians; try “5!” … it’s all there.  [Some tips: use “^” for exponents, “sqrt(x)” for square roots.  And a calculator pops up on your screen whenever you “search” for something that looks like a calculation.]


One more.  How to compute square roots, cube roots, fourth roots, fifth roots, etc.  Here is a derivation[NRoots-derivation], again based on Euler’s relationship, that shows each number has two square roots, three cube roots, four fourth roots, etc … And how to find all of them.  “All of them”? Well yes, every number has 3 cube roots, 4 fourth roots, etc. What are the three cube roots of -1?  No problem.

If you can recall some of your trig function values, you can even compute quite a few of these multiple roots in your head.  How is that useful?  Well, probably it’s not.  But perhaps these little factoids can help you win a bar bet some day, and when you do, maybe you’ll think of this little math essay.

Cheers!  From the wonderful world of math

Joe Girard (c) 2013

Note: the rules don’t apply to zero, which has no logarithm and a single Nth root.