You are here

Quasi-Masked Forcing Kind of Magic Squares

February 2007

Have you ever had trouble remembering how to construct the unique (up to rotations/reflections) 3 by 3 magic square, shown on the left below, featuring the numbers 1 to 9 inclusive? Here's an easy way to rediscover it. Start with the more "balanced" magic square on the right. It has row/column/diagonals sums of 0 (rather than the usual 15), and is found by writing 0 in the middle, and 1, 2, 3 and 4 down the right column and around the corner to the middle of the bottom row. Next, make the 3 negative to balance the 1 and 2, and the rest of the entries are obvious.

8 1 6
3 5 7
4 9 2
3 -4 1
-2 0 2
-1 4 -3

Simply add 5 to each entry of the square on the right to get the better-known square on the left. Adding other constants across the board gives other magic squares, whose invariant sums are multiples of 3. There is a long history in magic of using the standard magic square to force the number 15, e.g., see (any chapter of) Martin Gardner's Mathematics, Magic and Mystery (Dover, 1956).

There are additional manipulations of interest, including the selective addition of a constant (positive or negative) to three of the nine entries, such as any corner and the two entries which are a Knight's move away. E.g., if we add 1 to the 8, 7 and 9 of the standard square, we get the first one below.

9 1 6
3 5 8
4 10 2
9 5 6
3 5 12
8 10 2
9 9 6
7 5 12
8 10 6

This has all rows/columns and one diagonal sum to 16. (The diagonal sum of 15 can be made to work in some situations using cards, e.g., by using the "next card" principle.) Note that 7 is missing. The middle magic square is obtained from this one, by subsequently adding 4 to the 4, 1 and 8, and it has all rows/columns and one diagonal sum to 20. This time, not only are several numbers between 2 and 12 missing, one is repeated. Finally, the third magic square is obtained from the middle one by adding 4 to its 5, 3 and 2. This one has all rows/columns (but no diagonals) sum to 24. We're straying further from the land of standard magic squares. However, prediction tricks based on such squares seem natural if cards are used, and we only use numbers between 1 and 13 (with a Queen representing 12, etc.).



You can have these nine cards at the top of the deck, shuffle wildly while maintaining that stock, and deal (face-up or face-down) to get this array. Ask that any row or column be indicated. Even if the card faces are visible, those who remember magic squares are unlikely to suspect anything, since the arrangement will be unfamiliar. Gather up the remaining six cards, and add them to the bottom of the deck. Have the value of the three selected ones summed, yielding 24.

Hand a copy of Mathematics, Magic and Mystery to the spectator, and request that the first words under the page number on page 24 be read out: "It is the Ace of Spades." Look puzzled. Then request that the top card of the remainder of the deck be turned over; you can guess what it is.

