MILTON — No one was standing in front of an eighth-grade math class at St. Mary of the Hills School, but fractions were slowly appearing in colored chalk, as if written by the invisible hand of a ghost. The voice of an unseen narrator emanated from speakers on both sides of the smartboard, explaining the equation step by step.

While students sat quietly in their seats, listening to this virtual instructor solve the math problem, their real-life math teacher, Marianne Ruggiero, walked around the classroom with her arms folded, peering down at them as they scribbled notes with pencils into spiral-bound notebooks and tapped the keyboards of laptop computers.

Next, the students began working on problems themselves. With a few touches on her iPad screen, Ruggiero checked how students were doing on a particular problem and spotted who was struggling.

The math lesson that the students were watching on the smartboard was an online video that served as a virtual teaching assistant, allowing Ruggiero to monitor students’ classwork more closely, and provide one-on-one help if needed.

Scenes like this are becoming more common in classrooms across Massachusetts, as schools incorporate online learning into their curriculums. In 2010-2011, 48 percent of school districts reported having at least one student taking an online course, according to the Massachusetts Department of Elementary and Secondary Education.

Wendy Maeda/Globe Staff

Teacher Marianne Ruggiero helped eighth grader Maire Flynn during a math class at St. Mary of the Hills School in Milton.

The videos shown at St. Mary’s are produced by Khan Academy, a nonprofit organization based in Mountain View, Calif., that produces learning tools that are free for anyone to use. While it is unclear how many schools in Massachusetts are using these videos, Khan Academy estimates that its website received more than 280,000 visits from Massachusetts users from mid-September to mid-October.

Khan Academy lessons are “designed to allow the teachers to do more teaching,” said St. Mary’s advancement director, Brett Marcotte, who is overseeing implementation of the videos at her school and Quincy Catholic Academy. “They’re able to get a quicker assessment of where kids are. It also frees them up. Instead of standing at the front of the room lecturing, this way allows students and teachers to interact on a daily basis,” Marcotte said.

Online educational tools are not a silver-bullet solution and do not necessarily work well for every student, cautioned Anne Hird, a professor at Bridgewater State University, where she coordinates its instruction technology program, and the author of “Learning from Cyber-Savvy Students: How Internet-Age Kids Impact Classroom Teaching.”

Online learning resources such as Khan Academy “require a fair amount of discipline, self-motivation, and organization . . . if that is not there, the online learning is likely to fail,” she said.

“I think they offer a very good service. But the bottom line is . . . what matters the most is the instructor,” Hird said. “The individual teacher is absolutely key to how any of these resources are used and how effective they are for students.”

To bring the Khan videos into their classrooms, St. Mary’s and Quincy Catholic Academy were recently awarded a grant from the Lynch Foundation. The grant paid for principals and teachers from both schools to travel to California for training, and bought 175 Google Chromebook laptop computers for students to use in class.

Ruggiero now uses Khan Academy videos in her math classes about twice a week.

Each student gets an account on Khan’s website. After school, they can log in from anywhere that has Internet access, and watch math videos or do practice exercises.

Students earn “energy points” and “badges” by watching videos and spending time on exercises.

Wendy Maeda/Globe Staff

An eighth grader worked on multiplying mixed numbers during a math class.

The more time and effort they put into the lessons, the more points they earn.

“It’s exciting for them,” Ruggiero said.

It’s exciting for the teachers, too.

Ruggiero can see exactly how much time her students spent on the math problems at home. The color-coded graphs and charts show her how many students grasped a certain skill, and how many got stuck. She can see how many videos they have watched in class and how many they have viewed at home. Their progress can be tracked over time.

Unlike the days of yore, students do not have to wait for days for their homework or test to be corrected by the teacher and handed back. They find out instantly how they did. And so does the teacher.

With a few taps on her iPad, Rug­giero said, “I can pull up any student I want and know exactly where they are.”

When it comes to accessing real-time statistics, she said, “I’m just giddy.”

Alenah Garcia, an eighth-grader from Randolph, has enjoyed using the Khan lessons during the first month of school.

“Last year, I did not like math at all,” she said.

Garcia said she understands math concepts more easily when she views the tutorials.

“If you don’t get something, you can keep watching the video until you get it,” she said.

Now, when she solves problems correctly and gets high scores on her first try, she said, “it’s fun.”

Sometimes, when the bell rings, Ruggiero said, students linger to work on more problems, and “I have to fight to get them out of the room.”

At St. Mary’s, Khan Academy lessons are being used by grades 5 through 8, and administrators are considering adding it to the fourth grade.

Quincy Catholic Academy started out using the videos in grade 5 and 7 math classes this fall, and because it has been received so well, the school has expanded their use to grades 6 and 8.

Eighth graders worked on multiplying mixed numbers during a math class at St. Mary of the Hills School in Milton.

The approach of showing videos during class time and encouraging students to do some work online at home is an example of what educators call “blended learning.”

Khan Academy started a pilot program in 2010 with a few classrooms in the San Francisco area, and has partnered with about 15 additional school districts since then. Khan estimates that thousands of schools are using its free resources.

The Massachusetts education agency does not track exactly how many schools are using online resources.

One of the most common providers of online education in the state is the VHS Collaborative (formerly known as Virtual High School Global Consortium), which is headquartered in Maynard and has been around since 1996.

Education department spokesman J.C. Considine said about 202 schools (representing 64 percent of the state’s middle and high schools) had more than 6,200 students participate in VHS online courses during the 2011-2012 school year.

“Blending learning still appears to be sporadic and more common in districts that prioritize investing in technology to achieve more digital resources and more personalized learning for students,” he said.

Lisa Fasano, the principal at St. Mary’s, said she is enthusiastic about using Khan Academy for math, but also tempers the expectations for this new teaching tool.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.