For the first time, scientists have managed to reproduce the chemical processes that build those awesome geometric columns out of volcanic rock – one famous example being the Giant's Causeway on the coast of Northern Ireland.

The polygonal columns form as hot magma cools and contracts into rock, but up until now it hasn't been clear where that temperature threshold is. Exactly when does the shift from molten liquid to fractured rock start happening?

Now a team from the University of Liverpool in the UK thinks it has the answer: between 840 and 890 degrees Celsius (1,544 and 1,634 degrees Fahrenheit). That's just below the point where magma crystallises into basalt rock, about 980 degrees Celsius (or 1,796 degrees Fahrenheit).

"The temperature at which magma cools to form these columnar joints is a question that has fascinated the world of geology for a very long time," says one of the researchers, volcanologist Yan Lavallée.

"We have been wanting to know whether the temperature of the lava that causes the fractures was hot, warm or cold. Now, with this study, we have found that the answer is hot, but after it solidified."

To reach that conclusion, the scientists used basaltic columns extracted from the Eyjafjallajökull volcano in Iceland. Gripped in a clamp, the samples were heated to more than 1,000 degrees Celsius (1,832 degrees Fahrenheit) before being allowed to cool into lava.

By noting when the rock started fracturing, the scientists now have a good idea of how hot the rock at the Giant's Causeway was when it began to split into such incredible shapes, some 50-60 million years ago.

Similar sites can be found in Iceland and the United States, and we've even spotted the same kind of feature on Mars. Different cooling rates and other variables can produce columns of different sizes and shapes.

"These experiments were technically very challenging, but they clearly demonstrate the power and significance of thermal contraction on the evolution of cooling rocks and the development of fractures," says one of the team, Anthony Lamur.

According to the traditional tale of the origins of the Giant's Causeway, the giant Finn MacCool built the path to take on a rival from Scotland – but now we have some solid new information about the scientific explanation.

Besides answering a long-standing question about how these rocky wonders formed, the research can teach experts more about how heat moves through the surface of Earth, and how geothermal energy extraction can be made more efficient.

As the scientists point out, drilling down to significant depths to tap into geothermal energy sources means you need to know exactly where the hot spots are and how the magma is behaving – rock fractures are bad news if you've got a pipe running through the same area.

"Fluid flow controls heat transfer in volcanic systems, which can be harnessed for geothermal energy production," says one of the researchers, Jackie Kendrick.

"So the findings have tremendous applications for both volcanology and geothermal research."

The research has been published in Nature Communications.