The Undoing Book Ending Will Make You Question Everything

Including who you're sharing a bed with.

The Undoing, Hugh Grant, Nicole Kidman

Who killed Malaga Alves? That's the question Jean Hanff Korelitz's readers have to answer in her 2014 novel, You Should Have Known. Now that the book is coming to HBO under a new name, it's time to revisit The Undoing book ending, which gives a whole new meaning to the novel's original title. The Undoing premieres Oct. 25 on HBO, but you can refresh your memory of the ending before the first episode airs. Spoilers for The Undoing and You Should Have Known follow.

Originally published as You Should Have Known, Korelitz's novel centers on Grace: a therapist who finds herself in a tragic and embarrassing scandal when her husband, Jonathan, is accused of murder and promptly disappears. You see, Grace is right in the middle of promoting You Should Have Known: her new "self-help" book, which blames women for not paying attention to the warning signs that their boyfriends will turn into bad husbands. Now, Jonathan is gone, and his wife must retrace every inch of their relationship in order to find out what kind of man she really married.

With her husband still missing, Grace begins to uncover his lies, one by one. In the process, she learns that the man she thought was a successful pediatric oncologist had been let go recently, after allegations of sexual misconduct came to light. She discovers evidence of an affair, including a condom in a coat that Jonathan left behind.

Perhaps most shocking are Grace's interactions with her in-laws. She has never met Jonathan's family. In fact, her husband told her that they were abusive. But they turn out to be warm and inviting people — and there are more of them than Jonathan mentioned. She meets Mitchell, the brother-in-law she didn't know she had, and learns that her husband may have been involved in his younger brother Aaron's death, many years earlier.

Although Jonathan never returns in the novel, he does send his wife a letter in which he confesses to having an affair with Malaga: the mother of another student at his son's school. Their relationship produced a baby girl that Jonathan was determined to keep secret. He tells Grace that he murdered Malaga to prevent her from revealing their affair.

The Undoing book ending is full of new beginnings for Jonathan's family. His wife finds a fresh start for herself and their son, donating their old furniture to a family whose teenager went down the wrong path. Grace's in-laws take in Jonathan and Malaga's baby, whom Malaga's widowed husband refuses to care for. And Grace turns Jonathan's letter over to the police, knowing that it will seal her husband's fate.

HBO's The Undoing premieres on Oct. 25. The limited series stars Nicole Kidman (Big Little Lies) and Hugh Grant (The Gentlemen) as Grace and Jonathan. Italian Race star Matilda de Angelis portrays Elena Alves, the series' version of Malaga. Noah Jupe (Honey Boy) and Edan Alexander (Two and a Half Men) appear as Grace and Elena's sons, Henry and Miguel.