To this day, mathematics and architecture are close companions. An architect must understand his building materials and environment, and in the modern age such understanding is invariably measured in quantifiable terms. However, ancient structures also deliberately embedded basic mathematical principle into their design: not because they wielded mathematics as a tool within which to shoehorn a building, but because the art of mathematics, like that of astronomy, was seen as an echo of the meaning of the universe. Many ancient languages, such as Hebrew, even doubled mathematical symbols with their written alphabet: resulting in words that would also have numerical significance.

Not coincidentally, many natural geometric principles found in nature also happen to be pleasing to the human eye. Thus, to be aesthetically pleasing, a building often also had to be mathematically beautiful.

Among the best known mathematical relationships used in ancient architecture is the ratio of the golden rectangle, whose length to side is approximately 1 : 1.62 (or phi), as well as its variants, the golden triangle and the golden spiral. Important for ancient architects, the golden rectangle can be created very easily using only a compass and straight line by using the midpoint of a starting square as both defining radius and reference line. Reversed, each part of the spiral obtained from subtracting squares from this quadrilateral shape always creates a new rectangle in the same ratio; while the spiral itself has broad echoes throughout nature from the spiralling petals of a chrysanthemum to the spiral arms of a galaxy. The Acropolis of Athens is built to repeating ratios of the golden rectangle.

The columns of the Acropolis also feature a very subtle and carefully calculated mathematical illusion. In order to appear straight to the viewer, they actually have a subtle bulge built in.

Another common relationship used to cleanly square buildings is the Pythagorean principle of the right triangle: a^2 + b^2 = c^2. Not only did this ratio make it very simple to ensure a true right angle at the corners – very strong in buildings – but this particular ratio of triangle is also pleasing to the human eye. In Islamic architecture, the more common equivalent of the golden rectangle ratio was 1 : square root of 2, another Pythagorean derivative using the two equal 45 degree angles to balance against the right angle.

The ratio of the circumference of the circle to its diameter, or pi, also seems to have been well-known both to the ancient Egyptians, who built it into the Cheops pyramid, and to the much later Pythagorean Greeks to whom it is normally attributed. Pi does not seem, however, to be found among highly civilised cultures such as the Inca who happened never to have invented the wheel. Ancient Indian architecture also aimed to echo divine structure by building around the concept of the mandala, or highly intricate cosmic circle: resulting in tiered architecture in which the full geometric pattern of the mandala can only be seen from above.

While Islamic art and architecture does not permit reproduction of the human figure, what took its place were sweeping ribbed domes, detailed filigrees, and intricate repeating tilework on six- or eight-count tessellating patterns.

A few ancient buildings and other structures were lined up very precisely to coincide with carefully calculated astronomical events. Besides its solstice alignment, the 56 Aubrey Holes of Stonehenge 1 also demarcate what might well have been a predictive lunar calendar.

Finally, Roman architecture emphasised straight lines and long rows or circles of half-circle arches. The Roman road surveys provided the groundwork for much of Europe’s modern highway system, while many constructs such as the old aqueducts remain standing and in use to this day. Here, mathematics for the first time becomes solely a tool of engineering efficiency, echoes of which continue to the modern day.