Become a Mathematical Ninja!

Published on Sunday, July 20, 2014 in , , , ,

Waifer X's logarithm key photoWith bizarre interests such as memory techniques and mental math feats, it's not often I run across a kindred soul, even on the internet!

That's why I was thrilled to recently discover Colin Beveridge's Flying Colours Maths site! He started it in 2008, and regular Grey Matters readers will find plenty of interesting items in his blog.

Most of the mathematical feats on this site are told via the stories of the Mathematical Ninja. Looking through these stories, I realize that not only does Colin just tell the stories differently, but he also has a different enough take on mental math that there are feats and principles I've never covered on Grey Matters.

One of the simpler examples of this is Converting Awkward Fractions to Decimals. The principle is simple enough, in that you can scale any fractions up to 17ths (and many beyond that) to get denominator within 5% of 100. From here, scaling the numerator up and making a small adjustment can give you a startlingly accurate decimal.

My favorite Flying Colours feat, however, has to be the Nth Root Feat, best described by Colin himself:

“Pick a number* between 1 and 10 – don’t tell me what it is. Pick another number between 1 and 100 – you can tell me that one. Now work out the first number to the power of the second for me on this handy calculator, and I’ll tell you the first number.”
Even if you've practiced the cube, fifth, and square root feats, you'll realize this is on another level. You'll definitely want to be familiar with logarithms and the previously-mentioned fraction feat before trying this.

The detail and varied approaches in his multi-part series on squaring 3-digit numbers (Part I, Part II, Part III) are wonderful examples of his approach to mental math.

Don't pay attention to only the Mathematical Ninja to the exclusion of all else on the site; there's plenty more to discover! If you've ever been astounded by James Martin's amazing appearance on Countdown, you'll appreciate Colin's down-to-earth analysis of how James made those calculations.

The puzzle about the absent-minded professor and his umbrella is one of the best ways to introduce people to Bayes' theorem, as well. It's easily understandable for most people, and even clarifies some of the trickier aspects.

I don't want to ruin too much, however, so I suggest exploring Flying Colours Maths for yourself! If you find something you find especially interesting, let me know about it down in the comments!


Multiplying with a Parabola!

Published on Sunday, July 13, 2014 in , ,

Marcelo Reis' y=x*x parabola imageEven when you think you understand a concept, even one as simple as basic multiplication, you can come across a different perspective that makes you take a closer look.

In this post, we'll look at an almost magical way to multiply in a very visual manner!

Tipping Point Math recently posted this unusual multiplication technique in their Multiplying with a Parabola! video:

I had to try this technique out for myself, so I headed over to Desmos.com and created this interactive version (The image below also links to the interactive version).

The Desmos.com version lets you multiply any 2 whole numbers ranging from -15 to 15, using the sliders in boxes 2 and 3 on the right. Clicking on the dot where the line crosses the vertical (y) axis will display the coordinates, and the y-coordinate will be the answer to the multiplication problem. You can also click the arrows just to the left of boxes 2 and 3 to start and stop animation of the points.

Play around with it for a while, and discover the possibilities. By clicking on the wrench image on the upper right side of the screen, you can adjust the settings, including “Projector Mode”, which can make the graph less cluttered.

Working with this interactive version, you'll quickly find the answer to the challenge of multiplying 7 by -4 given in the video above. You may also find new questions, however!

For example, setting the sliders to multiply 5 by -5 puts the 2 lines in the same place, and gives the same point! With only 1 point, how does the computer know at what slope to draw the line? The short answer is that there's a bit of a cheat here. The computer will always draw a line through the coordinates (a, a2) through (0, ab), so the line is forced to give the right answer. More generally, though, there is a surprising way to mathematically define a line with a single point, as explained in this half-hour video about Galileo's laws of falling bodies.

Surprisingly, this basic idea can be expanded to handle a wide variety of calculations. For example, James Grime uses the graph of y = x3 - 3x to create his cubic curve calculator:

Graphical calculators such as this are known of nomograms, and are often both an art and a science. Ronald Doerfler's My Reckonings blog has some amazing examples of nomograms that are likely to boggle your mind. Even some of the simpler nomograms, such as this Educated Monkey tin toy, or this nomogram from Popular Mechanics for calculating the day of the week for any date, are still astounding to use and explore.

