Skip to lesson content

Lesson 5 of 10

Number Play · Lesson 5 of 10

Constructing a Magic Square

“Reason your way to a 3 × 3 square in which every line has the same sum.”

Learning Objectives

• Define a magic square and determine its required sum for 1–9. • Explain why the centre of a 1–9 magic square is 5. • Use line constraints to place 1 and 9 and complete the square. • Distinguish a genuinely different arrangement from a rotation or reflection.

From row clues to one shared sum

The grid puzzles allowed different row and column sums. A magic square is more demanding: each row, each column, and both diagonals have the same total, called the magic sum. We still use each number from 1 to 9 exactly once. Rather than guess nine positions, we can work out what has to be true.

Definition
Magic square

A square number grid in which every row, every column, and each main diagonal add to the same magic sum.

The three rows together contain 1 + 2 + ··· + 9 = 45. If their three sums are equal, each must be 45 ÷ 3 = 15. So the magic sum cannot be freely chosen when the entries are fixed as 1–9.

Fix the magic sum

Problem
Could a 1–9 magic square have magic sum 18?

  1. 1.If each of three rows totaled 18, all entries together would total 3 × 18 = 54.
  2. 2.But the entries 1 through 9 total 45. Hence 18 is impossible; the magic sum must be 15.

Why the middle entry is five

Four magic lines pass through the centre: its row, its column, and the two diagonals. Every other cell belongs to exactly one of these four lines. Adding these lines counts all the entries once, plus the centre three extra times. Their total is 4 × 15 = 60. Since all nine entries total 45, three copies of the centre must total 60 − 45 = 15. The centre is therefore 5.

Find the centre without trials

Problem
What number must be at the centre of a 1–9 magic square?

  1. 1.Add the middle row, middle column, and both diagonals: the total is 4 × 15 = 60.
  2. 2.The nine numbers contribute 45 once, and the centre is included three more times.
  3. 3.Three times the centre is 15, so the centre is 5.

Place the extreme numbers and complete the grid

If 1 were placed in a corner, it would have to participate in three different lines of total 15. The only distinct pairs from the remaining 1–9 values that can join 1 to give 15 are 5 + 9 and 6 + 8. Two pairs cannot fill three intersecting lines without reusing an entry. Similar reasoning excludes 9 from a corner. Each must occupy an edge-middle cell. With 5 in the centre, the opposite edge-middle entries 1 and 9 form a line of 15.

Now fill the remaining lines by subtraction and check diagonals, too. A completed example is shown below. Every row and column sums to 15; the diagonals give 8 + 5 + 2 and 6 + 5 + 4, also 15.

816357492Each line totals 15.Centre = 5
A completed magic square— Trace all eight lines, including the two diagonals, and check that each totals 15.
Fill a missing cell

Problem
In a magic square, the top row is 8, 1, blank. What is missing?

  1. 1.The row must total 15, so 8 + 1 + blank = 15.
  2. 2.The blank is 15 − 9 = 6. It must also agree with its column and diagonal.

You can rotate a completed square or turn it over to obtain another arrangement satisfying the rules. These give eight orientations of the same basic 1–9 pattern. If “different” means up to rotation and reflection, there is one essential pattern; if orientations count separately, there are eight. State the convention when answering a counting question.

Check diagonals

A grid with equal row and column sums need not be a magic square. The two diagonals must also give the same sum.

Quiz

Quick check

What is the magic sum for a 3 × 3 square filled with 1–9?

Quick check

Which entry must stand in the centre?

Quick check

How many lines through the centre are checked in a 3 × 3 magic square?

Quick check

Why can 1 not be placed at a corner?

Quick check

Do equal row and column sums alone establish a magic square?

Practice Problems

Practice Problems
  1. Explain from the total of 1–9 why the magic sum is 15.
  2. Use the four lines through the centre to prove that the centre is 5.
  3. Complete 8, 1, blank / blank, 5, blank / blank, 9, blank using each number from 1–9 once. Verify eight lines.
  4. Rotate a valid 1–9 magic square a quarter-turn and verify its row, column, and diagonal sums.
  5. Explain what changes in the answer to “how many magic squares?” when rotations and reflections are counted as different.
  6. Can 1 and 9 stand at opposite edge-middle positions? Explain their line with the centre.

Key Takeaways

Key Takeaways

• For entries 1–9, the total is 45, so each magic line must total 15. • The centre is 5 because the four lines through it count it three extra times. • The numbers 1 and 9 occupy edge-middle positions rather than corners. • Rows, columns, and both diagonals must all be checked. • The eight rotated or reflected orientations represent one basic 1–9 pattern.