The 'Beautiful Mind' mathematician who died along with his wife in a car crash last week had told a friend he had discovered a replacement equation for Einstein's theory of relativity just three days earlier.

John Forbes Nash Jr., whose struggle with schizophrenia was chronicled in the 2001 movie A Beautiful Mind starring Russell Crowe, died aged 86 on May 23.

Award-winning mathematician Cédric Villani said Nash had explained the work on Einstein's theory to him three days before his death.

Scroll down for video

Genius: Nash (pictured with his wife) told fellow mathematician Cédric Villani her thought he'd found a replacement for Einstein's theory of relativity

John Nash and wife Alicia Nash (pictured in 2012) were killed in a taxi crash in New Jersey, US on May 23

Nash and his wife Alicia, 82, were killed in a taxi crash in New Jersey in the US last week.

A colleague who had received an award with Nash in Norway earlier in the week said they had just flown home and the couple had taken a cab from the airport.

But now it's been revealed that Nash was on the brink of making a ground-breaking discovery.

Villani told The Times: 'He explained it to me. He thought he had discovered a replacement for the equation.'

He also said Nash claimed his replacement would help further explain quantum gravity.

Einstein's theory of relativity, published in the early 20th century, explains that what we perceive as gravity arises from the curvature of space and time.

Award-winning mathematician Cédric Villani (right) said Nash had explained the work on Einstein's theory to him three days before he died

Known as brilliant and eccentric, Nash was associated with Princeton University for many years, most recently serving as a senior research mathematician.

He won the Nobel Prize in economics in 1994 for his work in game theory, which offered insight into the dynamics of human rivalry. It is considered one of the most influential ideas of the 20th century.

Just a few days ago, Nash had received a prize from the Norwegian Academy of Sciences and Letters in Oslo.

In addition to the Nobel, Nash won the John von Neumann Theory Prize (1978) and the American Mathematical Society's Steele Prize for a Seminal Contribution to Research (1999).