If you've run across any interesting nomograms yourself, feel free to share them in the comments below!


How to Be a Mental Financial Wizard!

Published on Sunday, July 06, 2014 in , , ,

freephotoshop.org's Money stack imageMoney is a tough enough subject on its own. Compound interest seems difficult to wrap your head around, and nearly impossible to calculate without specialized tools.

In this post, however, you'll not only wrap your head around compound interest, but learn some amazing ways to estimate answers quickly in your head!

Compound interest is really all about the time value of money. OK, granted, that sounds like I just switched one buzzword for another. Perhaps having German Nande explain the time value of money in his TED-Ed video will help:

Perhaps figuring out that 10% added to $10,000 is $11,000, but wouldn't it be difficult to work out how long it would take $10,000 to turn into $110,000? Our first tool will begin to make calculations like this easy.

• The Rule of 72: This is one of the most well-known rules in finance. BetterExplained.com has an excellent article on the Rule of 72. In short, if you divide 72 by the interest rate in question, you'll get the number of years it will take your money to double at that interest rate.

For example, for the 10% example in the video, you'd work out 72 ÷ 10 = 7.2, which means it would take about 7.2 years to double your money at 10%. How long would it take at 6%? You work out 72 ÷ 6 = 12, so it would take 12 years to double your money at 6% interest.

To figure out the amount of time it would take to accumulate $110,000 at 10% compound interest, we could think about it in the following manner. In 7.2 years, the $10,000 would double to $20,000. In another 7.2 years (14.4 years total), the $20,000 would become $40,000. Another 7.2 years (21.6 years) would bring $80,000, and a final 7.2 years would take it to $160,000, so we can say that getting to $110,000 would take somewhere between 22 and 29 years.

That's accurate as far as it goes, but can we do better?

• The Rule of 114 and 144: As pointed out over in allfinancialmatters.com, there are similar rules for finding out how long it takes your money to triple and quadruple. For tripling, divide 114 by the interest rate, and for quadrupling, you divide 144 by the interest rate.

Let's see if we can't work out the $110,000 with these new tools. If we could have the original $10,000 triple, then quadruple (or vice-versa) at 10% interest, that would be 12 times our original amount. So, to determine the tripling time, we work out 114 ÷ 10 = 11.4 years. From there, the quadrupling time would be 144 ÷ 10 = 14.4 years. 11.4 + 14.4 = 25.8, or about 26 years. That's the same amount of time in the video!

That's not bad for a mental estimate. There's plenty that can and can't be done with these rules. For example, investopedia points out that using the long term inflation rate of 3%, you can compare prices from years ago to today's prices. At 3%, inflation should double prices every 24 years (72 ÷ 3 = 24), so prices should quadruple every 48 years, and so on.

The caveats explained in MindYourDecisions.com's post on the Rule of 72 should be understood. The rule of 72 doesn't apply when you're getting a variable return (such as stocks and bonds), the interest rate in question is too extreme, or when additional money is regularly added.

That last point is especially interesting. Just how do you calculate interest when regular amounts are included as you go?

• The Rule of 6: Fortunately, MindYourDecisions.com has an answer for that, as well. In that posts example, the author supposed that you add $100/month to an account at 5% interest for 1 year. The calculation shortcut simply involves multiplying the regular deposit amount by the interest rate and the number 6.

The answer given by this estimate is 6 × $100 × 0.05 = 600 × 0.05 = 30. $30 then is the estimate, which is pretty good compared to the actual calculated total of $32.26. If you want to see the accuracy of this formula for yourself, you can play with the numbers involved at this Wolfram|Alpha link. Simply set d to the regular deposit amount (d=100 in this example), and p to the percentage rate (5% is given by p=0.05); Wolfram|Alpha will then return two variables, u, which is the exact amount of dollars in interest you can expect, and v, which is the mental estimate.

Perhaps this rule should be called the rule of half, since you can apply this to any amount of months simply by halving the total number of months involved. How much, for example, could you expect in interest by putting in $150 per month at 4% interest per year, for 5 years (60 months)? We multiply 30 months (half of 60) × $150 per months × 0.04 = $4,500 * 0.04 = $180 in interest. The actual amount, as calculated here, is $181.82, using an additional variable, m, to represent the number of months in question (m=60 for 60 months).

