The cause was breast cancer, said Stanford University, where she was a professor. The university did not say where she died.
Her death is "a big loss and shock to the mathematical community worldwide," said Peter C. Sarnak, a mathematician at Princeton University and the Institute for Advanced Study.
The Fields Medal, established in 1936, is often described as the Nobel Prize of mathematics. But unlike the Nobels, the Fields are bestowed only on people aged 40 or younger, not just to honor their accomplishments but also to predict future mathematical triumphs. The Fields are awarded every four years, with up to four mathematicians chosen at a time.
"She was in the midst of doing fantastic work," Dr. Sarnak said. "Not only did she solve many problems; in solving problems, she developed tools that are now the bread and butter of people working in the field."
Dr. Mirzakhani was one of four Fields winners in 2014, at the International Congress of Mathematicians in South Korea. Until then, all 52 recipients had been men. She was also the only Iranian ever to win the award.
President Hassan Rouhani of Iran released a statement expressing "great grief and sorrow."
He wrote, "The unparalleled excellence of the creative scientist and humble person that echoed Iran's name in scientific circles around the world was a turning point in introducing Iranian women and youth on their way to conquer the summits of pride and various international stages."
Dr. Mirzakhani's mathematics looked at the interplay of dynamics and geometry, in some ways a more complicated version of billiards, with balls bouncing from one side to another of a rectangular billiards table eternally.
A ball's path can sometimes be a repeating pattern. A simple example is a ball that hits a side at a right angle. It would then bounce back and forth in a line forever, never moving to any other part of the table. But if a ball bounced at an angle, its trajectory would be more intricate, often covering the entire table.
"You want to see the trajectory of the ball,"Dr. Mirzakhani explained in a video produced by the Simons Foundation and the International Mathematical Union to profile the 2014 Fields winners. "Would it cover all your billiard table? Can you find closed billiards paths? And interestingly enough, this is an open question in general."
In work with Alex Eskin of the University of Chicago, Dr. Mirzakhani examined billiards tables of more complicated shapes, and in fact considered the dynamics of balls bouncing around all possible tables that fit certain criteria.
It was a challenging problem that had been attacked by many prominent mathematicians. That included Curtis T. McMullen, her thesis adviser at Harvard and also a Fields medalist, who had solved a special case. But no one had a good idea of the path toward a more encompassing solution.
Amie Wilkinson, a mathematics professor at the University of Chicago, recalled sitting in on a meeting with Dr. Mirzakhani and Dr. Eskin. Whereas Dr. Eskin tended to be pessimistic, seeing all the potential pitfalls that could scuttle a proof, Dr. Mirzakhani was the opposite.
"Just pushing and pushing and pushing," Dr. Wilkinson said. "Completely optimistic the whole time.''
After a decade of work, Dr. Mirzakhani and Dr. Eskin proved not the original problem that they had set out to solve but a slightly different one.
"When these trajectories unwind," Dr. Wilkinson said, "they reveal deep properties about numbers and geometry."
Dr. Sarnak said that though Dr. Mirzakhani wrote relatively few papers, she was still a game changer. "I'm sure in the long run, she would have had many more of these decisive papers,"he said.
In addition to being mathematically talented, "she was a person who thought deeply from the ground up,"he said.
"That's always the mark of someone who makes a permanent contribution,"he added.
In an interview in 2014 with Quanta Magazine, published by the Simons Foundation, Dr. Mirzakhani, who described herself as a "slow"mathematician, acknowledged her tendency to take the harder path.
"You have to ignore low-hanging fruit, which is a little tricky," she said. "I'm not sure if it's the best way of doing things, actually --you're torturing yourself along the way."
Maryam Mirzakhani was born on May 3, 1977, in Tehran. As a child, she read voraciously and wanted to become a writer. Iran was at war with Iraq at the time, but the war ended as she entered middle school.
"I think I was the lucky generation,"she said in the Fields video, "because I was a teenager when things became more stable."
In high school, she was a member of the Iranian team at the International Mathematical Olympiad. She won a gold medal in the olympiad in 1994, and the next year won another gold medal, with a perfect score.
After completing a bachelor's degree at Sharif University of Technology in Tehran in 1999, she attended graduate school at Harvard, completing her doctorate in 2004. She then became a professor at Princeton before moving to Stanford in 2008.
Survivors include her husband, Jan Vondrák, who is also a mathematics professor at Stanford, and a daughter, Anahita.
Dr. Mirzakhani often dived into her math research by doodling on vast pieces of paper sprawled on the floor, with equations at the edges. Her daughter described it as "painting."
"It is like being lost in a jungle," Dr. Mirzakhani said, "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."
By KENNETH CHANG
Published: July 16, 2017 © New York Times