You might know about the classic magic square — every row, column, and diagonal adds up to the same number. But why stop at addition? What if every row, column, and diagonal had to multiply to the same number instead?

Can we build such a thing? And if so, how?

A Quick Recap

The classic magic square uses the numbers 1 through 9, each exactly once. The magic sum is 15.

Sum any row, any column, or either diagonal. You get 15.

Of course, you can use other sets of numbers, flip, or rotate the square, and it remains a magic square.

From Addition to Multiplication

Before building a multiplicative magic square from scratch, let’s try using what we already have. We have a square where things add nicely. Can we somehow convert addition into multiplication?

Pause for a moment. Is there a mathematical operation that bridges addition and multiplication?

You might remember logarithms from school. They turn multiplication into addition — . But we want the opposite direction. And the opposite of a logarithm is exponentiation.

That’s the key.

The product rule of exponents is . Take two pairs of numbers where . Raise both sides to a common base , and you get

Two pairs of numbers that add to the same total become two pairs that multiply to the same product.

This extends to any number of terms. and so on. We just need to raise each element of our additive magic square to a common base.

Let’s choose base 2:

Check it.
Row 1: .
Column 1: .
Every row, column, and diagonal multiplies to .

Any additive magic square can be converted to a multiplicative magic square by raising each element to the power of some base. Not just 2 — any base works. This technique of turning additive squares into geometric ones via exponents dates back to Michael Stifel in 1544.1

The Magic Product

For a traditional magic square, the magic sum equals times the center element. If the center is , the magic sum is .

Just replace addition with multiplication, and the magic product will be . That is indeed the case. In our example: .

The magic product of a multiplicative magic square is always the cube of the center element.

More Than One Base

Here’s a fact you might not know: you can add two additive magic squares element-wise, and the result is another additive magic square. You just need to be careful about uniqueness.

Similarly, we can multiply two multiplicative magic squares element-wise. And we already know how to build multiplicative magic squares — raise each element to some base. The base can be anything. The original additive magic squares don’t even need unique elements, as long as the final multiplicative square does.

Here’s one using two bases:

Every row, column, and diagonal multiplies to . In fact, is the minimum possible magic product for any multiplicative magic square of distinct positive integers.2

But wait — how do we know every number in the result is unique? Maybe we just got lucky here?

Unique Numbers via the Fundamental Theorem

The fundamental theorem of arithmetic states that every integer greater than 1 has a unique prime factorization. Since we chose bases 2 and 3 — both prime — each cell is of the form . Two cells are equal only if they share the same pair .

So we just need 9 unique pairs.

A Magic Square of Tuples

We need a magic square of unique tuples where the sum of tuples along every row, column, and diagonal is the same. And then we can raise each element of the tuple to some base and multiply them together (for example ) to get our multiplicative magic square.

But how do we even write unique tuples that add up properly? How do we even write unique numbers? But wait, we already do that! When we write “12”, it’s twelve and nothing else. And notice - we just wrote 12, that’s a 1 and a 2. Two digits. A tuple: .

We need 9 unique pairs of numbers for our magic square. Choosing some small integers (, because why not), we get exactly unique pairs:

But how to arrange them magic-square-style?

And then I had a thought… We’re counting up with only the digits . Those are exactly the digits of base 3. What if we write our magic square in base 3? Changing the base doesn’t change the additive properties:

Each row, column, and diagonal adds to .

Now look at those tuples again. Do they look familiar? They’re exactly the exponent pairs we used for the multi-prime construction above! The base-3 representation of a magic square is also a magic square of tuples.

Remember this trick. It will come back.

Can a Magic Square Be Both Additive and Multiplicative?

It’s mathematically impossible for or magic squares to be both additive and multiplicative.3 For and , it is not known whether any exist. The smallest known additive-multiplicative magic square is , discovered by Sébastien Miquel in 2016:4

Magic sum .
Magic product .

Why Not 3 × 3?

Let’s try to understand why it’s impossible. Assume a additive-multiplicative magic square exists:

As we’ve seen, the magic sum is , and the magic product is . Focus on the middle row. What do these two constraints together force?

From addition:

From multiplication:

We know the sum and product of and . Substituting into :

So . And from , we get too. The same argument works for every pair that crosses the center: , , . Every cell must equal the center.

Technically, that’s a magic square. But a real magic square demands distinct entries. Dead end.

Similarly, we can prove this holds for magic squares too. The proof is a bit longer, so just take my word for it :)