Practice these financial tips, and be ready to astound your friends and family with your financial wizardry!


Pi VERSUS Tau?!?

Published on Saturday, June 28, 2014 in , , ,

Bruce Torrence's Pi vs. Tau photographThis week's post is a day early because today is Tau Day!

Tau, for those not familiar with it, is the mathematical constant equal to 2 × π (Pi), or roughly 6.28, and is represent by the greek letter Tau: τ. Today (6/28), we're going to look at the internet battle that's erupted over π versus τ since 2010.

The opening salvos in this year's battle were already launched back on Pi Day by DNews, with their Is Tau Better Than Pi? video:

3 days ago, Scientific American continued with their post, “Why Tau Trumps Pi”. Just 1 day later, prooffreader.com jumped in with Pi vs. tau: Ultimate Smackdown.

Starting at about 2:40 into the DNews video above, they come very close to a good answer. Yes, geometry and trigonometry rely heavily on 2π, and in those cases τ makes more sense, especially when it comes to concepts like τ radians in a circle. However, π has plenty of uses beyond those subjects on its own.

I'm in favor of adopting τ as a commonly-used constant, but not as a replacement for π. Talking about τ versus π to me is like getting in a heated argument over degrees versus radians. Which one is better? The answer can be degrees OR radians, depending on the context of the problem at hand. Should we use base 10, base 2, or base e in logarithms and exponents? Again, the answer depends on the context.

Kalid Azad of BetterExplained.com has 3 questions that can make even the toughest math concepts understandable: What relationship does this model represent? What real-world items share this relationship? Does that relationship make sense to me? In fact, as James Sedgwick points out in his essay, “The Meaning of Life”, you only have meaning if you have a relationship set in a context.

Yes, the endless internet battles over Pi versus Tau can be fun, but when it comes down to the important aspects, I believe we should focus on solving the problem at hand, and using the most effective tools. Besides, if we only keep one or the other, that's one less geeky holiday to celebrate in the year.

Happy Tau Day!


Math Shortcuts From Popular Science

Published on Sunday, June 22, 2014 in , , ,

Signe Karin's newsstand photoBack in the 1960s, Popular Science frequently included inserts focusing on topics of interest to their readers.

Since this was a science magazine in the days before pocket calculators were common, there were many times that the inserts focused on making mental calculations easier. Thanks to Google books, these are available once again!

Our first jump takes us all the way back to the January 1961 issue, which features excerpts from Lester Meyer's book, High Speed Math. The great body of the 14-page book digest focuses on shortcuts for multiplication, but towards the end, there are tips about addition, subtraction, division, and knowing when to use given shortcuts:

Later that same year, in November, they returned to this idea with an insert called “Math and Memory Short Cuts”. This particular book, for some unknown reason, was scanned in reverse page order. Despite that minor flaw, the insert is still readable. Instead of straight math shortcuts, this insert focused on math and memory techniques that were handy in the home workshop.

Popular Science returned to pure math shortcuts in December 1964, with their book digest of Isaac Asimov's Quick and Easy Math. This 7-page feature was arranged in the more traditional order of tips for addition, subtraction, multiplication, and division. If you're only familiar with Asimov's fiction writing, you might be surprised at the clarity he can bring to instructional writing:

Our final insert comes from the March 1967 issue, in an insert titled “High-Speed Math Short Cuts” This one is dedicated almost entirely to quick multiplication and division techniques, including a handy reference table giving the results of 1000 ÷ n for every integer n from 1 to 999, plus tips on using the table to handle larger numbers!

Obviously, these techniques were far more essential in the days before pocket calculators were common. However, the techniques are still useful, so they're fun to explore. You never know when and where you'll find that perfect shortcut for frequently-encountered problems!


Quick Snippets

Published on Sunday, June 15, 2014 in , , , , , , , , , , ,

Luc Viatour's plasma lamp pictureJune's snippets are ready!

This month, we're going back to some favorite topics, and provide some updates and new approaches.

• Let's start the snippets with our old friend Nim. The Puzzles.com site features a few Nim-based challenges. The Classic Nim challenge shouldn't pose any difficulty for regular Grey Matters readers.

