The Mathematical Secrets Hidden at the Heart of Barcelona’s Sagrada Família

Yves here. I visited the Sagrada Familia only once, but was luck enough to go on a Sunday morning when it was not too crowded. If I lived in Barcelona, I would make a point of visiting from time to time. It is such a terrific building.

By Sergi Muria Maldonado, Professor de Didàctica de les Matemàtiques, Universitat de Barcelona; Anton Aubanell Pou, Professor de l’Institut de Formació Continuada i professor jubilat de Didàctica de les Matemàtiques, Universitat de Barcelona; and Jordi Font González, Professor de Didàctica de les Matemàtiques, Universitat de Barcelona. Originally published at The Conversation

2026 marks 100 years since the death of Antoni Gaudí, the architect of the Basilica of the Sagrada Família in Barcelona. While the temple’s beauty is extraordinary in its own right, it becomes even more profound when we explore the numerical forms that lie behind its striking forms.

By contemplating the mathematical principles that underpin its structure, the visual harmony of the whole takes on a new dimension, endowing it with a renewed functionality, balance and coherence.

Mathematician Claudi Alsina i Català deeply studied the mathematics of the Sagrada Família. He undertook his initial studies in this field at the University of Barcelona, and supervised the doctoral thesis of Jordi Faulí, the architect currently in charge of the temple’s ongoing construction.

In his memoirs, Alsina stated:

Many had wondered whether the design of the Sagrada Família contained some module or system of proportions that guided the building’s metric relationships. (…) One Saturday afternoon, sitting at my desk at home, with all the data and documents on this mysterious proportional system – if indeed it existed – I discovered it. The 7.5-metre module and the ratios between the divisors of 12 (1:4, 1:3, 1:2, 3:4, 2:3, 1) seemed to explain a great deal.

12: The Magic Number

It is no surprise that the number 12 plays a prominent role in the structure of the church. Gaudí conceived the Sagrada Família as a synthesis of architecture and religious symbolism, and the number 12 features heavily in the Bible: Jacob’s 12 sons, the 12 tribes of Israel, the 12 apostles and the crown of 12 stars in the Book of Revelation are just a few examples.

But its significance is not merely symbolic. From a mathematical point of view, 12 is a number particularly well-suited to establishing proportions, as it has many divisors. According to Alsina, the relationships between these divisors account for much of the basilica’s proportional system.

The 7.5-Metre Module

Drawing on Alsina’s work, we invite you to take a brief mathematical tour of the Sagrada Família.

The temple’s dimensions are based on the number 12 and a module of 7.5m. It is 90m long (7.5 × 12) and 60m wide (7.5 × 8). The width of the main nave is 45m (7.5 × 6).

In terms of height, the highest vault is that of the apse, at 75m (7.5 × 10), followed by the vault of the transept at 60 metres (7.5 × 8). The nave vault is 45m high (7.5 × 6), the side aisle 30m (7.5 × 4), and the choir 15m (7.5 × 2).

The Tower of Jesus Christ is the central and tallest of the cathedral. It stands at 172.5 metres (7.5 x 23), close to the height of the landmark hill of Montjuïc. It is crowned by a four-armed cross, 17m high and 13.5m wide. Surrounding this are the four Evangelist Spires, which reach a height of 135m (7.5 x 18).

The Star of the Virgin Mary sits atop the tower of the same name. Canaan, CC BY

The 138-metre high Tower of the Virgin Mary is the second tallest in the basilica. It is crowned by a 12-pointed star, which rests on three supporting arms. This star has a diameter of 7.5m, and is made up of a regular dodecahedron, with pyramid-shaped pentagonal points rising from each face. Its reflections of daylight and night-time illumination lend this star a unique beauty.

Polyhedral Towers

Polyhedrons also feature prominently in the towers of the Sagrada Família. The four towers of the Glory façade are topped by dodecahedrons, the four towers of the Nativity façade by truncated irregular octahedrons, and the four towers of the Passion façade by truncated cubes.

On each of the 12 towers, a spire rises above these polyhedrons. Those dedicated to the evangelists are crowned with regular icosahedrons containing spotlights that illuminate the large cross that sits atop the Tower of Jesus Christ. Just above each icosahedron is a sculpture that symbolically depicts each evangelist. There are numerous star-shaped polyhedrons throughout the church, particularly on the Nativity façade.

A Forest of Towers

Catenary arches feature prominently as key structural elements of the church, as they are a highly effective way to transfer loads to the ground without the need for additional support. They can be seen in the system of sloping columns that support the vaults of the interior naves, the vaults and ceilings themselves, and the Nativity façade.

Inside the Sagrada Família, there are four different types of column. All are double-helix torsion columns – each has a rounded, star-shaped polygonal base, and is formed by the intersection of two opposing Solomonic columns. Above each one is a knot from which different branches emerge, similar to those of a tree, which very efficiently support the towers and the roof of the church.

The skylights in the roof are also one-sheet hyperboloids. Made up of straight lines, they are easy to construct, and optimise the capture and projection of light.

The Symbolism of 7 and 33

