A 1954 painting by Salvador Dalí features a mysterious, four-dimensional ‘hypercube’. Fiona Macdonald finds out how maths fascinated the great Spanish painter.

When mathematician Thomas Banchoff received a message in 1975 asking him to contact Salvador Dalí, his colleague told him: “It’s either a hoax or a law suit.” Yet it turned out to be the start of a collaboration that lasted almost a decade. Each year, Dalí visited New York and called on the Brown University professor for advice, setting him challenges for artworks that he hoped one day to complete – including a statue of a horse made up of three parts that were kilometres apart.

The Spanish artist had long found inspiration in science. He wrote in his 1958 Anti-Matter Manifesto: “In the Surrealist period I wanted to create the iconography of the interior world and the world of the marvellous, of my father Freud… Today the exterior world and that of physics, has transcended the one of psychology. My father today is Dr Heisenberg.”

There are no nails in this image of crucifixion, and the cross is not made of wood. It’s not even in a dimension we can see.

Although Dalí continued to explore ideas of theoretical physics until his death in 1989, arguably the greatest expression of his scientific curiosity came in the form of a 1954 painting. Hovering eerily in the air above a figure modelled by Dalí’s wife Gala, Jesus Christ appears in a pose that has been painted by artists for centuries. Yet there are no nails in this image of crucifixion, and the cross is not made of wood. It’s not even in a dimension we can see.

Crucifixion (Corpus Hypercubus) unites a classical portrayal of Christ with a shape that only exists in mathematical theory. Dalí’s floating cross is what Banchoff describes as “an unfolded four-dimensional cube”. In a 2012 lecture given at the Dalí Museum, Banchoff explains how the artist was trying to use “something from a three-dimensional world and take it beyond… The exercise of the whole thing was to do two perspectives at once – two superimposed crosses.”

Sculptures of the mind

Just as the sides of a cube can be unfolded into six squares, a tesseract – or four-dimensional cube – can be unfolded into eight cubes. While it’s difficult to grasp, the idea of multiple dimensions allows scientists to envisage shapes that mathematician Marcus du Sautoy calls “sculptures of the mind”. As he argues in his Radio 3 programme The Secret Mathematician, “It’s not possible to see a 4D cube in our limited 3D universe, but there are different ways to imagine one.”

It’s not possible to see a 4D cube in our limited 3D universe, but there are different ways to imagine one. – Marcus du Sautoy

Dalí’s own ‘sculpture of the mind’ brings geometry into the realm of the metaphysical. “There is a meditative intensity to Crucifixion (Corpus Hypercubus),” says art critic and poet Kelly Grovier. “The painting seems to have cracked the link between the spirituality of Christ's salvation and the materiality of geometric and physical forces. It appears to bridge the divide that many feel separates science from religion.”

By breaking out of three dimensions, the artist could find new meaning in a traditional biblical scene, argues du Sautoy. “The idea of the fourth dimension existing beyond our material world resonated for Dalí with the spiritual world transcending our physical universe.”

The shape of things to come

A fourth dimension in art seemed for many a natural development. In his 1936 Dimensionist Manifesto, Hungarian poet and art theorist Charles Tamkó Sirató claimed that artistic evolution had led to “Literature leaving the line and entering the plane… Painting leaving the plane and entering space… [And] sculpture stepping out of closed, immobile forms.” Next, Sirató said, there would be “the artistic conquest of four-dimensional space, which to date has been completely art-free”.

Cubists like Pablo Picasso had already attempted to represent four-dimensional shapes on the two-dimensional canvas, excited by the theories of 19th-Century mathematicians Bernhard Riemann and Henri Poincaré. Yet Dalí looked further back for inspiration, describing his painting as “metaphysical, transcendent cubism”. He claimed that Crucifixion (Corpus Hypercubus) was influenced by a 13th-Century mystic and a 16th-Century architect. “It is based entirely on the Treatise on Cubic Form by Juan de Herrera, Philip II’s architect, builder of the Escorial Palace; it is a treatise inspired by Ars Magna of the Catalonian philosopher and alchemist, Raymond Lull.”

I said: ‘That’s it. That’s the 4D unfolded cross. That’s the Corpus Hypercubus.’ – Thomas Banchoff

According to Banchoff, “Lull was a Catalonian who studied two dimensions; two centuries later Herrera took that to the third dimension. Here’s Dalí in a direct line, taking it up to the fourth dimension.” The Brown University professor can also see a link between Dalí’s hypercube and drawings of crosses made by those studying perspective in the 18th Century, such as the French astronomer Edme-Sebastien Jeaurat. When Jeaurat and others were drawing these shapes in 1750, says Banchoff, they “were not thinking of it as an unfolded four-dimensional cube – that came one or two centuries later”.

Yet Banchoff recognised the shape as soon as he saw Jeaurat’s sketches. “I said: ‘That’s it. That’s the 4D unfolded cross. That’s the Corpus Hypercubus.’” Dalí was able to enter the fourth dimension with the help of astronomers and mystics as well as mathematicians.

And he brought with him the fears of his age. “Corpus Hypercubus was not an easy problem to solve,” says Banchoff. “It took him four years… before he was satisfied with the painting.” Crucifixion (Corpus Hypercubus) was completed in 1954: the year Cern in Geneva was founded. “Cold War fears of nuclear annihilation were accelerating,” says Grovier. “Atomic structure, in other words, was on everyone's mind and how tampering with such mysteries might bring about either our destruction or survival.”

For Dalí, geometry could be a route to eternal salvation. “In Dalí’s work, atomism and science appear to be the very fabric on which redemption and salvation are stitched,” says Grovier. “The tesseractic crucifix would seem to extend beyond the dimensions of this world into planes unknown.”

It’s something the artist himself acknowledged. As he said in The Dalí Dimension, “Thinkers and literati can’t give me anything. Scientists give me everything, even the immortality of the soul.”

If you would like to comment on this story or anything else you have seen on BBC Culture, head over to our Facebook page or message us on Twitter.

And if you liked this story, sign up for the weekly bbc.com features newsletter, called “If You Only Read 6 Things This Week”. A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.