Mirzakhani' friend Firouz Naderi announced her death on Saturday on Instagram, and her relatives confirmed the death to the Mehr agency in Iran.
"A light was turned off today. It breaks my heart ..... gone far too soon," wrote Naderi, a former director of Solar Systems Exploration at NASA.
"A genius? Yes. But also a daughter, a mother and a wife," he added in a subsequent post.
Mirzakhani, a professor at Stanford University in California, died after the cancer she had been battling for four years spread to her bone marrow, Iranian media said.
In 2014 Mirzakhani won the Fields Medal, the equivalent of the Nobel Prize for Mathematics, which is awarded by the International Congress of Mathematicians.
The award recognized her sophisticated and highly original contributions to the fields of geometry and dynamical systems, particularly in understanding the symmetry of curved surfaces such as spheres.
Born in 1977 and raised in Tehran, Mirzakhani initially dreamed of becoming a writer, but by the time she started high school her affinity for solving mathematical problems and working on proofs had shifted her sights.
"It is fun -- it's like solving a puzzle or connecting the dots in a detective case," she said when she won the Fields Medal.
"I felt that this was something I could do, and I wanted to pursue this path."
Mirzakhani said she enjoyed pure mathematics because of the elegance and longevity of the questions she studies.
"It is like being lost in a jungle and trying to use all the knowledge that you can gather to come up with some new tricks, and with some luck you might find a way out," she added.
- "Great sorrow" -
In Iran, President Hassan Rouhani said that Mirzakhani's "doleful passing" has caused "great sorrow," state media reported.
Rouhani praised the "unprecedented brilliance of this creative scientist and modest human being, who made Iran's name resonate in the world's scientific forums, (and) was a turning point in showing the great will of Iranian women and young people on the path towards reaching the peaks of glory...in various international arenas."
Separately on Instagram, Iranian Foreign Minister Mohammad Javad Zarif said that Mirzakhani's death is a cause for grief for all Iranians.
Mirzakhani became known on the international mathematics scene as a teenager, winning gold medals at both the 1994 and 1995 International Math Olympiads -- and finished with a perfect score in the latter competition.
She went on to win the 2009 Blumenthal Award for the Advancement of Research in Pure Mathematics, and the 2013 Satter Prize of the American Mathematical Society.
Mirzakhani studied mathematics in Iran and earned a PhD degree from Harvard in 2004. She then taught at Princeton University before moving to Stanford in 2008.
The Fields Medal, which she won in 2014, is given out every four years, often to multiple winners aged 40 or younger.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.