How could Expelliarmus beat Avada Kedavra?
I want to be very careful about how I ask this question – I am not asking How did Voldemort die? [CLOSED] Below the text is the relevant passages from Harry Potter and the Deathly Hallows if anyone wants to review them (I'm sorry for the amount of text).
How did Expelliarmus beat Avada Kedavra and kill Voldemort?
I feel the reason Harry's Expelliarmus overpowered Voldemort's Avada Kedavra curse has to do with who was master of the Elder Wand and how the Elder Wand works. I've always had trouble understanding fully how the Elder Wand works, though. How much did the fact that Voldemort never truly won or mastered the Elder Wand factor into how Expelliarmus reacted to Avada Kedavra and caused Avada Kedavra to rebound and kill Voldemort?
An answer based in book canon would be especially welcome, but any canon source really is fine.
Harry heard the high voice shriek as he, too, yelled his best hope to the heavens, pointing Draco’s wand:
The bang was like a cannon-blast and the golden flames that erupted between them, at the dead centre of the circle they had been treading, marked the point where the spells collided Harry saw Voldemort’s green jet meet his own spell, saw the Elder Wand fly high, dark against the sunrise, spinning across the enchanted ceiling like the head of Nagini, spinning through the air towards the master it would not kill, who had come to take full possession of it at last.
Deathly Hallows - pages 595 - 596 - Bloomsbury - chapter 36, The Flaw in the Plan
Harry, with the unerring skill of the Seeker, caught the wand in his free hand as Voldemort fell backwards, arms splayed, the slit pupils of the scarlet eyes rolling upwards. Tom Riddle hit the floor with a mundane finality, his body feeble and shrunken, the white hands empty, the snake-like face vacant and unknowing. Voldemort was dead, killed by his own rebounding curse, and Harry stood with two wands in his hand, staring down at his enemy’s shell.
Deathly Hallows - page 596 - Bloomsbury - chapter 36, The Flaw in the Plan
And somehow I feel the following is important because Voldemort disdained the idea of learning from other people or things that he didn't see an immediate use for; for example, he dismissed the importance of House-elves because he found them beneath his notice and this came back to haunt him when Kreacher escaped the Horcrux cave alive and with the Slytherin locket Horcrux:
‘A person can still use a wand that hasn’t chosen them, though?’ asked Harry.
‘Oh yes, if you are any wizard at all you will be able to channel your magic through almost any instrument. The best results, however, must always come where there is the strongest affinity between wizard and wand. These connections are complex. An initial attraction, and then a mutual quest for experience, the wand learning from the wizard, the wizard from the wand.’
Deathly Hallows - page 399 - Bloomsbury - chapter 24, The Wandmaker
Can you help me put the pieces together?
There are two factors that led to Voldemort's defeat. One is, as you've noted, his failure to master the Elder Wand. But the other is the failure of all of his spells after he cast Avada Kedavra on Harry.
Because Harry died to save his friends, he and they received the same kind of magical protection that Harry bore after his mother died to save him. The details, including citations from the book, can be found here.