# Why are squares magical?

**Magical squares** are part of the Art of Magic, which is one of the oldest performing arts in the world. Illusionists entertain audiences by staged tricks In addition they use illusions of seemingly impossible or supernatural feats using natural means.

Presently many of us find Mathematical games intriguing. As we like puzzles, we also enjoy the logic and finding solutions. With the advent of computers there are many mathematical games on-line. Some people have become addicted to them in the hunt for the solution.

Appropriately this app combines magical squares with on line games.

### China’s Magical Squares

Magic squares are an example of a mathematical game which has been known about for over 2 000 years. Nowadays they can be done with pencil and paper or on a computer or mobile device. Interestingly a **magic square** is a grid of numbers where each row and column and diagonal adds up to the same number. Magic squares date back to at least 650 BC in China. At that time they acquired a mythical significance. Works of Art from that period denote them as symbols.

#### The scroll of the river Lo

For example, legends dating from as early as 650 BC tell the story of the Lo Shu or the “scroll of the river Lo”. ^{ }According to the legend, there was at one time in ancient China a huge flood. While the great king Yu was trying to channel the water out to sea, a turtle emerged from it with a curious pattern on its shell. Surprisingly there was a 3×3 grid in which circular dots of numbers were arranged. Strangely the sum of the numbers in each row, column and diagonal was the same: 15. According to the legend, people were able to use this pattern in a certain way to control the river and protect themselves from floods.

The Lo Shu Square, as the magic square on the turtle shell is called, is a magic square of order three. In explanation this means a square of three rows and three columns. Using the numbers one to nine only once, the solution is when the numbers for each row and column add up to 15 as well as adding up to 15 diagonally. In this instance, there is in fact only one solution and you can find it relatively easily by trial and error. Although there are in fact 8 variants, they are symmetrical uses of the same number pattern.

To emphasise, in our TriHex app you can try this out for free with the app totalling the numbers for you as you enter them.

### Islam

Unsurprisingly Islamic mathematicians also knew of magic squares. The first magic squares of orders 5 and 6 are in an encyclopaedia from Baghdad around 983 AD. Logically a magic square of order 5 has five rows and five columns and 6 has six rows and six columns. Earlier Arabic mathematicians knew of simpler magic squares. Arab illusionists and magicians used them to entertain.

### Medieval Europe

Not surprisingly Magic squares are associated with mystery and mythology we see them in European Christianity.

**Albrecht Dürer’s magic square**

Notably another portrayer of a magic square was Albrecht Dürer. Although he was a painter, he was also an engraver of the late 15^{th} and early 16^{th} centuries. At that time his works were renowned throughout Europe and were mainly religious. In one of his engravings *Melancholia *(1514) there is a magic square. It is an order 4 square with four columns and four rows.

Detail of *Melencolia*

Notably, this order-4 magic square is believed to be the first seen in European art. We see the sum 34 in the rows, columns, diagonals, each of the quadrants and the corner squares (of the 4×4 as well as the four contained 3×3 grids). In addition, the sum can also be found in the four outer numbers clockwise from the corners (3+8+14+9). The two numbers in the middle of the bottom row give the date of the engraving 1514. The numbers 1 and 4 at either side of the date correspond to the letter “A” and “D”, which are the initials of the artist

**Sagrada Família magic square**

Famously The Basilica of the Holy Family is a large Roman Catholic Church in Barcelona, designed by Catalan Spanish architect Antoni Gaudí (1852–1926). Gaudí’s work on the building is part of a UNESCO World Heritage Site. The architect Francisco Paula de Villar began Construction of Sagrada Família in 1882 with Gaudí becoming involved in 1883.

Although Gaudí devoted his last years to the project, at the time of his death at age 73 in 1926, less than a quarter of the project was complete. It is still not finished today. The Basilica has three facades. One of these and the first to be completed is the façade of the birth of Christ. Leif and I visited Barcelona and the Sagrada Familia in 2007 and found the basilica awe inspiring and still unfinished. The interior of the church was amazing with columns and ceilings taking on the natural look of trees growing and plants.

##### The facade of suffering

At that time the second façade looked much more modern than the first. It is the façade of the Passion or Suffering and although Gaudi designed it, it was completed long after his death.

As it was still not complete in 1988, the authorities gave the task of creating sculptures for this facade to the Josep Maria Subirachs . Naturally he worked on the basis of Gaudí’s preserved drawings. Understandingly this began with the crucifixion in 1989. At a scene with three levels of images the sculptor shows the story of the Suffering. We see from the last Supper to the death of Jesus. Subirachs gave a riddle to the viewer to solve, a magic square. Its sum always is 33 – the age of Jesus at his death. Structurally, it is very similar to the Melancholia magic square. However it has had the numbers in four of the cells reduced by 1.

In fact when I visited the basilica I knew nothing of magic squares and did not notice it. The third façade is under construction. This is the façade of Salvation. It is hoped to be completed by 2026 one hundred years after Gaudi died after being knocked down by a tram.

The four x four Magic Square has a fundamental set of 220 squares which means 220 solutions are possible. Four different squares can be produced from each fundamental square by switching rows and columns.

#### On our app “TriHex” you can try to solve the 4×4 magic square with or without hints. Give it a go! The app is called TriHex but all that is talked about in this blog are magic squares. Magic Hexagons are also there but that is a story for another blog.