The church has other deeply symbolic hidden features. Take, for instance, the canopy above the high altar, which forms a regular heptagon 5 metres in diameter, whose seven sides symbolise the seven gifts of the Holy Spirit.

On the left, Melancholia I by Albrecht Dürer, with a numerical grid visble in the top right-hand corner. On the right, the magic square designed by the sculptor Josep Maria Subirachs. Jordi Domènech/Wikimedia Commons/, CC BY-SA

On the Passion façade there is a magic square in which the sum of all rows, columns and diagonals is 33. It appears to be inspired by the magic square featured in the engraving Melancholia I by Albrecht Dürer.

The mathematics that underpins the Sagrada Família makes it all the more beautiful. While the building itself is a sight to behold, a deeper understanding of the principles behind it inspires even greater admiration for the enduring genius of Antoni Gaudí.

Print Friendly, PDF & Email

24 comments

  1. Ignacio

    Music is also about maths if you wish. The Sagrada Familia is an inspiring magnet and here we have the effect it had in Alan Parsons Project’s Sagrada Familia. The magic of numbers one can say. Barcelona merits a visit for several things but the Sagrada Familia stands as a solid reason by itself. Then go and enjoy superb cuisine in one of the most “edible” cities on earth. Oh, and I was born in “rival” Madrid.

    Reply
  2. DJG, Reality Czar

    I believe that I read in Robert Hughes’s book Barcelona about the catenary arch and its extensive use in Catalunya. It is a motif in Catalan architecture: “Catenary arches feature prominently as key structural elements of the church, as they are a highly effective way to transfer loads to the ground without the need for additional support.”

    The use of these relations and groups — 4, 7, 12 — isn’t unique to the Sagrada Familia. These relations and placements and numbers are a constant in Catholic churches. In some respects, it has to do with the church as a building that tells a story. Very little is randomly placed in a Catholic church. The congregation meets the stories through the visual field. (Thinking of the glorious double church of Saint Francis in Assisi… or of the purpose of the iconostasis in an Orthodox church.)

    Gaudì is also hearkening back to the Middle Ages, where number mysticism was contemplated a great deal. And number mysticism goes back to Pythagoras and earlier.

    Plutarch on the E (eta) at Delphi, which is associated with the number 5.

    https://penelope.uchicago.edu/misctracts/plutarche.html

    And of course the Holy Family is a trinity.

    As is the godhead in Catholicism — except that Roman religion had the Capitoline Trinity and the Archaic Trinity. And trinitarianism still perplexes our Muslim brethren and sistren.

    And to second Ignacio the Castilian above: Ahhhh, Barcelona. One eats so well in Barcelona. (That’s kinduva holy idea, too, pà amb tomàquet.)

    Reply
    1. AG

      So when done properly eventually all this would feed back into an actual effect and material architectural sense. So mysticism it may be been wrapped into but it was science in the end.

      Reply
  3. dandyandy

    Interesting set of thoughts here.

    What some folks may find interesting is Gaudi’s structural engineering model of the building which is on display in Sagrada Familia.

    Gaudi made an inverted model of his building where he hung various weights on strings (corresponding to scaled weights of intended building elements), and connected them into the geometry he was trying to achieve. Then gravity did its magic and brought his weighted model into an equilibrium thus giving him natural angles of inclinations of columns etc. All the strings were in pure tension of course and this meant that when his model became inverted and built in real-life materials (ie. masonry), all the columns (inverts of strings) acted principally in pure compression and therefore allowed him to use the cross sections of greatest slenderness and achieve the elegance he was after.

    Great Architect, Gaudi.

    Reply
  4. AG

    I haven´t been to Barcelona so I cannot judge for myself, but I know people who can´t stand Gaudi. Same goes for Bauhaus…

    Reply
    1. Carolinian

      I have been there and loved the style but one suspects as with other ‘buildings as art’ styles it must have been tricky to build.

      Reply
      1. AG

        ‘buildings as art’

        In Germany there used to be the differentiation of “Architektur” vs. “Baukunst”. Latter term appears to be one of those terms that exist only in a certain language, literally meaning “art of building”.

        Baukunst basically is the original term used for architecture over centuries when architecture was still engineering, still rooted in the social and political fabric of European civilization, was still craft not brand and thus not “style” or “art” as opposed to craft.

        This changed in the 19th century. They both switched places: Architektur became the household term for the serious and Baukunst for the fringe, meaningless, only surface. I assume this developed around the time when details on buildings turned into ornaments and were only “ornamental” but not “useful” any more. See also “style vs. function” argument especially in design of the 20th century.

        I do have my doubts over Gaudi. But being older I am not going to lay out a judgement over Gaudi from far away based merely on the few pictures that I know and above all not having experienced the space in person.

        I do not know since when architects were building not only with regard to the community around the location but with tourism and visual media in mind.

        Reply
    2. lyman alpha blob

      I’ve never been either and the basilica and architect are both new to me. I quite like the more modern twist on the Gothic style, but I can see why some would find Gaudi gaudy.

      Reply
      1. Carolinian

        The visual extravagance is the point. For a church it says “this is not about materialism.” For a fancy apartment building it says “we are rich enough to build this.”

        Our own F.L. Wright built buildings that were often not very practical while pretending to be (famous leaky roof quote by owner: “this is what happens when you leave a work of art out in the rain”). They just finished fixing Fallingwater yet again.

        Reply
        1. AG

          “leaky roof”
          (am surprised to read this about Wright who I always assumed more serious on these “banal” subjects which would go beyond the immediate appearance.)

          Funny because: E.g. same is true for Le Corbusier´s Villa Savoye in Poissy, outside Paris (1931).

          The museum which it is today has the letters exchanged between the wife of the owner, Mme. Savoye, and Le Corbusier´s office after the family moved into the place which he had built for them. Naturally Mme Savoye in those years had to live in there mostly and dealing with the problems. The husband usually absent.

          It had all kinds of deficiencies leaky roof being one. Le Corbusier which becomes clear from reading the exchange couldn´t care less. He tried to ignore the problems that arose from daily use. He obviously planned to move on to “more significant tasks”.

          If it hadn´t been for André Malraux French would have torn the whole thing down after the war. So much about national legends, treasures and traditions…

          Reply
          1. Carolinian

            You may not be familiar with Tom Wolfe’s From Bauhaus to Our House where he blames America’s boxy skyscrapers on you Germans and their followers. He said Bauhaus flat roof buildings always had leaky roofs.

            Here in my Carolina town the 50s/60s public buildings were influenced by then popular International Style. The main library built in that period had a flat leaky roof and the replacement some blocks away–built in the 90s–also has a leaky roof.

            Those decades ago buildings were charmless and their replacements of the current period are even worse by adding some token retro ornamentation. Onto that 90s library they have added a planetarium clad in–wait for it–faux aluminum.

            Reply
            1. AG

              Indeed I am not. So thanks for the recommendation!
              I do not mean to condemn Bauhaus at large. But in Germany there must be some campaign or hgher interest considering how much Bauhaus has been pushed in public in the past 20 years compared to other architectural styles and movements.

              Reply
        2. Sub-Boreal

          My favourite anecdote about a Canadian starchitect who designed bespoke houses as well as large public projects: a former landlord of mine who was a specialty building contractor said that there were lots of other guys like him in his city who had done one of these houses and would never touch another job designed by ***. He said that the plans were full of “feet with 13 inches”; the plans for the house that he did do were stamped with all kinds of legal language absolving the designer of responsibility for any shortcomings; the plan didn’t include a connection from the 2nd floor bathroom to the sewer; the reflecting pool that surrounded the house on 3 sides required a sump pump to be running constantly or the basement would flood etc. etc.

          Reply
    3. BillS

      I seem to remember George Orwell making the comment in his Homage to Catalonia that the Republicans in the Spanish Civil War should have blown it up, as it was so ugly.

      Reply
      1. St Jacques

        His anarchist mates must have agreed, they destroyed all of Guadi’s plans and models and set fire to the crypt and were clearly intent on destroying the building as then existed. Since then, there have been endless, often heated debates about how to proceed and about the results and what Guadi really intended. However, I think Gaudi would have approved, because a good old fashioned medieval cathedral was never the work of a solitary “genius” and as a devout Catholic, Guadi saw his work as part of that tradition. .

        Reply
  5. Trees&Trunks

    Given that it seems to never be completed, I guess the only math you need for understanding this construction place is plus (for the contractors) and minus (for tax payers).

    Reply
  6. dandyandy

    From Gaudi’s grandiose and most beautiful cathedral, a step down in size to a smaller but still most beautiful, chapel.

    Reply
  7. AG

    2 fb-posts by Archinerds:

    1)
    Secretariat Building, Le Corbusier, Chandigarh, India, 1958
    image:
    https://x.com/archinerds/status/1667892704070467584

    “The immense horizontal scale of this modernist fortress completely redefines the concept of civic architecture. Standing as a massive concrete monolith against the flat horizon, the building contains hundreds of offices organized within a strict geometric envelope. The architect masterfully varied the rhythm of the facade grids, breaking the monotony of the large surface by introducing a dynamic pattern of shadows. This structural depth ensures that the interior spaces remain cool and shaded throughout the day without relying on artificial mechanical cooling systems. The raw texture of the exposed concrete showcases the intense physical labor that went into constructing this new capital city. Would you find it inspiring to work inside a monumental administrative structure with such a bold tectonic character?
    Secretariat Building, Le Corbusier, Chandigarh, India, 1958.”

    2)
    Marriott Marquis Hotel, John Portman, Atlanta, USA, 1985
    image:
    https://x.com/archinerds/status/2013995511171182808

    “The belly of the beast
    On December 29, 2017 we lost John Portman. He was the architect who exploded the box of the modern hotel.
    The Marriott Marquis in Atlanta is his boldest statement. Standing in the lobby feels like staring into the ribcage of a giant concrete whale. The 47 story atrium creates a dizzying vertical city where elevators glide like capsules through open air.
    Portman proved that concrete could be hypnotic. He did not just design a lobby. He designed awe.
    Marriott Marquis Hotel, John Portman, Atlanta, USA, 1985, photo Manuela Martin.”

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *