LitCharts assigns a color and icon to each theme in Harry Potter and the Deathly Hallows, which you can use to track the themes throughout the work.
Choices, Redemption, and Morality
Grief and Coming of Age
Knowledge and Power
Mortality and Sacrifice
Friendship, Community, and Resistance
Summary
Analysis
On the floor of Dumbledore's office, Harry feels like he finally has the truth: he's not supposed to survive, and neither is Voldemort. Harry is terrified, but he doesn't consider running away. He realizes that, although Dumbledore betrayed him, it makes sense that there was a larger plan designed to kill as few as possible. Dumbledore knew that Harry wouldn't back out; Dumbledore's only miscalculation was that Nagini is still alive, though Ron and Hermione can take care of her. Harry decides to not say goodbye to Ron and Hermione and begins to walk through the castle under the Cloak. He bumps into Neville carrying Colin Creevy's body. Someone else takes it, and Harry tells Neville to kill the snake.
Now, Harry must prepare himself to do what Dumbledore and Snape did: sacrifice himself for the cause, knowing that his death is the only way to ensure a better future going forward. Because Harry doesn't want to hurt others, it means that he has no interest in drawing this out or putting others in danger, even if others would willingly stand between Harry and Voldemort to stop Harry from dying. Allowing Neville in shows Harry passing the torch and recognizing the power of the community to carry out his goals.
Active
Themes
Quotes
Harry puts the cloak back on, but stops dead when he sees Ginny comforting a girl. He feels as though he wants her to drag him home, but he thinks that Hogwarts is his home, just as it was home to Voldemort and Snape. Harry remembers the Snitch that Dumbledore left him. He pulls it out and whispers to it that it's going to die. The Resurrection Stone sits in the two halves, and Harry turns it over three times. James, Sirius, Lupin, and Lily all greet Harry. They say that dying is painless and praise Harry's bravery. Harry apologizes to Lupin for Lupin's death, but Lupin says he wants Teddy to grow up in a better world. The ghosts promise to stay close to Harry and keep him warm as he winds through dementors. They stop when they see Yaxley and Dolohov and follow them to a clearing.
Harry's realization that Hogwarts is his home and has also been home to Tom Riddle and Snape shows the power of the school: it can make misfit, orphaned boys feel as though they have a place where they belong and a place that's worth fighting for. Lupin's choice to brush off Harry's apology for his death shows that he understands the importance of sacrificing himself so his son, and others' children, can go on to live a life untroubled by Voldemort—a state of affairs that can only be achieved if he and others choose to sacrifice themselves.
Active
Themes
The clearing is filled with Death Eaters, all watching Voldemort. Harry pulls off the Invisibility Cloak, stuffs it in his robes with his wand, and steps into the light. He drops the stone and the ghosts vanish. Death Eaters laugh, but Hagrid, tied to a tree, starts to shout. Harry watches Nagini but knows he can't kill the snake here. Voldemort lifts the Elder Wand, and Harry sees a flash of green and then nothing.
In this moment, Harry understands that he has to trust in his community to finish what he started and deal with Voldemort himself. Choosing to die without finishing shows that Harry has finally decided to take the power of his community to heart.