The movie opens with Catherine (Gwyneth Paltrow) talking to her father Robert (Anthony Hopkins) after he startles her watching TV in the middle of the night. He gives her a bottle of champagne for her birthday, which she starts drinking from the bottle, commenting on how bad it is. They chat for a while about the nature of insanity and how he is crazy, but then she challenges his admission that he is crazy, pointing out that he had just admitted that the nature of insanity is that you can't acknowledge your own insanity. He reminds her that he's not just crazy he died last week and his funeral is tomorrow.
Awoken from this dream, Catherine realizes that there is someone still upstairs -- Hal (Jake Gyllenhaal), a former student of Robert's. Robert was a professor in the University of Chicago's math department and Hal is a fledgling mathematician, struggling to advance in the field with any sort of developments of his own. In his younger years, Robert had made many advances in mathematics, revolutionizing the field twice before 22, and is quite famous and well regarded for it, but struggled with mental illness for the last 20+ years of his life.
Catherine asks him why he is still there and he confesses that he thinks that somewhere in Robert's books of notes there has to be additional products of his mathematical genius. Catherine asks him what there has been in the notes he's made it through. Hal confirms that it was gibberish, but tells her that it would make a career for someone to find even a fraction of the advances Robert made in his early to mid twenties. She asks if he is trying to steal her father's work, and he says that, no, he would credit the discovery to her father. She demands to see his backpack and pulls it off of his back, dumping it out while trying to find any of her father's belongings. Nothing found, she apologizes and he gets ready to leave. As he's walking out the door she picks up his folded up coat from a chair, thinking he is forgetting the garment, but a notebook falls out. She yells at him, and calls the cops, but he tells her that he was going to give it to her as a present because it has something complimentary written about her in it. He leaves, and the cops pull up, but she sends them away.
The next day, for the funeral, Catherine's sister Claire (Hope Davis) arrives in a town car. A huge contrast to the unkempt Catherine, Claire is an overly put together, bordering on completely neurotic New Yorker. Relations between the sisters are tense, and Catherine can't stand her sister's constant harping on appearance-related issues. Catherine is also upset that Claire didn't care for her father as much as Catherine did in his final years. Catherine's ultimately futile struggle to keep up with her own studies as her father ceases to be able to care for himself is documented in a series of flashbacks. She had started math grad school at Northwestern (Robert asks her: "You actually want to live in Evanston?") and fell behind in her coursework after she returned to check on her father and found him living amongst dirty dishes and sitting outside. He tells her that his brain is working again after the mental illness had interrupted it for a number of years, but she stays to take care of him.
At the funeral, a lot of this frustration on Catherine's part comes out. She is upset at the high number of people there, in this very somber ceremony planned by others, and held in Rockefeller Chapel, a huge Gothic structure that is part of University of Chicago. She interrupts a string quartet and yells at everyone for not being there for her father while he was alive, and ends by saying she's glad her father died. After she storms out, Hal follows her and asks if she needs to be walked home. She declines his offer.
Claire is set on selling Robert's house back to the University, and Catherine is upset that she will be kicked out, since this is where she's been living for the past few years. Claire wants to bring Catherine to New York, and it comes out that Catherine may be struggling with the same mental illnesses that her father struggled with. They have a wake at the house the night after the funeral, and Hal's band plays. Claire gets smashed drinking with a theoretical physicist from the University, and Catherine and Hal end up sleeping together.
After they consummate their affections, Catherine is seemingly comfortable with Hal's intentions toward her family, and gives him a key to her father's desk. He goes up to the office and finds a notebook which contains a lengthy but apparently very important proof a mathematical discovery of sorts. He is very excited and shows the discovery to Catherine and Claire, saying that this discovery could get anyone tenure at any math department in the country. He asks Catherine how long she knew about this and why she didn't tell him about it. She tells him that she wrote it. This is met with silence from Hal and incredulity from Claire. The handwriting looks like Robert's, but Catherine claims it is her own. Claire pushes Hal into a corner and forces him to admit that he is somewhat doubtful that Catherine could have written the proof. She gets upset and tries to tear the book up, but Hal takes it to have people in the math department look at it and see if the proof is accurate.
The next day as Claire and Catherine are packing up in separate parts of the house, Catherine suddenly goes berserk and starts throwing things before collapsing on her knees and crying. Claire comforts her and Catherine sobs "I stole it from him, I stole it from him." Claire says that it is okay and that she was living under a lot of stress with their father.
Hal takes the proof to be examined by his colleagues, who believe the proof to be valid. He comes to the house as Claire and Catherine are leaving. Claire has convinced Catherine to come live in New York, and Catherine has apparently not said a word since her breakdown. Claire tells Hal to leave. He wants to see Catherine. She emerges from the house and appears completely depressed and broken. She is terse with him, but he tells her that the proof works, but that he doesn't think that her father wrote it because there is newer mathematics in it (he says it is a "hipper" proof than someone of her father's generation would have written). She is unmoved as he tells her that he thinks she wrote it and wants her to explain it to him sometime. The sisters get into a car and head to the airport. Hal sprints after the car and throws the book through the window and onto Catherine's lap.
They arrive at the airport and are sitting in the terminal. In another flashback, it is revealed that after Catherine dropped out of school to care for her father he challenges her to work on math, which she does, and there are scenes of them sitting across from each other studying math books and writing. She becomes engrossed and doesn't heed his calls to come talk as promptly as she had. She is working on the proof and really was the one who wrote it. When she comes to show him, she realizes that her father has slipped back into his illness. When she walks into the room he is too excited to look at what she wants to show him, demanding that she read aloud a proof that he has written and says is ground breaking. She reads it aloud and begins crying as she does, as the "proof" is in fact complete nonsense. She locks her own proof, the truly ground breaking one, into his desk drawer, where it presumably stays until Hal discovers it, because she realizes that her father is now incapable of understanding what she has accomplished. So it seems that when she sobbed that she had stolen the proof from him, she was speaking of her guilt for doing her own work and not supporting her father as she worked on the proof. She is also troubled because she sees herself in her father, realizing that if she has his genius, then she might also slip into serious mental illness like him.
Back in the airport, Catherine has begun to come to terms with her own genius and her own flaws, aided by Hal's confidence in her. She decides that she does not need to go with her sister to New York and runs out of the airport. She returns to University of Chicago, and the movie ends with her and Hal meeting up on some benches on campus and discussing the proof, as students mill around them.