Maryam Mirzakhani, the first woman and first Iranian to win the Fields Medal, often described as the rough equivalent of a Nobel prize for mathematicians, died of metastatic breast cancer on July 14* at the age of 40. She had been a professor at Stanford University since 2008.

The loss feels personal to many women in mathematics. “My mailbox is full of messages from other women,” says Ingrid Daubechies, a math professor at Duke University. “Women mathematicians all over the world are e-mailing each other, trying to comfort each other. It is heartbreaking that we had to lose a gifted mathematician and wonderful role model so soon.”

Born in Tehran, Mirzakhani studied mathematics at Sharif University of Technology there before coming to the U.S. to get a PhD at Harvard University in 2004. As she told Quanta Magazine in 2014, she did not grow up wanting to become a mathematician. As a child, she loved to read and make up stories and thought she might be a writer. But despite some discouraging classes in middle school, she eventually discovered a passion for mathematics and proved brilliant at it.

Mirzakhani worked on a variety of problems related to hyperbolic geometry, which describes surfaces that are curved like a Pringles potato chip or the curly ends of a leaf of kale. Unlike chips or vegetables, however, these surfaces close up like donuts, usually with multiple holes. If that is hard to visualize, there’s good reason: The surfaces Mirzakhani studied were not bound by the constraints of the real world.

Mathematicians often understand these surfaces by studying curves that sit on them. Simple loops are a particularly important class of such curves. (In this context “simple” refers to a loop that does not intersect itself.) In her thesis Mirzakhani solved a problem that sounds straightforward but which is actually extremely difficult to answer: On a given hyperbolic surface, how many simple loops are there of less than a given length?

Her thesis advisor, Curtis McMullen, a mathematics professor at Harvard, recalls that a few weeks after finding a solution she came to him with a surprising announcement, she had used her work to find a new proof of the Witten conjecture, an important result in string theory.

More recently, she had, along with University of Chicago mathematician Alex Eskin and University of California, San Diego, mathematician Amir Mohammadi, written monumental papers culminating in a “magic wand” theorem, not about individual hyperbolic surfaces but about whole spaces of them. This work has applications to the classical physics problem of understanding the motion of a billiard ball as it bounces around a polygonal table.

When people talk about Mirzakhani’s work, they often use terms that seem dissonant: ambitious and humble; fearless and down-to-earth. Mirzakhani sometimes described herself as slow, but that should probably be taken with a grain of salt. She was an outstanding competitor in the International Mathematical Olympiad, earning a gold medal both years she competed for Iran’s national team, along with a perfect score the second year. Competitions such as the IMO tend to reward quick problem-solving, a skill that doesn’t always lead to a successful research career in a field that requires long-term planning and perseverance. “Maryam was one of the rare mathematicians who combined outstanding problem solving skills with the insight and curiosity of a mature scientist,” McMullen says.

Perhaps “deep” would be a better word than “slow.” She was not satisfied with gleaning just enough understanding to make an argument work. She wanted to understand everything at a deep level, to probe every nook and cranny of whatever mathematical wonderland she was exploring. “She would immerse herself in this world. Then, when she had thoroughly acquainted herself with it, she could start to address the challenges,” McMullen says. “I think that’s what she meant by being slow.” Where some mathematicians see a direct route to a proof and push toward it through any difficulties, Mirzakhani could often find ways to work around obstacles by looking at things differently.

This approach, along with her intellectual courage, meant she had a strong vision for future work in her area of math. Alex Wright, a mathematician at Stanford, had been working with Mirzakhani for several years at the time of her death. Their collaboration began when he was a graduate student and she invited him to speak in a seminar. “It was remarkable how much time she spent with me and how accessible I found her to work with,” he says. “I was amazed at how deeply she had thought about the area. What I realized was that she was okay with thinking about something for years without any certainty that it would be possible to figure it out,” Wright says. “Essentially, I’ve been working on her vision ever since that visit.”

Mirzakhani has already made an impact in her field, and it is sure to grow as her work is more fully digested by other researchers. “Her work opens new frontiers of research that are just starting to be explored,” McMullen says. “She approached new mathematics with fearless ambition.” She wanted to know what was next, where the field was going. Her incisive questions shaped the field as well, and will continue to shape it.

Mirzakhani was not the first outstanding woman mathematician, but she was the first, and so far only, to be recognized with the Fields, which, unlike the annual Nobel, is awarded only once every four years and only to mathematicians 40 years old or younger. Up to four mathematicians receive the prize in any award year. “It was bound to happen,” says Daubechies, who served as president of the International Mathematical Union, the organization that awards the Fields Medal, from 2011 to 2014. She was the first woman to lead the IMU. “There are excellent young women mathematicians. Many times they have been on the short, short list, but it had so far not happened. I was very, very happy that it happened on my watch.”

Just getting to the International Congress of Mathematicians in Seoul where the award was presented was a challenge for Mirzakhani. Although she kept it private at the time, she was in the midst of her first bout with cancer. “We were so happy that we managed to make it possible for her to come,” Daubechies says. Mirzakhani’s cancer eventually recurred, and despite aggressive treatment, it metastasized to her liver and bones, eventually killing her. She continued to work until shortly before her death, and her colleagues say she approached her illness both realistically and with hope.

Mirzakhani is survived by family members including her husband Jan Vondrák and their daughter Anahita.

*Stanford originally reported, incorrectly, that Mirzakhani died on June 15. They have corrected that date, and as a result, so have we.