(CNN) -- Danica McKellar is most famous for portraying Winnie Cooper, the childhood sweetheart of series protagonist Kevin Arnold on "The Wonder Years."
Fame came to the actress rather early, but rather than succumb to the negative pitfalls to which many child actors fall prey, McKellar found her saving grace in mathematics. She is so passionate about math, she has just released her third book on the subject, "Hot X: Algebra Exposed."
McKellar approaches the often-terrifying subject of algebra in a playful manner that aims to make math fun while using effective lessons.
"Hot X" is a follow-up to McKellar's earlier books, "Kiss My Math: Showing Pre-Algebra Who's Boss" and "Math Doesn't Suck: How to Survive Middle School Math Without Losing Your Mind or Breaking a Nail."
Besides her undying love for math, McKellar said she was inspired by her belief that young woman don't have to conform to stereotypes -- especially when it comes to looks -- and that society places damaging limitations on girls at a young age.
"There are stereotypes that have been out there for a long time that tell girls that their main asset, the main thing that they are valued for, is their appearance and also that it's to the exclusion of anything else," she said.
"So if you're beautiful, you're led to believe that you can't also be smart," McKellar said. "When girls are growing up, they often feel like they have to choose between the two. They see beautiful models in magazines, TV and movies and decide: 'That's what I want to be ... so I guess that means that I'm not smart.' I've done a lot of surveys and interacted with a lot of students, and I was shocked to see that at 12 years old, girls are already talking about dumbing themselves down."
McKellar said she wants the stereotypes diminished and added that "you can be fun and fit and social and be really smart. And the smarter you are, the more capable you'll be to handle whatever challenges come up in any of those areas or any other area of life."
But the actress is by no means trying to convert girls into math devotees.
Rather, she sees solving math problems as excellent confidence-builders.
"My goal is to have the girls get through their math classes and then have the confidence that comes from feeling smart and knowing you can do it," she said. "Math is like going to the gym for your brain. It sharpens your mind."
McKellar's shot at fame on "The Wonder Years" almost didn't happen. She and her sister, Crystal, were both up for the Winnie role.
"I was a pretty new actress at the time, and our mom kept us really grounded," the actress-turned-math wiz recalled. "She didn't even want us to go out for series regulars. And in fact, Winnie Cooper was just a one-time guest role in the first episode. That's the only reason we got to audition. She wouldn't have let us go otherwise."
Although McKellar landed the role, the producers liked Crystal so much that they cast her as Kevin Arnold's archnemesis, Becky Slater, in a nine-episode arc.
Although McKellar earned top marks in high school math, even acing Advanced Placement calculus, she didn't begin taking the subject seriously until her college studies at the University of California, Los Angeles, where she experienced a post-"Wonder Years" identity crisis.
"My plan was to be a film major," she said. "But that was the time when I was really struggling with my identity because 'The Wonder Years' had just ended and everyone still called me Winnie Cooper, and I sort of thought that when the show ended, that everyone else would move on, too, and of course that didn't happen. And I needed to know that I was valued for something other than my Hollywood persona. Math did that for me."
McKellar earned a summa cum laude degree in mathematics and contributed to the creation of the Chayes-McKellar-Winn theorem.
Her next writing ventures will probably be about geometry, followed by pre-calculus. And when she's exhausted writing at that level, she expects to pursue graduate studies in mathematics. After all, she openly admits to reading her old textbooks on complex analysis for fun.
McKellar said she is still in touch with her "Wonder Years" castmates. Fred Savage, who played Kevin Arnold, was thrilled to learn that she and her husband, musician Mike Verta, are expecting their first child in September and offered kind words. "He said he knows I'm going to be a great mom and that he's always known that. He's a dad, and he loves it."
McKellar dashed any hopes of the beloved series, which has a bit of a cult following, being released on DVD anytime soon.
"Music rights," she said, explaining that the series music was licensed only for TV and syndication runs, and that the producers wouldn't dream of replacing the songs with cheaper generic tunes. "It's simply too expensive."
Although mommy duties are certain to dominate her time come September ("Soon, I will be going into the black hole of 24-hour breastfeeding"), McKellar will continue acting. Recent roles include guest appearances on "The Big Bang Theory" and "How I Met Your Mother."
Her own cartoon series, "Young Justice," is set to debut this fall on Cartoon Network, which like CNN is owned by Time Warner. McKellar also did voiceover work in a few episodes of "Generator X," which features Savage as a regular.
In the meantime, McKellar said, she will continue to relay her message to women of all ages: "You can absolutely be anything you want to be. Smart is sexy."