Square Nim is a bit different. At first glance, it might seem to be identical to Chocolate Nim, but there are important differences to which you need to pay attention.

Circle Nim is a bit of a double challenge. First, you may need to try and figure it out. Second, the solution is images-only. Once you realize that different pairs of images are referring to games involving odd or even number starting points, it shouldn't be too hard to understand.

• Check out the Vanishing Leprechaun trick in the following video:

These are what are known as geometric vanishes, and can be explored further in places such as Archimedes' Laboratory and the Games column in the June 1989 issue of OMNI Magazine.

Mathematician Donald Knuth put his own spin on these by using the format to compose a poem called Disappearances. If you'd like to see just how challenging it is to compose a poem in geometric vanish form, you can try making your own in Mariano Tomatis' Magic Poems Editor.

• Back in July 2011, I wrote a post about hyperthymesia, a condition in which details about every day of one's life are remembered vividly. That post included a 60 Minutes report about several people with hyperthymesia, including Taxi star Marilu Henner. Earlier this year, 60 Minutes returned to the topic with a new story dubbed Memory Wizards. This updated report is definitely worth a look!

• If you're comfortable squaring 2-digit numbers, as taught in the Mental Gym, and you think you're ready to move on to squaring 3-digit numbers, try this startlingly simple technique from Mind Math:

That's all for June's snippets. I hope you have fun exploring them!


Imaginary Exploration

Published on Sunday, June 08, 2014 in , , , ,

SkyBon's Euler's identity imageToday, I'm going to take you on a journey. It's a sort of imaginary journey, but not in the way that you may think.

This is a mathematical journey, and if you can grasp where we start, I think you'll enjoy where we wind up.

There are two important concepts with which you'll need to be familiar before we begin. The first is the idea of imaginary and complex numbers, which are explained intuitively in A Visual, Intuitive Guide to Imaginary Numbers. The other concept is the number e, as explained in An Intuitive Guide To Exponential Functions & e. Take your time, if needed, to understand these concepts, and the rest of this post will be well worth the time spent.

We'll start simply, with a right triangle that's half as high as it is long (via Desmos.com). The coordinates of the vertices in Cartesian coordinates are (0,0), (1,0), and (1, 0.5). Converting these to complex numbers, they respectively become as 0 (0 + 0i), 1 (1 + 0i), and 1 + 0.5i. As you can see, converting between complex numbers and Cartesian coordinates requires little effort.

Just for fun, let's see what happens if we take this 1 + 0.5i right triangle, and take it the integer powers from 1 to 10. Wolfram|Alpha calculates the answers to (1 + 0.5i)n quickly, for values of n from 1 to 10, but the answers are just complex numbers, with no real apparent meaning.

Desmos.com can't handle complex numbers, but can handle tables of Cartesian coordinates, so if we use those answers, and draw the corresponding triangles, we get a very visual interpretation of these complex numbers!

What we get is a series of larger and larger right triangles! Think about why this is, using our old friend, the Pythagorean theorem. The horizontal leg is 1 unit, the vertical leg is 0.5 units, so the Pythagorean theorem tells us that the hypotenuse of that first triangle is about 1.11803 units long. That's also the base of the next right triangle.

The distance formula can be used to work out the height of the new triangle. It starts at (1, 0.5) and ends at (0.75, 1), so we plug the numbers in to get d = √(0.75 - 1)2 + (1 - 0.5)2 = √(-0.25)2 + (0.5)2 = √0.0625 + 0.25 = √0.3125 ≈ 0.559017.

Notice that, if you double 0.559017, you get 1.11803. That's not a coincidence. What you're getting is a series of triangles with progressively longer legs, and whose heights will always be half of that length. In short, (1 + 0.5i)n builds n right triangles with a 1:0.5 (or 2:1) ratio for the legs, and hypotenuses who lengths grow in accordance with the Pythagorean theorem!

Now, the formula (1 + 0.5i)n looks a little like the part of the formula for e. What would happen if we changed it to (1 + 0.5in)n? Let's look at this step by step.

With just 1 power, and therefore just 1 triangle, the formula gives us 1 + 0.5i, not surprisingly. This gives us our original right triangle.

