An enchanting part of Gaudi’s Sagrada Familia church in Barcelona is the beautiful door in the nativity facade. I was walking through it when I saw the beetle in the featured photo. I was drawn instantly into this magical world.

The Family and I stood in front of the doors looking at the flowers and insects visible in the profusion of verdigris ridden green leaves. What a beautiful vision, and such pleasant technicalities. The selective oxidation of different metals is used to create a wonderfully muted polychrome.

The press of crowds made it difficult to step back to take a photo of the doors. I managed to get the half that you can see in the photo above. It was designed and executed by Etsuro Sotoo, a Japanese sculptor who has spent a large part of his working life in bringing Gaudi’s vision for the church to life.

I wandered through the Sagrada Familia in a daze until I came to the western facade and its Magic Square (see the grid of numbers in the featured photo). The facade is called the Passion Facade because it depicts the crucifixion and resurrection of Christ: the events are called the Passion of Christ in Christian dogma.

Work on this facade began in 1954, after Gaudi’s death, but followed his plans. The sculptures were made by Josep Maria Subirachs starting in 1984. I thought that the sculptures looked unlike the rest of the church, and found later that there is indeed a bit of controversy related to the look of the facade. When Subirachs took the commission, he insisted that he should be allowed artistic freedom, and not be forced to follow Gaudi’s designs slavishly. So, I wonder whether the magic square behind the sculpture of the Kiss of Judas is Subirachs’ or Gaudi’s.

A magic square is a square filled with numbers such that each row, each column, and the two diagonals all sum to the same number. In this square the sum is 33, which is the age that Christ was supposed to be during the events portrayed in this facade.

A magic square may (or may not) have other characteristics. One that people often insist on is that the numbers used be consecutive, starting from 1, and that no number be used more than once. This convention is clearly violated by the Passion Square, since 12 and 16 are missing and 10 and 14 are repeated.

This magic square has other magical properties. The square can be divided into four 2×2 squares, by a horizontal and a vertical line bisecting each side (the upper-left square has the numbers 1, 14, 11, and 7). The sum of the four numbers in each of these squares is also 33.

The 2×2 square at the center contains the numbers 7, 6, 10, and 10. These also add up to 33. If you take the two numbers above this central square and the two below it, then they also sum to 33. The two numbers to the left of the central square and the two below it also give the same sum.

There is an easier way to think of these two disjoint blocks of numbers. Imagine a large floor tiled with copies of the Passion Square. I’ve tried to show this in the image here: the thin black line marks each copy of the magic square. Mark out on the floor all copies of the central square with the numbers 7, 6, 10, and 10 (I’ve coloured them red in the image on the left). Then you will see that the two numbers above and below the central square also become a 2×2 square, repeated on the tiling (I’ve left them white). Similarly, the disjoint set of 2 pairs of numbers, two to the left and two to the right of the central square also become a single 2×2 square (also white).

When you think in terms of the tiling, then you discover that the corner squares become a single 2×2 square on the tile (the blocks of blue tiles). And, of course, the numbers on the corners of the Passion Square also sum to 33!

The diagonals join blue and red squares. The four numbers along the forward diagonal sum up to 33, as do the backward diagonals. On the tiled floor you discover other diagonals. Of these, only the diagonals removed from the circled ones by two spaces are associated with the same arithmetic magic, ie, they sum to 33. So there is a set of magic diagonals in the coloured squares, and another in the white squares. This is easier to see if you bleach the colours, as I’ve done in the image below. In the resulting chessboard pattern, there is a set of diagonals on coloured squares, and another in the white squares. Both kinds of diagonals are magic. Interestingly, magic squares of this kind are called pandiagonal squares, or, more interestingly, diabolical magic squares.

Finally, the first two numbers in the second row and the first two in the third row also sum to 33, as do the last two numbers in these rows. Shifting down by one row, the first two numbers in the second and fourth rows also add up to 33, as do the last two in these rows. If you try the same thing column-wise, the magic goes away.

Of course I could not have been the first person to discover these marvellous tilings hidden in plain sight. A quick search led me to a paper by two mathematicians from the University of Las Palmas, Jose Pacheco and Isabel Fernandez, who examined these symmetries some time ago. They also refer back to the first (paywalled) description of this square in the mathematical literature in 2001 by Pieter Maritz of the University of Stellenbosch. The symmetries of magic squares was first discussed in the early 20th century.

The beautiful hidden symmetries of the Passion Square open up through the tiling into a beautiful doubled lattice. This can be represented in many ways, and I show one in the image above. This harks back to the Mudejar style of the Spanish churches of the middle ages. Is this Subirachs’ hidden contribution to the Sagrada Familia?

All those who have some interest in Barcelona probably know two names for sure: Lionel Messi and Antoni Gaudi. Messi plays for Barcelona Football Club and Gaudi designed the church of Sagrada Familia. Barcelona FC cannot be seen in action every day, but the Sagrada Familia is open on all days. You need to get a ticket, and then come in the exact 15 minutes that your ticket says you have to enter. After that it is a mad rush through this church. Can you help it?