While the ancient Greek mathematician Pythagoras is often credited with creating the first proof for what's since become known as the Pythagorean theorem, there's increasing evidence that this clever bit of math has been used for millennia by cultures all around the world.

According to the authors of the new book, "Megalith: Studies in Stone," Stonehenge and other Neolithic sites were created using complex geometry that at some point became lost to the ages.

"People often think of our ancestors as rough cavemen but they were also sophisticated astronomers," contributor and editor John Matineau told The Telegraph. "They were applying Pythagorean geometry over 2,000 years before Pythagoras was born."

The theorem, memorized by countless generations of students, states that the square of the hypotenuse of a right-angled triangle (a² + b² = c²) is equal to the sum of the squares of the other two sides. In addition to applications in both surveying and navigation, it's also commonly used in construction to make sure that foundations and walls are kept square.

Crowds greeting the summer solstice at Stonehenge in the U.K. Crowds greeting the summer solstice at Stonehenge in the U.K. (Photo: Stonehenge Stone Circle/flickr)

In "Megalith," the authors explain how one of Stonehenge's earliest incarnations, dating back to 2750 BC, contains a rectangle of sandstone blocks that split in half diagonally form a perfect Pythagorean triangle of 5:12:13. Other ancient sites, such as the inner ring of the Druid Temple in Inverness and Woodhenge, have also been found to contain Pythagorean triangles.

"We see triangles and double squares used which are simple versions of pythagorean geometry," added Matineau. "And then we have this synthesis on different sites of solar and lunar numbers."

A 3D rendering of Stonehenge's design. A 3D rendering of Stonehenge's design. (Photo: Joseph Lertola)

Evidence that the Pythagorean theorem was in use long before the Greek philosopher stumbled upon it in the 6th century BC has also been discovered in civilizations in India, China and the Babylonian Empire. According to author and megalithic expert Robin Heath, the application of such advanced geometry in creating sites like Stonehenge chips away at the stereotypes associated with ancient peoples.

"People see the Neolithic builders of Stonehenge as howling barbarians when they were very learned and it has been forgotten," he told The Telegraph.

Michael d'Estries ( @michaeldestries ) covers science, technology, art, and the beautiful, unusual corners of our incredible world.