We forgot to mention that you start with the A♣ under the stock of nine for the magic square, and keep all ten there while shuffling. A presentational option is to forget the book prediction, and bury the A♣ at position 33 from the top (that's 19 from the bottom) at the outset, being careful while shuffling so that it stays there. Write "Ace of Clubs" on a prediction slip, and leave it face-down in full view. Once the top nine cards are removed and used for the magic square part, resulting in the free selection of the number 24, have the spectator count down to that position in the rest of the deck for a successful conclusion: the card arrived at will match your written prediction. Alternatively, the A♣ could be sealed in a prediction envelop before the performance.

Profiting If Balanced

Now we consider less obviously balanced magic squares with negative entries.

7 -7 3
-3 1 5
-1 9 -5
9 -5 5
-1 3 7
1 11 -3
11 -3 7
1 5 9
3 13 -1
9 -7 5
-1 3 5
-1 11 -3

These four force 3, 9, 15 and 7 respectively. The first three can be obtained from the standard magic square by doubling each entry and subtracting 9, 7 and 5, in turn. The last one (which has one defective diagonal) is got from the second one by further applying the "2 Knight" treatment—this time subtracting 2 from the bottom left corner and two related entries.

Negative entries can easily be motivated by using red cards, assuming that we use black cards for all positive entries. We carefully avoided zero entries in the last four examples, although these can easily be accommodated by using face-down cards (an idea that goes back at least as far as Harry Lorayne). The last square above corresponds to something like the display below, where we can be flexible concerning the suits, provided that we pay attention to which cards are red.



Let's assume that you placed a prediction slip face-down on the table at the outset. Now have a spectator indicate any row/column/diagonal. Collect the other cards and tuck them under the rest of the deck. The three selected cards are guaranteed to have sum 7, with the understanding that red cards count as negatives. You can say, "Add up the value of the black cards, which represent credits, and subtract the values of the red cards, which represent debits. Remember your balance."

Ask the spectator to turn to page 7 of Mathematics, Magic and Mystery, and look at the very first words visible on the page, which are, "A baffling prediction." Now you recall the prediction slip, which might read, "The seven of clubs." Of course this turns out to be the seventh card from the top of the remainder of the deck. You may opt to try this without the book, or the prediction slip (or the cards).

Incapable of Drifting

There are 880 essentially different 4 by 4 magic squares which use 1 to 16 inclusive. One of the best known examples is the one shown on the left below, as used by Albrecht Durer in his famous painting Melancolia I, which was completed in 1514 (note the strategic placement of 15 to the left of 14). Its rows/columns/diagonals (and numerous other four entry combinations) sum to 34.

16 3 2 13
5 10 11 8
9 6 7 12
4 15 14 1
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1
15 3 2 13
5 10 10 8
9 6 7 11
4 14 14 1

This is actually a variation on the more standard one in the middle above (which may be constructed using a pleasing algorithm). The third one is taken from the Passion Facade, due to sculptor Josep María Subirachs, on the exterior of Gaudí's famous Sagrada Familía, in Barcelona, and has 33 as its constant sum (click here for some good photos and a fanciful discussion of this). It can be obtained from the first one by decreasing the value of just four entries by 1, namely the original 16, 11, 15 and 12. Note that these four entries all occupy distinct rows and columns, and can be reached on a "Knight's tour."

Once again, we can avoid 0 by doubling each entry of the basic magic square and then subtracting some odd number, but it's not quite so simple here, as the numbers thus obtained cover too large a range to be represented by cards. For instance, doubling and subtracting 15 yields the magic square on the left below, whose constant sums are 8.

17 -11 -9 11
-5 7 5 1
3 -1 -3 9
-7 13 15 -13
13 -11 -9 11
-5 7 5 -3
3 -5 -3 9
-7 13 11 -13
13 -10 -13 7
-9 3 6 -3
4 -5 -7 5
-11 9 11 -12

The second magic square above has row/column (and two diagonal) sums of 4, it is obtained from the sum 8 magic square by subtracting 4 from the 17, 1, -1 and 15 (note that these four entries are all in different rows and columns). The third magic square was obtained in a similar way; it has constant sums of -3 (which can be changed to 3 if desired, by just negating everything). We leave it to the reader to experiment with card applications of this kind of magic square.

Factorial Fib Pending

Now, let's consider 5 by 5 magic squares. The first one below is well-known, and can be generated by a delightfully "odd" algorithm which treats the square as a torus. It has row/column/diagonal sums of 65.

17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
5 12 -11 -4 3
11 -7 -5 2 4
-8 -6 1 8 10
-2 0 7 9 -9
-1 6 13 -10 -3

Subtracting 13 from each entry gives a pleasing balanced magic square with 0 as its middle entry, but it's too obvious for use in a prediction trick. The second magic square above is obtained by subtracting 12 from each entry of the first one. All its rows/columns/diagonals sums to 5. This slightly off-center square can be used as earlier, with appropriate red cards taking the place of all negative numbers. For the face-down card, use 5♣ (assuming that you have 5♠ in the top left corner).

Ask the spectator to point to any card, then remove it along with the other cards in either its row or column, or, if possible, the diagonal containing it. Gather up the twenty unused cards into a face-up pile (if the face-down card is among these, put it on top). Meanwhile, babble about how many possibilities there are for the outcome of this, perhaps claiming, "I think it's 25 factorial." Direct the spectator as before to add and subtract using the five selected cards, if necessary explaining that the face-down card contributes zero. Draw attention to the face-down now, regardless of where it is, and conclude, "It's remarkable that you ended up with a balance of five, because this lone face-down card is the five of clubs." Have it turned over to confirm.

Big Diffraction Panel

The old "double each entry of the basic magic square and subtract something odd" trick, for avoiding the occurrence of a 0, fails for 5 by 5s, as the numbers so obtained cover much too large a range to be represented by cards. Instead, let's modify the last magic square by boldly changing the 0 to 11, likewise adding 11 to four more entries (-4, -5, -8 and -3) in different rows and columns. This alters the sums to 16. Selecting cards to represent these yields:





Have a spectator select any row, column or diagonal, collecting the twenty unused cards and placing them to one side. Have the five selected cards tallied to give a total of 16. That page of Mathematics, Magic and Mystery begins, "Method: Before starting the trick, the magician secretly notes the 26th card in the deck." Have this read out and let it sink in. Then say, "Aha, we used twenty-five cards in the display from which you just selected five. So the next card on the top of the deck must be the 26th. Actually, I did take the precaution of noting it at the outset." Either announce what it is, and have it turned over, or reveal a prediction slip, to confirm your foresight.

Since 1988, Colm Mulcahy (colm@spelman.edu) has been in the department of mathematics at Spelman College, where a recent project of his was the creation and launching of the new BIO SIGMAA webpage. "Quasi-masked forcing" is an anagram of "kind of magic squares." All of our other titles this time are anagrams of "a baffling prediction" (we didn't have room for "Financial Gift Probed" or "Piffling Borat ad? Nice!"). For more on mathematical card tricks, including a new guide to topics explored in previous Card Colms, see http://www5.spelman.edu/~colm/cards.html.