Montreal teacher Eugen Pascu compares learning math to driving a car. First, you've got to memorize the rules of the road. Then you've got to apply them if you want to get behind the wheel and actually move the car.

The philosophy was on display in a Montreal classroom this week as a 15-year-old boy struggled to calculate the length of the side of a triangle. The pupil knew the theories; he just needed to put them into practice. It took 15 minutes and some good-natured chiding from the teacher, but he figured it out.

"You need to learn formulas," the affable Mr. Pascu said afterward, "but you also have to understand how they work. Learn the rules, then see how the rules work."

The lessons in Mr. Pascu's classroom at École Secondaire Mont-Royal should be of keen interest to the rest of Canada. Last year, 100 per cent of Mr. Pascu's students passed their province-wide math exams.

At a time when most Canadian students' math scores are falling in OECD rankings, Quebec students are ahead of the pack. Students there placed sixth worldwide in new results released this week, putting the province on a par with Japan and Macau and maintaining a strong provincial showing from previous global evaluations.

What makes Quebec the nation's star math pupil? Surprisingly, few studies compare why students in Canada have such different math scores, equivalent to almost a year of learning between Quebec and Prince Edward Island, the lowest-rated province. But researchers have started focusing on Quebec's intensive teacher training and curriculum, which balances traditional math drills with problem-solving approaches. Montreal's McGill University is taking part in a study on math teaching across Canada, and early findings suggest Quebec's four-year math-teacher course may be a model to emulate.

"We don't start out with students who are any more brilliant than others in Canada," said Annie Savard, a McGill professor of math education who is part of the national research team.

In Quebec, grade-school math teachers must take as many as 225 hours of university courses in math education; in some Canadian jurisdictions, the number can be as low as 39, Prof. Savard says.

"For me, it's clear that while my colleagues [outside Quebec] do a great job, the system means they are at a disadvantage," she said. "It's a different philosophy. When someone does something longer, their performance is going to be better."

People on their way to becoming math teachers also do plenty of field work, watching and doing hands-on teaching while still in university. By the time they graduate and head into classrooms, they have done a minimum of 700 hours of in-class internships, Prof. Savard says.

Quebec is also known to give math teachers at all levels a high degree of specialization. Some go through an entire 45-hour university course to learn to teach geometry to children in elementary school. High-school training is even more rigorous. Montreal math teacher Jessica Doré Da Costa took an exhaustive course on initiation to algebra for secondary-school students at university.

"It was ultra-specific and helped me when I was teaching," said Ms. Doré Da Costa, 25. "I knew what to expect. I knew what's hard for the student. I think students like math. Teaching is about explaining and simplifying it for them."

Quebec favours a form of "discovery learning" meant to encourage kids to learn concepts by solving problems rather than memorizing rules and equations. In theory, at least, it is supposed to take pupils beyond rote learning to understand how to use the rules, so that when the day comes that they have to choose between two different sizes of pizza at varying prices, they will know which is a better deal.

The approach is coming under growing criticism for failing to teach kids how to add; it has its detractors in Quebec, too. But while Quebec adopted the method during major educational reforms in the early 2000s, the approach was already in the works as early as the 1980s, which may have given the province the benefit of a longer lead in implementing it, says Stéphane Cyr, a math education professor of the Université du Québec à Montréal.

Yet the province has not entirely abandoned the kind of rote memorization that was once a staple of childhood. Quebec's curriculum calls for kids to learn their multiplication and division tables by heart starting in Grade 3.

To Prof. Cyr, Quebec may also have benefited by taking its inspirations from different sources. He says Quebec's high number of bilingual researchers turned to both French-speaking Europe and the United States for math-teaching techniques. The French have a very theoretical approach, while the Americans have tended to favour basic problem-solving to address economic issues, he says.

"We're astride both worlds and took the best of both of them," he said. "We took the pragmatic approach of the Americans and more conceptual approach of the French."

Changes along Quebec's lines might be in store for other provinces. In Ontario, the length of teacher's college will double from one year to two in September, 2015. As long as education remains solely a provincial responsibility, best practices will be slow to percolate through the system.

Whatever the approach, something clicked in Mr. Pascu's math class in Room 113 on a grey and drizzly morning this week. The teacher used humour, encouragement and a deep well of enthusiasm to lead his class through a tough algebra and geometry problem. Researchers may never find the precise answer to why classes like these are helping Quebec outperform the rest of Canada in math, but at least Mr. Pascu's students seem to be having fun trying.

"I didn't used to really like math," Yana Zakutaylo, a shy 15-year-old, said when class was out. "But Mr. Pascu makes jokes and helps us understand. He makes me feel like working harder. I like math now."

Short of a magic formula, sentiments like hers may hold the answer to improved math scores in any classroom.