What’s the deal with Anna Karenina? The tormented woman in Tolstoy’s classic novel abandons her beloved son and her dull husband, Karenin, to run off with a dashing cavalry officer. Then she turns against him, too, feeling abandoned and unloved. Does she have a personality disorder? Is she bipolar? Or just insecure?

Knightley — herself an intriguing combination of elegant beauty, cloaked in a velvety red shift, and salty tongue — plays Anna in Joe Wright’s elegant new adaptation of the 19th-century novel. A veteran actor at only 27, she has learned to take press questions seriously, even the odd ones, and when she stops to consider the psychology of her performance, she finds an answer.

“I went with a deeply hormonal vibe,” she says. “Because she’s pregnant. I thought, ‘Why have her and Karenin have only one son? Was the first pregnancy incredibly difficult? Was it postnatal depression?’ There’s nothing in the book.”

Anna Karenina, a special presentation at the Toronto International Film Festival this past September, has inspired several movies, most famously a 1935 melodrama with Greta Garbo. But Wright’s version, based on a script by Tom Stoppard, is highly stylized. It’s set in a theatre where the characters act out their tragedy, moving in and out of wooden sets and clearly artificial backgrounds. At a grand ball, the dancers all freeze as Anna and her lover-to-be, Vronsky (Aaron Taylor-Johnson), waltz into danger. A train to Moscow is a snow-covered model.

The artifice was developed by Wright, who first planned to take the cast to St. Petersburg for location shooting. Then he had the inspiration to set the whole movie in an imagined world that reflected the Russia of the time.

“There was this whole idea of Russian aristocrats in the 17th and 18th century who couldn’t even talk Russian,” Knightley says. “They talked French or Italian. Their food, and etiquette were all French. They had secret ‘Russian rooms’ that only family members could get into.”

This idea of the hidden self, of people always playing characters, became part of her performance. “She plays the perfect wife and perfect mother, and occasionally the perfect lover, but constantly there’s this spirit, this thing that she might call a demon that she can’t repress.”

It calls for heightened emotion because of the design of the film. Knightley recalls being called by Wright after he thought of the idea of a stylized Anna Karenina. She walked into his office to find the walls covered with drawings of theatre. “And I went, ‘Oh f–k.’ ”

But she trusts Wright, with whom she has now worked three times, following Pride & Prejudice, which won her an Oscar nomination, and Atonement. Wright refuses to call Knightley his muse — “my wife is my muse,” he says — but rather a valuable creative colleague.

“We’re two dyslexics trying to figure out if we’re as stupid as everyone says we are,” is how he puts it.

“Stupid” isn’t the first word that comes to mind. The cast, which includes Jude Law as Karenin, spent weeks in rehearsal, breaking down the book and the characters, trying to find the heart of this self-destructive woman.

“She’s such a strange character,” Knightley says. She first read the book at 18 and remembered it as a “beautiful sweeping romance.” Then she read it again last year, and thought, “Jesus Christ, this is not at all what I remember. Because she’s so open to interpretation, I made up stuff to make sense of her behaviour.

“I don’t like her all the time. I don’t think the point is to like her all the time.”

Knightley believes part of what Anna did came out of a sense of shame.

“I think shame is a deeply difficult thing to live with and I think she breaks her own moral code. What happens to your own perception of yourself when you break your own moral code? You always make yourself into the heroine, but equally you have self-hatred.” Knightly says she was obsessed by two words — “unnatural” and “corrupt” — that Karenin uses against Anna, and that Anna suspects are probably right.

“She is the heroine and the anti-heroine. She is the perfect narcissist. She hates herself and she loves herself.”

She sees Anna as a woman fighting against being alone, although she ends up alone at the end. It’s a notion that is reinforced by the film’s elaborate production design, including lush costumes and veils behind which the character is imprisoned. “A bird caught in the cage,” Knightley says. Her jewels were all diamonds, “the most cut of stones.” The only coloured gem is a ruby, which is blood red.

It’s a love story, but it’s a complicated one. “Romance is such a small part,” Knightley says. “The companionship, the friendship, the sex. But there’s also the madness, the loneliness, the jealousy, the neurosis. And it’s very rarely looked at in its entirety. And I think this book does that.

“It’s a punch to the stomach, this book. This thing. That’s what this film does. It’s looking at love in quite a harsh light.”