Lagnever AI Hinglish

Magic squares

Answer in short

A magic square is a grid in which every row, column and diagonal adds up to the same number, the magic sum. With the numbers 1 to 9 in a 3 × 3 grid, the magic sum must be 15 and the centre 5; there are 8 such squares, all turns or flips of one.

Stuck on a question? Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2. Get it on Google Play

Sums in a grid

Fill a 3 × 3 grid with the numbers 1 to 9, using each once, and write the total of every row and every column in circles outside it. In the grid 4 7 5, 6 1 2, 3 9 8, the rows add to 16, 9 and 20 and the columns to 13, 17 and 15. Whatever the arrangement, the three row totals add up to 45, and so do the three column totals, because between them they include every number from 1 to 9 exactly once, and 1 + 2 + … + 9 = 45. All six circles together therefore make 90.

A grid of 1 to 9 with row sums 16, 9, 20 and column sums 13, 17, 15, each set totalling 45
Row and column sums of a 1–9 grid

When a grid is impossible

The smallest total three different numbers from 1 to 9 can make is 1 + 2 + 3 = 6, and the largest is 9 + 8 + 7 = 24. A puzzle that asks for a row or column sum of 5 or 26 can never be solved, without trying a single arrangement.

Two solved grid puzzles and a third grid that is impossible because it asks for sums of 5 and 26
Filling the grids

What is a magic square?

A square grid of numbers is a magic square if every row, every column and both diagonals add up to the same number, the magic sum. Guessing is hopeless: there are 3,62,880 ways to fill a 3 × 3 grid with 1 to 9. Instead, we reason one question at a time.

Building the 1–9 magic square

The magic sum. The three row sums total 45 and are all equal, so each must be 45 ÷ 3 = 15.

The centre. The centre lies on a line with every other cell. If 9 were in the centre, 8 would share a line with it, and 9 + 8 is already 17, too much. If 1 were in the centre, 2 would share a line with it, needing 1 + 2 + 12, but 12 is not available. The same kind of check rules out every number except 5.

The corners. A corner lies on three lines, so a 1 in a corner would need three different pairs adding to 14, but only 5 + 9 and 6 + 8 exist. In the same way 9 cannot sit in a corner. So 1 and 9 go in the middle of opposite edges, in a line with 5, and the rest follows: for example 8 3 4, 1 5 9, 6 7 2.

Building the 1–9 magic square: magic sum 15, centre 5, and 1 and 9 in the middle of opposite edges, giving 8 3 4, 1 5 9, 6 7 2
Building the 1–9 magic square

There are 8 magic squares with 1 to 9, all the same square turned or flipped.

Changing a magic square

Adding the same number to every cell keeps every line equal and raises the magic sum by three times that number, so adding 1 to each cell of a 1–9 square gives a 2–10 square with sum 18. Doubling every cell doubles the sum to 30, and subtracting 5 from every cell gives a square with magic sum 0 that uses negative numbers.

A magic square with sum 15, then with 1 added (sum 18), doubled (sum 30) and with 5 subtracted (sum 0)
Changing a magic square

The general form

Write the centre of any 3 × 3 magic square made from consecutive numbers as a letter-number m. Then the cells are m + 3, m − 4, m + 1; m − 2, m, m + 2; m − 1, m + 4, m − 3, and every row, column and diagonal adds to 3m. With m = 25 the magic sum is 75, and for a magic sum of 60 we take m = 20.

The generalised 3 × 3 magic square with centre m, and the examples with centre 25 and centre 20
The generalised magic square

Magic squares in history

The oldest recorded magic square, the Lo Shu square, comes from China over 2000 years ago; legend says a turtle carried it on its back during a flood of the Lo River. Indian mathematicians worked out general ways to build magic squares, including 5 × 5 and larger ones. The first recorded 4 × 4 magic square, the Chautisa Yantra, is in a 10th-century inscription at the Parshvanath Jain temple in Khajuraho; chautis means 34, and its rows, columns, diagonals, corners and 2 × 2 blocks all add up to 34. A 3 × 3 square is carved on an 8th-century temple pillar at Palani in Tamil Nadu, and yantras such as the Navagraha and Kubera Yantras still hang in homes and shops.

The Chautisa Yantra, with rows, columns, diagonals, corners, the centre square, 2 by 2 blocks and broken diagonals all adding to 34
The Chautisa Yantra

Why it matters

Magic squares train us to reason from totals instead of guessing. The general form uses the letter-numbers of algebra, and the parity ideas in parity: odd and even numbers help with grid puzzles too; another pattern from Indian tradition is in Virahanka–Fibonacci numbers. Answers to every question are in the NCERT solutions for Chapter 6; see also the full Chapter 6 notes.

Practice

  1. What is the sum of the numbers 1 to 9?

    1. (a) 36
    2. (b) 45
    3. (c) 54
    4. (d) 90
    Show answer

    Answer: (b) 45

  2. A 3 × 3 magic square made with the general form has centre 25. What is its magic sum?

    1. (a) 25
    2. (b) 50
    3. (c) 75
    4. (d) 100
    Show answer

    Answer: (c) 75

  3. Every row, column and diagonal of the Chautisa Yantra adds up to:

    1. (a) 15
    2. (b) 30
    3. (c) 34
    4. (d) 36
    Show answer

    Answer: (c) 34

  4. Why can 9 not be in the centre of a 1–9 magic square?

    Show answer

    Answer: Every other cell is on a line through the centre, so 8 would share a line with 9, and 9 + 8 = 17 is already more than the magic sum 15.

  5. Make a 3 × 3 magic square with magic sum 60.

    Show answer

    Answer: Use the general form with centre 60 ÷ 3 = 20: 23 16 21, 18 20 22, 19 24 17.

Questions students ask

What is a magic square?

A magic square is a square grid of numbers in which each row, each column and both diagonals have the same total, called the magic sum. For example, in 8 1 6, 3 5 7, 4 9 2 every line adds up to 15.

How many 3 × 3 magic squares can be made with the numbers 1 to 9?

Eight. They are all the same square turned through quarter turns or flipped over, such as 8 1 6, 3 5 7, 4 9 2 with its rotations and mirror images, so in that sense there is only one basic 1–9 magic square.

What is the Chautisa Yantra?

It is the oldest known 4 × 4 magic square, from a 10th-century inscription in the Parshvanath Jain temple at Khajuraho. Chautis means 34, and every row, column and diagonal adds up to 34, as do the four corners, the centre square and every 2 × 2 block.

Stuck on a question?

Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2.

Get it on Google Play Open in browser

For parents: after the trial, the plan renews monthly by UPI or card autopay. You can cancel anytime in the app.