The Magic Squares
Use algebra as required
Construct magic squares
First of all, if the class hasn’t heard of magic squares, then you may need to tell them that a magic square is an arrangement like the one below where the vertical, horizontal and diagonal lines of numbers all add up to the same value. This ‘same value’ is called the sum of the magic square.
| 4 | 1 | 7 |
| 7 | 4 | 1 |
| 1 | 7 | 4 |
Magic squares are interesting objects in both mathematics proper and in recreational mathematics. So they are objects that students should have heard about and experienced. The problems in this sequence give students the opportunity to use the new numerical or algebraic concepts that they will have acquired at that Level, along with magic squares.
It’s a critical part of this and some earlier problems that three times the centre square is equal to the sum of the magic square. We prove this in the Extension to Negative Magic Squares, Level 4 and in this lesson.
This problem is the seventh in a sequence of problems on magic squares. The first of these is A Square of Circles (Level 2), and no attempt is made to actually explore magic square properties there. The second lesson is Little Magic Squares (Level 2). There are essentially two magic square problems at Level 3 – Big Magic Squares and Decimal Magic Squares.
At Level 4, we have Negative Magic Squares that uses negative numbers and Fractional Magic Squares that uses fractions. Finally, Difference Magic Squares at Level 6, looks at an interesting variation of the magic square concept.
Students at Level 5 or 6 might like to play with the consecutive numbers b – 1, b and b + 1 to show that there are only four magic squares that use only these three numbers. Does the same argument hold with 2b – 2, 2b and 2b + 2? What about b, c and 2c - b? Can you think of any other variations?
The magic square in this problem, can be solved by guess and check, where the students guess where the numbers go into the 3 by 3 grid and then check whether this gives the correct solution. The most efficient way to solve this problem, however, is to use algebra and play with the numbers. It would be a good idea to have your students first try non-algebraic techniques, such as guess and check, to emphasise the efficiency of algebra.
The problem encourages students to determine what critical information within the problem is needed in order to find a solution, allowing the students to develop their own algebraic equations to fit the problem situation. This might help them to understand the purpose of algebra, which they may not come to understand if they are simply given algebra equations to solve.
The Problem
Tui has realised that there are nine positions in a magic square. So can she make up a magic square using each of the numbers 1, 2, 3, 4, 5, 6, 7, 8, 9 once and only once?
Teaching sequence
-
Talk about square ‘arrays’ of numbers like the ones in A Square of Circles (Level 2). Ask the class if you can put numbers into these arrays so that the rows have the same sum; the columns have the same sum; all of the rows, columns and diagonals have the same sum.
-
Show them a magic square such as the one below.
| 6 | 1 | 5 |
| 3 | 4 | 5 |
| 3 | 7 | 2 |
- Get them to check that the rows all have the same sum (of 12); that the columns all have the same sum; and that the diagonals have the same sum.
- Tell them that these things are called magic squares and that the sum of a magic square is the common sum of the rows, columns and diagonals.
- Tell them Tui’s problem.
- Ask them to go away in pairs and see if they can find one with the required numbers. Note that they should not be given the hint that the sum of a magic square is three times the centre entry. If they need this piece of information (and they do), then they have to work it out for themselves.
- Get some of the pairs to report back. Can they justify every step in the production of the magic square? How did they solve the problem? (There is more than one way.)
- How many different magic squares can they find? How many do they think there are?
- Ask the students to write up what they have discovered.
- >As the first part of the Extension problem is not so different from the original problem, most of the class might be asked to try it.
Extension to the problem
What other magic squares can you make with nine consecutive numbers?
Solution
Suppose that the magic square is as in the diagram below.
| A | B | C |
| D | E | F |
| G | H | I |
Let s = the sum of three numbers in a row. Therefore:
s = A + B + C = D + E + F = G + H + I
= A + D + G = B + E + H = C + F + I
= A + E + I = C + E + G
We know that:
A + B + C + D + E + F + G + H + I = 1 + 2 +…+ 9 = 45
Can we use this information to establish s?
We can see that the first three equations for s are A + B + C; D + E + F; and G + H + I. If we sum these three equations, we get:
3s = A + B +C + D + E + F + G + H + I = 45. So 3s = 45, which means that s = 15.
There are two ways to go from here. Call this point step *. Thus the sum has to be 15. How many ways can this sum be attained? Let's see how many ways each number 1 to 9 can be used in a sum of three to get 15.
9 + 5 + 1
9 + 4 + 2
8 + 6 + 1
8 + 5 + 2
8 + 4 + 3
7 + 6 + 2
7 + 5 + 3
6 + 5 + 4
As can be seen, there are only eight possible equations of three numbers using the numbers 1 to 9 that give a sum of 15. Thus, all these eight equations have to be used together in the solution. We can see from the eight algebraic equations that each corner square is in three equations (i.e., a, c, g, i), the centre square is in four equations (i.e., e) and the remaining middle row squares are in two equations (i.e., b, d, f, h).
We can see from the eight equations using the numbers 1 to 9, that 5 is the only number which appears in four equations, thus 5 must be the centre square, E:
| 5 | ||
We can also see that 9, 7, 3, and 1 only appear twice each in these eight equations, thus they must be B, D, F, and H. We can also see that 9 and 1 have to be in an equation together, as do 7 and 3. Therefore, they are restricted to the following arrangements (and their rotations about the centre square):
|
|
The remaining numbers 2, 4, 6, and 8 must therefore be in the corners, i.e., A, C, G and I. Checking the eight algebraic equations, we can see that this is possible, as all of these numbers each appear three times in the eight equations using the numbers 1 to 9. As these numbers are in the corners, they all appear in one equation with each of the other corner numbers. We can also see that 2 is in equations with 9, 7, and 5; 4 is in equations with 9, 5 and 3; 6 is in equations with 7, 5 and 1; and 8 is in equations with 1, 3 and 5. Therefore, the only following arrangements can be formed (and their rotations about the centre square):
|
|
This is the same arrangement, reflected through B, E and H. Thus, 15 is the only sum, and this sum can only be attained using the above eight equations of three numbers using the numbers 1 to 9. Due to the symmetry of a 3 by 3 grid, reflecting or rotating the solution can form 8 different arrangements of this solution:
|
|
|
|
||||||||||||||||||||||||||||||||||||
|
|
|
|
We have therefore proved that there is only one magic square that can be made from the numbers 1 to 9 inclusive (subject to rotations and reflections of the square).
But earlier, at step * we could have used more algebra. Think about all of the rows, columns and diagonals through the centre square. So, if s is the sum, then
A + E + I = s
B + E + H = s
C + E + G = s
D + E + F = s
Add all of these up and you’ll get
(A + D + G) + (B + E + H) + (C + F + I) + 3E = 4s.
Now each term in the brackets equals s as they are the column sums. So
s + s + s + 3E = 4s.
This means that 3E = s. And since s = 15, then e = 5.
Now one way to make 15 is to 1 + 5 + 9, so suppose that 1, 5, 9 are down the main diagonal.
| 1 | B | C |
| 5 | G | |
| 9 |
Then B + C = 14 so {B, C} = {5, 9} or {6, 8}. But we’ve already used 5 and 9 so {B, C} = {6, 8}. This presents a problem. If C = 6 then G = 0 and if C = 8, then G = -2. This can only mean that 1, 5, 9 are not on the main diagonal.
| Attachment | Size |
|---|---|
| MagicSq.pdf | 37.11 KB |
| MagicSqMaori.pdf | 49.79 KB |
Similar Resources
Difference Magic Squares
This is a problem from the number and algebra strand.
More Dartboards
Identify and describe patterns in numbers
Work systematically to find the possible outcomes
Multiples of a
Perform calculations with algebraic quantities.
Going Around
These are level 3 number, statistics, and algebra problems from the Figure It Out series.
Filling the Gaps
These are level 3 number problems and level 4 number and algebra problems from the Figure It Out series.



