Wednesday, May 15, 2019

Magic Squares

Gaudí, Sagrada Familia, Magic SquareAt some point, math teachers talk about magic squares.  A magic square is a 3 by 3, 4 by 4, or 5 by 5 square where the numbers total the same number vertically, horizontally, or diagonally.  It is claimed the first magic puzzled appeared in China on the back of a turtle.

The story goes that China had been experiencing a lot of flooding. One day, a turtle appeared with something on its back.  The emperor discovered that the markings were numbers and each row, column, diagonal added up to the same number.  He found the pattern.  He named the turtle Lo Shu which translates to Book of the Lo River.  This is the first reference to magic puzzles ever found.  Over time, different people played with magic squares including our own Benjamin Franklin and it has appeared in at least one painting from 1514.

Benjamin Franklin created a 16 by 16 magic square whose sum totaled to 2056 and is referred to as Franklin's Magic Square but most magic squares range from 3 by 3 to 5 by 5.  How do you create a magic square?  Here's how.

Lets start with a 3 by 3 grid.  The first thing you must do is find the magic constant by using the formula n(n^2+1)/2 where n = the number of rows and columns.  For this square it is 3(3^2 + 1)/2 or 3(10)/2 = 15 or the total for each row or column.

If the square as an odd number of rows/columns, you put the number 1 in the middle of the top most row.  The rest of the grids are filled in using a one up and one to the right pattern.  So if one is at the top, the one up and one to the right actually takes you to the bottom right corner where you write 2.  Continue the one up and one to the right and place 3 there.

At this point, you might notice if you continue the one up and one to the right, you end up at your starting point, so you move one down and write 4 there and repeat the up one and right one for 5 and 6.

Again, if you went up one and right one you'd end up at 4 so instead you go down one and write 7.  From there you can finish the rest of the numbers using the up one and right one pattern until you have finished your magic square.

The bottom line is use the up one, right one pattern until you start to repeat, then go down one and begin the whole pattern again.


This process works on any odd numbered magic square.


What if you want to make a 4 by 4 or other even magic square.  How would you do that one?  Well that actually is a bit easier.  Lets look at doing a 4 by 4.  First,  we find the magic number which would be 4(4^2+1)/2 or 4(17)/2 or 34.  Then you would place the  1,4, 6,7, 10, 11, 13, and 16 in counting order so it looks like this.

When you are done, you should have the square so it looks like the one above.  Then you fill in the remaining spaces with the remaining numbers starting at the bottom right next the the 16 and count up so your grid looks like the one below.


and all the rows and columns should add up to 34, the magic number.  For multiples of 4 such as 8 by 8, instead of using one square at each corner, you'd use 4 at each corner with the middle 16 for the main numbers just as you would as you were counting.  Then begin at the bottom and do it in reverse.

For a 6 by 6 which as 36 squares you actually end up doing 4 different 3 by 3 columns only using slightly different numbers.  The top left grid uses the digits 1 to 9, the top right grid uses the numbers 19 to 27 while the bottom left uses the digits 28 to 36 and the bottom right uses 10 to 18 and they all follow the one up and one right pattern with the beginning number in the top middle square.

These are a great way to introduce patterns because to complete the magic squares, you have to follow general patterns which can be applied to larger squares depending which type they are.  Let me know what you think, I'd love to hear.  Have a great day.

P.S.  Sorry this is so late but I've been without internet for a few days and it died before I could write this one over the weekend.




No comments:

Post a Comment