Educators continue to be perplexed by the ongoing gender gap in mathematics. Young women tend to perform less well than men on high-level math tests, which discourages them from pursuing further study in the science or technology fields.

This has been explained in part by deep-grained sexist attitudes, including parents' tendency to teach numerical concepts to their sons rather than their daughters. But new research from Israel points to a more immediate trigger that can impede the progress of frustrated females.

It finds women did less well on a math test if they had just been exposed to appreciative remarks regarding their looks.

"Appearance compliments have immediate detrimental effects on individual women's performances," concludes a research team led by psychologist Rotem Kahalon of Tel Aviv University.

While such remarks are "seemingly trivial and possibly well-intentioned," the researchers write, they "subtly reinforce women's traditional role as sex objects," triggering the competence-sapping stereotype effect.

In the Psychology of Women Quarterly, Kahalon and her colleagues describe two studies that demonstrate this effect. The first featured 88 female university students, one-third of whom "were asked to recall and write about a situation in which a man complimented them on their looks."

Another third wrote about a time "when they had received a compliment about their competence, skills or intelligence" from a man. (Both directives specified that the man in question was not an intimate partner.) The final third did not write an essay.

Afterwards, all took a short math test, "similar to the math section of the Graduate Record Examination." They were given 15 minutes to answer 19 multiple-choice questions; the researchers call the exam's difficulty level "relatively high."

The results: Those who had been complimented on their appearance "tended to perform worse" than those in the other two groups. The researchers report this effect was especially strong among those who "were chronically preoccupied with their physical appearance."

The second study featured 73 women and 75 men — again, all university undergraduates. They began by filling out a standard resume template, in which they provided information on their education and work experience. "They also added a photograph of themselves that represented the way they 'would show up at a job interview,'" the researchers write.

One week later, participants came to the lab to receive feedback about their resume. For half of them, this included the statement, "I can see from your picture that your look is very presentable, and looking good is an advantage in the employment market." After reading this material, they took that same difficult math test.

The researchers report receiving that blandly worded, not-particularly provocative compliment "impaired participants' math performance, regardless of their gender." So men, too, were thrown by the unexpected focus on their looks.

But the researchers note that such unsolicited comments "occur far more frequently among women than among men," given that "Western societies place enormous value on women's physical attractiveness." Therefore, women are far more likely to experience this performance-hindering effect.

Kahalon and her colleagues hope their findings raise awareness about the potential negative consequences of such compliments, especially in "cognitively demanding environments." So if someone in math class catches your eye, forgo the flirting until the last calculation has been completed.

This story originally appeared as Compliment a woman's looks, lower her math score on Pacific Standard, an editorial partner site. Subscribe to the magazine's newsletter and follow Pacific Standard on Twitter to support journalism in the public interest.