Alicia Nash, who studied physics in the 1950s and worked in computer science at a time when few women entered the profession, once aspired to be the next Madame Curie.

That she did not accomplish that goal didn’t seem to matter to her. What did was the well-being of her son and her husband.

The stabilizing force behind John F. Nash Jr., the mathematician and Nobel laureate who was plagued by schizophrenia for a number of years, Mrs. Nash died May 23 along with her husband when the taxi in which they were riding crashed in New Jersey. She was 82. He was 86.

The couple, and their complex life together — they were married, divorced and then married again — was the subject of a best-selling biography by Sylvia Nasar, “A Beautiful Mind,” in 1998. The book was made into an Oscar-winning film three years later. Jennifer Connelly, who won the Academy Award for best supporting actress, and Russell Crowe, who was nominated for best actor, played the Nashes.

Although the movie was criticized for glossing over some of the facts of the couple’s life, its power and poignancy derived in no small part from its accurate depiction of Alicia Nash’s devotion to her husband.

John and Alicia Nash arrive at the Academy Awards ceremony in 2001. The Nobel laureate’s struggle with schizophrenia was chronicled in the 2001 film “A Beautiful Mind,” which won four Oscars including best picture. (Laura Rauch/AP)

In 1959, they had been married barely two years when Mrs. Nash, pregnant with their only child, was forced to involuntarily commit her husband, in the throes of paranoid schizophrenic delusions at the time, to a private psychiatric facility outside Boston.

What followed was nearly a decade of hospitalizations during which time Mrs. Nash, raising a child on her own, decided to divorce her husband in 1963, though she remained his stalwart supporter.

When Dr. Nash was discharged from another institution in 1970, and despite the dissolution of their marriage, she felt his mental health would best be served if he became a boarder at her house in Princeton, N.J. Continuity and familiarity, she understood, were critical to his stability.

“They say that a lot of people are left on the back wards of mental institutions,” Mrs. Nash once said. “And somehow their few chances to get out go by, and they just end up there. So, that was one of the reasons I said, ‘Well, I can put you up.’ ”

It was an offer that many people later said saved Dr. Nash’s life.

Mrs. Nash was born Alicia ­Lopez-Harrison de Lardé on Jan. 1, 1933, in San Salvador. Her prominent, upper-class family included her father, a physician, and an aunt, the poet Alicia Lardé de Venturino.

By 1945, the family had immigrated to the United States, first living in Biloxi, Miss., and later in New York City, where the young de Larde attended the private Marymount School in Manhattan.

She did well enough over the next four years to earn a coveted spot at the Massachusetts Institute of Technology, one of only 16 women among about 800 men in the class of 1955.

Although MIT had been coed since 1871, it was an inhospitable place for women in the 1950s. Even the university’s supervisor for female undergraduates, Margaret Alvord, did not support the presence of women on campus. In 1956, she wrote that her doubts about whether women belonged at MIT had “grown into a certainty that they do not,” as there was “little in the records of the girls . . . to justify their continuance.”

The petite, stylish student from Central America failed to wilt under the pressure. On the first day of her course in advanced calculus for engineers, taught by Dr. Nash, she really did reopen the windows of the stuffy classroom after he had just closed them because of outside noise, a scene described in Nasar’s biography and depicted in the film.

Smitten by the tall, fair-haired professor she said looked like Rock Hudson, she signed up for a job in MIT’s music library because Nash was often seen there. “He was very, very good looking, very intelligent,” she later told Nasar. “It was a little bit of a hero-worship thing.”

Only after she graduated with a degree in physics, however, did the two begin to date. They married two years later, and they soon had a son, also named John.

While Dr. Nash continued to try to teach at MIT throughout his early illness, Mrs. Nash found work with RCA as an aerospace engineer, a job she lost after corporate cutbacks.

Long settled in Princeton Junction, N.J., Mrs. Nash worked as a computer programmer for New Jersey Transit for many years. Her son received a PhD in mathematics from Rutgers University in New Jersey and briefly taught, but his own schizophrenia forced him to return home, where he continued to live. Meanwhile, her former husband shared the Nobel Prize in economics in 1994 for his work on game theory.

Alicia Nash remarried her ex-husband in 2001. After her retirement from the state’s public transportation corporation, they devoted a lot of their time to mental health issues. In 2005, she received the Luminary Award from the National Alliance for Research on Schizophrenia and Depression (now called the Brain and Behavior Research Foundation).

“In the mental health field, John and Alicia are very much heroes because they were really one of the first public figures who would lend their stature and put their name to the cause of breaking down stereotypes and humanizing people with mental illness,” Debra Wentz, a mental health lobbyist, told the Newark Star-Ledger in 2009.

But her greatest worry was also her son. “When I am gone, will Johnny be living in the street?” she told the newspaper.

During her most difficult times, Mrs. Nash said, she tried to remain positive by not feeling pity for herself. It was, to those who knew her, an extraordinary gift, and to those who needed her most, a blessing. As Nasar wrote, “It was part of John Nash’s genius to choose a woman who would prove so essential to his survival.”

An earlier version of this article misspelled the name of MIT’s supervisor for female undergraduates. She was Margaret Alvord, not Margaret Alvort.