• Foundation
  • About 14 min
  • 5 practice questions

Changing and generalising magic squares

Make new magic squares by adding to or multiplying every entry, describe every 3 × 3 magic square of consecutive numbers with one letter-number, and work out the magic sum of a 4 × 4 square.

If something looks wrong, please tell us.

By the end of this lesson you can

  • Predict the new magic sum when every number in a magic square is increased or multiplied.
  • Write a general 3 × 3 magic square around a centre m and use it to build squares with a chosen magic sum.
  • Work out the magic sum of a 4 × 4 magic square made from 1 to 16.

Once you have one magic square, you can make many more. Algebra helps us see the structure that every 3 × 3 magic square of consecutive numbers shares.

Changing every number

Start with the square 6 7 2 / 1 5 9 / 8 3 4 (magic sum 15). Add 1 to every number: each line still has three numbers, each 1 bigger, so each line grows by 3. The result uses 2 to 10 and has magic sum 18. In general, adding k to every entry adds 3k to the magic sum. Doubling every entry doubles every line sum, giving magic sum 30, and the square is still magic.

Making new magic squares
Change to every entryStill magic?New magic sum (from 15)
add 1yes15 + 3 = 18
add 4yes15 + 12 = 27
multiply by 2yes15 × 2 = 30
multiply by 3yes15 × 3 = 45

Multiplying by 3 gives the numbers 3, 6, 9, …, 27, which are not consecutive. So magic squares need not use consecutive numbers.

The general 3 × 3 magic square

Write each number of our square as 'centre plus or minus something'. With centre m the pattern is:

A magic square around the centre m (m = 5 gives the 1 to 9 square)
GridColumn 1Column 2Column 3
Row 1m + 1m + 2m − 3
Row 2m − 4mm + 4
Row 3m + 3m − 2m − 1

Every line adds to 3m, because the extra amounts cancel: for the top row, (m + 1) + (m + 2) + (m − 3) = 3m + 0. Check a diagonal: (m + 1) + m + (m − 1) = 3m.

A 3 × 3 magic square of nine consecutive numbers with centre m has magic sum 3m. Adding k to every entry adds 3k to the magic sum; multiplying every entry by k multiplies the magic sum by k.

Worked example 1: centre 12

Put m = 12: the rows are 13, 14, 9; then 8, 12, 16; then 15, 10, 11. Each row: 13 + 14 + 9 = 36, 8 + 12 + 16 = 36, 15 + 10 + 11 = 36. Columns: 13 + 8 + 15 = 36, 14 + 12 + 10 = 36, 9 + 16 + 11 = 36. Diagonals: 13 + 12 + 11 = 36 and 9 + 12 + 15 = 36. The magic sum is 3 × 12 = 36.

Worked example 2: a chosen magic sum

To make a magic square with magic sum 45 from consecutive numbers, we need 3m = 45, so m = 15. Putting m = 15 into the pattern gives rows 16, 17, 12; 11, 15, 19; 18, 13, 14, using 11 to 19. Check the first column: 16 + 11 + 18 = 45.

Worked example 3: magic sum zero

With m = 0 the pattern gives 1, 2, −3; −4, 0, 4; 3, −2, −1. Every line adds to 0, a magic square using the integers from −4 to 4.

Making a magic square with magic sum S (S a multiple of 3)

  1. Find the centre m = S ÷ 3
  2. Write the pattern Fill in m ± 1, m ± 2, m ± 3, m ± 4 in their places.
  3. Check one row, column and diagonal Each must add to S.

A 4 × 4 magic square

Magic squares have a long history in India. A 4 × 4 magic square carved in a 10th-century inscription at the Pārśvanātha Jain temple in Khajuraho is known as the Chautīsā Yantra; chautīs means thirty-four. Why 34? A 4 × 4 square using 1 to 16 has total 1 + 2 + … + 16 = 136, shared equally among 4 rows: 136 ÷ 4 = 34.

Key takeaways

Key takeaways: Adding the same number to every entry, or multiplying every entry by the same number, keeps a square magic and changes the magic sum predictably. Every 3 × 3 magic square of consecutive numbers fits one pattern around its centre m, with magic sum 3m. A 4 × 4 square of 1 to 16 has magic sum 136 ÷ 4 = 34.

Check your understanding

  1. 1. Every number in a magic square with magic sum 15 is doubled. What is the new magic sum?

    1. 15
    2. 17
    3. 45
    4. 30
    Show answer

    Answer: D. Each line has three numbers, each doubled, so each line sum doubles: 15 × 2 = 30.

  2. 2. Every number in a magic square with magic sum 15 is increased by 4. What is the new magic sum?

    1. 19
    2. 27
    3. 60
    4. 15
    Show answer

    Answer: B. Each line has three numbers, each 4 bigger, so each line grows by 3 × 4 = 12: 15 + 12 = 27.

  3. 3. In a 3 × 3 magic square of consecutive numbers with centre m, what does every row add up to?

    1. m + 15
    2. 9m
    3. 3m
    4. m
    Show answer

    Answer: C. Each line has m three times, and the amounts added and taken away cancel, e.g. (m + 1) + (m + 2) + (m − 3) = 3m.

  4. 4. A 3 × 3 magic square of nine consecutive numbers has magic sum 54. What number is in the centre?

    1. 18
    2. 15
    3. 27
    4. 12
    Show answer

    Answer: A. The magic sum is 3 × centre, so the centre is 54 ÷ 3 = 18.

  5. 5. What is the magic sum of a 4 × 4 magic square that uses the numbers 1 to 16?

    1. 30
    2. 36
    3. 34
    4. 136
    Show answer

    Answer: C. 1 + 2 + … + 16 = 136 is shared equally by the 4 rows, so each row adds to 136 ÷ 4 = 34.

Privacy · Terms · Refunds · Delivery