Escaping the Trap with Matrices

That’s disappointing. But I want a add-mult magic square!

Look at the proof again. Where exactly did things go wrong? The killing blow was forcing . For ordinary numbers, the only thing whose square is 0 is 0.

But what if we used other mathematical objects where that’s not true? We did already use tuples. What if something could be non-zero, yet square to zero?

We’ve been working with grids of numbers this whole time — and that reminds me of matrices. There are these special matrices called nilpotent matrices: non-zero matrices whose powers give the zero matrix.

A simple nilpotent matrix looks like:

where is any number we like. Multiply any two matrices of this form and you get zero:

Now, what values should take? Three entries of each matrix are fixed at 0 — they’ll always add to 0 regardless. The only free parameter is . For the magic sum to be constant, the values in each row, column, and diagonal must sum to the same number. We already know how to arrange that — use the entries from one of our original additive magic squares from earlier:

Every row, column, and diagonal sums to .
Every product is .

It’s both additive and multiplicative. All entries are distinct. We have our additive-multiplicative magic square!

Fixing the Zero Product

But the product is just zero. That feels hollow. Can we do better?

A useful fact: adding the same constant to every cell of an additive magic square keeps it magic — the magic sum just increases by times that constant. For matrices, the natural “constant” to add is the identity matrix .

Does the product still remain the same across rows, columns, and diagonals?

Let be three nilpotent matrices from the same row, column, or diagonal. Since any product of matrices of the form gives zero, we have for all pairs. We’ll add to each entry, and expand the product:

All cross-terms containing a product vanish. What remains is plus the sum . But that sum is the additive magic sum — and it’s the same for every row, column, and diagonal. So the product is the same too.

After adding to each entry:

Magic sum .
Magic product .

Non-zero, non-trivial, and magic under both operations. Magical!

Going Bigger: 3 × 3 Matrices

Why stop at ? A nilpotent matrix of the form gives us two free parameters. The easy route: set one to zero and fill the other from a magic square from above. But where’s the fun in that?

We need pairs that sum component-wise to the same pair across every line. Hmm, pairs of numbers that add up consistently… where have we seen that before?

The base-3 trick! The tuple magic square gives us exactly the pairs we need.

The tuple becomes the matrix . Doing the same for all the 9 tuples and then adding the identity to each, we get this add-mult magic square of matrices:

Magic sum .
Magic product .

What just happened?

We used the base-3 trick three separate times: to build the tuple magic square, to construct a multiplicative magic square with multiple primes, and now to fill in the matrix entries.

Removing the Zeros

But we still have so many zeros in those matrices. Can we get rid of them?

Suppose we replace every matrix in the magic square with for some fixed invertible matrix . Does the magic square stay magic?

For products, yes. The product along any line transforms as:

The inner pairs collapse to , and we’re left with times the old product times . Since the old product was the same for every line, the new product is too.

For sums, a simple factoring works:

Again, a constant transformation of the old magic sum — the same across every line.

So conjugation by any invertible preserves both the additive and multiplicative magic properties. We’re free to choose to scramble the zero structure.

Let’s choose:

Replacing each in our matrix magic square from above:

Almost no zeros.
Magic sum .
Magic product .

Bonus: A Magic Square of Magic Squares

This is just additive. Magic sum

Even the magic sum is a magic square with magic sum ! (And that’s not a factorial.)

For obvious reasons, this is also a additive magic square! Think how.

This nested pattern is known as a composite (or compound) magic square; a grid formed by nine magic squares with magic sum 369 was first documented by Chinese mathematician Yang Hui in 1275.5

Further Reading

Footnotes

  1. Michael Stifel, Arithmetica Integra (1544), pp. 29–30. ↩

  2. G. Pfeffermann, Les Tablettes du Chercheur (1893); Henry Ernest Dudeney, Amusements in Mathematics (1917), Problem 410. See also Eric W. Weisstein, “Multiplicative Magic Square”, Wolfram MathWorld. ↩

  3. The impossibility of and additive-multiplicative magic squares was proved by Lee Morgenstern in 2007. See Christian Boyer, “Smallest additive-multiplicative magic square”, Multimagie.com. ↩

  4. Sébastien Miquel, “7x7 Additive-Multiplicative Magic Square” (August 2016). Details and computation logs available on Christian Boyer’s Multimagie.com. ↩

  5. Yang Hui, Xugu Zhaiqi Suanfa (续古摘奇算法, 1275). ↩