Don’t try to follow Kaavya Valiveti on social media. That’s not where she lives. UC Berkeley’s top graduating senior feels most at home at a chalkboard solving linear algebra problems.

Picture Matt Damon in the movie, Good Will Hunting or Russell Crowe in A Beautiful Mind, except that this math prodigy is breaking gender barriers in a male-dominated field.

Her natural tendency is to shun the spotlight — though that’s about to change.

“I’m still that nerdy, geeky kid that I was in school living inside my own imagination, but I’m coming out my shell,” says Valiveti, 21, winner of the campus’s coveted University Medal, which recognizes outstanding scholarship, public service and strength of character.

An existential crisis in high school in Fremont, California, among other things, brought Valiveti to Berkeley in 2012 where she found her raison d’etre and expanded her universe.

In addition to her math smarts, Valiveti is being honored for her near-perfect GPA of 3.99, musical virtuosity (she plays the harmonium and cello) and tutoring of disadvantaged Latino students.

As the University Medalist, she will receive a $2,500 award and address thousands of her peers Saturday, May 14, at a commencement ceremony at Memorial Stadium.

Destined for math greatness

After graduation, Valiveti is headed to the Massachusetts Institute of Technology for a Ph.D. in math on a National Science Foundation graduate research fellowship and a Norman Levinson Fellowship.

“Kaavya dreams of making contributions to mathematical physics, and I am confident she will make new discoveries that will garner world attention,” UC Berkeley math professor Jenny Harrison wrote in her letter recommending Valiveti for the University Medal.

As one of those rare millennials who shies away from social media – she won’t even let her friends post videos of her performing music – Valiveti shudders at the prospect of making a commencement speech.

That said, she hopes to convey to her peers how her passion for math helped her overcome her personal struggles and assert herself as a woman in science, technology, engineering and math (STEM).

“Gender bias is big in STEM,” says Valiveti, who became used to being the only woman on teams of math majors in summer research programs at Kent State and Cornell universities.

Among other UC Berkeley faculty mentors, she credits Harrison for championing women in math, a field that is not always welcoming to women.

“One problem is keeping young women in STEM once they express interest. Not enough is done to cultivate an atmosphere where they can freely share their thoughts,” she says. “That’s one area where I hope to become a role model.”

A childhood in suburban Dallas

Born in Ottawa, Canada, in 1995, Valiveti is the daughter of Radhakrishna, an electrical engineer and Natana, a financial planner, musician and artist, both from south India.

When she was 3, the family moved to Allen, Texas, a middle-class suburb of Dallas. Much of their time together revolved around a shared love of academics, Indian classical music and culture, which gave her a strong sense of belonging.

Playdates, sleepovers, and trips to the mall with her school cohort were not a big part of Valiveti’s social life. Her older brother, Kashyap, was the more outgoing of the two.

“I was this quiet, shy kid who came from a culture that was completely foreign to my classmates,” Valiveti says. “I didn’t have a lot of friends and so I had to prove myself in other ways.”

She learned to play the cello, and dreamed about performing on stage solo. Math and science came more easily to her than the language arts, though she enjoyed reading mysteries and Harry Potter books.

When she was 12, her father went to work for a Sunnyvale-based fiber optics company and the family moved to Fremont, California. At Hopkins Junior High, she found herself in a more familiar, ethnically diverse environment.

High school existential crisis

“It was much easier for me to relate to my classmates,” says Valiveti. “They were more interested in academics. Their parents were more like mine.”

But the transition in 9th grade to Mission San Jose High School — recently ranked the 6th best high school in California by UC News and World Report — was a rocky one.

What she felt was not your “typical teen anxiety” due to academic pressures, she recalls, but an identity crisis that made her question everything she had been aiming for.

“I went through some nihilistic phases,” she said. “Finding the motivation to do things was really challenging.”

One coping mechanism, she recalls, was obsessively watching hours of professional tennis on TV.

In 2012, like many of her school friends, Valiveti enrolled at UC Berkeley. Her brother had already graduated from Berkeley in engineering so she was familiar with the campus.

First, she considered majoring in applied math, but when she took Harrison’s honors linear algebra class in her sophomore year, she was hooked on pure math, and went on to study abstract algebra, classical geometries, combinatorics and topology. By her senior year, she was surpassing all expectations.

Saved by linear algebra

“She was working on the same level as top second-year graduate students on material close to the research frontier,” wrote UC Berkeley math professor Marc Rieffel about her performance in his graduate course on “Banach Algebras.”

By then, Valiveti had already co-authored an acclaimed research paper during a summer research program at Kent State University on Lie algebra theory, a discipline that studies symmetry from an algebraic perspective.

This year, she received an honorable mention for the Alice T. Schafer Prize, which is awarded by the Association for Women in Mathematics to the most outstanding U.S. female math undergraduate.

Just as importantly, Valiveti’s immersion in the universe of pure math made her forget the depression and anxiety that had dogged her through high school.

“With every step I took deeper into the realm of mathematics, and with every difficult problem I could solve, I was rebuilding my confidence and spirit, and thereby taking a step away from my anxieties,” Valiveti wrote in her essay bid to be the Medalist.

When she wasn’t attending her Berkeley classes, Valiveti played the harmonium at classical Indian music concerts. She also volunteered with the Bay Area Hispano Institute for Advancement in an after-school literacy program for Latino grade schoolers in Oakland and Berkeley.

Plus, she raised money to improve Sri Ramakrishna Vidyalaya Matriculation School, an underfunded rural elementary school in Trichy, India.

“Increasing access to education for underprivileged children, and improving it, is just as important to me as my work in mathematics,” Valiveti says.

A happier, bolder future

One thing she’ll miss in graduate school on the East Coast is Berkeley’s genuine make-a-difference ethos: “Not a lot of colleges are as socially conscious as Berkeley,” she says.

That said, she looks forward to learning from MIT’s “masters of the material” and delving even deeper into pure math.

“So much of math is appreciating the beauty of abstract ideas that answer philosophical questions,” Valiveti says. “It can reveal the greater mysteries about our universe.”

Her brother Kashyap, the engineer, likes to tease her when she waxes lyrical about math: “He tells me, ‘You can live in your abstract spaces while we build the world around you.’”

And she has no snappy comeback: “It’s true, and I’m fine with that,” she says, a happier, bolder version of her high-school self.

“But it’s not enough to just be logical,” she says. “You have to be creative. You have to have new ideas. And that’s what math gives me.”