Life of Pi is divided into three sections. In the first, the main character, Pi, an adult, reminisces about his childhood. He was named Piscine Molitor Patel after a swimming pool in France. He changes his name to "Pi" when he begins secondary school, because he is tired of being taunted with the nickname "Pissing Patel." His father owns a zoo in Pondicherry, providing Pi with a relatively affluent lifestyle and some understanding of animal psychology.[8]
Pi was born a Hindu, but as a fourteen-year-old he is introduced to Christianity and Islam, and starts to follow all three religions as he "just wants to love god."[9][10] He tries to understand God through the lens of each religion and comes to recognize benefits in each one.
Eventually, his family decides to sell their animals and move to Canada due to political concerns in India. In the second part of the novel, Pi's family embark on a small Japanese freighter to Canada carrying some of the animals from their zoo, but a few days out of port the boat suddenly sinks. Pi ends up in a small lifeboat with a Bengal tiger named Richard Parker, a spotted hyena, an injured zebra, and an orangutan. The other humans and animals on the boat all drown.
The hungry hyena tears off the zebra's leg, and spends the next several days eating the zebra bit by bit. The hyena also kills the orangutan. Richard Parker then kills and eats the hyena. Pi is left as the only other survivor. Pi finds food and water supplies on the boat, but as they grow scarce, Pi begins fishing. Pi feeds Richard Parker so that the tiger will not eat him; he also wants to keep the tiger alive to avoid total solitude on the ocean. Pi ensures that the tiger considers Pi the alpha animal and will therefore refrain from attacking him.
Pi recounts that after an indeterminate time at sea, the pair encountered a mysterious island, seemingly constructed of edible algae supporting a forest and a large population of meerkats. Following a period of recuperation, Pi becomes afraid of the island after discovering that the algae is carnivorous, and leaves with the tiger. In all, Pi survives 227 days in the lifeboat, often half delusional with thirst and hunger. The lifeboat reaches the coast of Mexico and Richard Parker escapes into the nearby jungle, so that rescuers find only Pi.
The third part of the novel is a conversation between two officials from the Japanese maritime department. They seek to ascertain why the ship sank, so they interview Pi, but they do not believe his story. Pi then tells a similar story, but this time without animals. Instead, he recounts a story of human brutality, being adrift on a lifeboat with his mother, a sailor with a broken leg, and the ship's cook, who killed the sailor and Pi's mother and cut them up to use as bait and food. Parallels to Pi's first story lead the Japanese officials to believe that the orangutan represents his mother, the zebra represents the sailor, the hyena represents the cook, and Richard Parker is Pi himself. Pi asks if this new story is acceptable, or if he should change any parts that are still too unbelievable; the officials change the subject back to the sinking of the ship. After giving all the relevant information, Pi asks which of the two stories they prefer. Since the officials cannot prove which story is true and neither is relevant to the reasons behind the shipwreck, they choose the story with the animals. Pi thanks them and says, "and so it goes with God".