Next, let's change the power to 2, and step through the formula twice to get 2 triangles. Wolfram|Alpha returns 1+0.25i and 0.9375+0.5i. We still get 2 triangles, but now they occupy about the same height as the previous single triangle!

Sure enough, if we take 3 steps through the 3rd power, we get 3 right triangles with about the same total height as the others.

This should make sense, especially as this approach was inspired by e. Remember how the change in e gets smaller and smaller as bigger numbers are used for n? Just like e packs smaller and smaller numbers in the same numeric space, our right triangles are packing more and more triangles in the same space on the graph!

Yes, if we take this approach to the 10th power and take 10 steps through it, we get 10 right triangles packed into the same space.

Let's take a closer comparison of this formula to e. First, the actual definition of e is:

We didn't take that limit into consideration in our triangle demonstration. What happens as our number of triangles get closer and closer to infinity? There will be more and more, so the height will get closer and closer to 0 units. If the height gets closer to 0, the Pythagorean theorem tells use that the hypotenuse will get closer and closer to the length of the original leg, which is 1 unit.

If you can picture infinitely many triangles packed into that same space, you can see that it would almost be like the lengths of the long legs would all be 1 unit, so it would effectively be a perfect arc!

The more general definition of e defines what happens when e is taken to a power:

So, if we apply that limit to our original complex equation, (1 + 0.5in)n, that means the infinitely many right triangles yields the same result as e0.5i! Remember that taking our formula to the 10th power ended in 0.888809+0.485079i, so you shouldn't be surprised to see that e0.5i roughly equals 0.877583 + 0.479426i.

Wolfram|Alpha's Arg[] command takes a complex number and returns the equivalent in radians. Entering Arg[0.877583 + 0.479426i] gives us the rather interesting result of 0.5 radians!

Let's think about this. Plotting out an infinite number of triangles of the form (1 + 0.5in)n, the equivalent of e0.5i, results in an arc that's 0.5 radians long.

Yep, we're actually getting visual and mathematical proof that eix will result in an arc that's x radians long! If you understand trigonometry, this means you can use sine and cosine to work out the same point calculated by eix, which is exactly what Euler's formula says!

Yep, since Pi radians is half a circle, then our formula becomes eiπ, which is Euler's famous identity! Since the cosine of π = -1 and the sine of π = 0, it works out -1 + 0i, or simply -1.

Did you ever think that playing around with a few triangles would ever lead you to an understanding of eiπ = -1?


New Mental Gym Tutorial!

Published on Sunday, May 25, 2014 in , , , , , , ,

DafneCholet's Calendar* photoIt's been over a year since I posted a tutorial over at the Mental Gym, so I figured it was about time for a new one!

This one is a new spin on working out the calendar for a given month and year. Yes, I have an existing Day of the Week For Any Date tutorial, and even a commercially-available version, but this new one is remarkably simple!

The new tutorial is dubbed the Quick Calendar Month Creation. It's a combination of a little-known, yet surprisingly simple calendar calculation method published by W. W. Durbin and E. Rogent in 1927, Robert Goddard's First Sunday Doomsday Algorithm, and my own approach of creating a full-month calendar to was calculations.

For those familiar with Doomsday algorithm, this isn't yet another variation of John Conway's fine work. Instead, I started with Durbin and Rogent's unusual and simple approach to dealing with the year, and adjusted the math so it meshed with Goddard's powerful work. The exact details and credits are given at the bottom of each section of the tutorial.

The result is a calendar creation routine that's quick and simple to learn, yet powerful enough to let you create calendar for any month and year back to 45 B.C., when the Julian calendar was first used!

To help you practice it more effectively, I've also developed a quiz page. The initial quizzes are simple, in order to help you master the calculation and recall required by each step, and then there's a more complete quiz, which simply has you create a calendar month for random dates. Some of you may recognize this as a modified version of my calendar quiz from Day One.

If you've never tried to do a calendar calculation before, try this out, and you might surprise yourself. If you've tried to do calendar calculations before and given up because of the difficulty of other methods, try the Quick Calendar Month Creation tutorial, and see the ease and power of this approach. Either way, I'd love to hear what you think about it in the comments!