Making Sense of the Time Travel in 'Avengers: Endgame'
Avengers: Endgame wouldn't be possible without every Marvel movie that came before it, which is kind of a beautiful thing. Crucially, Endgame wouldn't be possible at all without Ant-Man's ability to get really, really small. The great thing about movies like this is you can just have a smart character say some acronyms and use words like "entanglement" and "paradox" a lot, and to the average viewer who has agreed to suspend their disbelief for a few hours, that sounds plenty legit. But Endgame's biggest plot device is actually based on a real scientific theory.
Ant-Man's surprise arrival at the Avengers' secret picturesque headquarters introduces the remaining crew -- Captain America, Black Widow, Hawkeye, Rhodey, Nebula, Rocket, and the Hulk -- to the idea of time travel without needing the assistance of Doctor Strange (who was snapped) and the Time Stone (which was destroyed by Thanos after he'd accomplished his goal). Once they get Tony Stark onboard with the idea, and once Tony has a brilliant epiphany about how to do it, they build a time machine that transports each Avenger to one of three time periods when they knew the location of each Infinity Stone, so that they can bring them back to their future, make their own gauntlet, and snap half of all life back into existence.
Sounds easy, right? Well, no, it sounds pretty complicated, and the end result is more complicated still. They succeed in getting all the stones together, but at a cost: When Nebula journeys back in time to 2014 to retrieve the Power Stone on the planet Morag -- the same moment we met Peter Quill for the first time in Guardians of the Galaxy -- her brain circuits accidentally open a channel with the villainous past version of herself up in Thanos' ship, and she basically spills every possible bean. Thanos now knows that not only did he succeed in making his plan a reality, now his remaining enemies are working to undo it, and might even succeed. So, after bad Nebula switches places with good Nebula and messes with the time machine, Thanos follows the Avengers back to their present (which, in Endgame's time, is the year 2023) and wages a war he ultimately loses.
But then, how can a past version of Thanos, who hasn't yet collected all the Stones and performed The Snap, die in the future before he has the chance to do all the things that made this future possible? To understand what's going on here, we need to talk about some theories. There are three main types of time travel that fiction uses: the type in which the future is immutable, and your past actions actually cause the future to happen (think Buckbeak in Harry Potter and the Prisoner of Azkaban); the type in which you can change the way some small things happen in the past, but whatever large event -- or "fixed point" -- that influences the future will pan out as it always did; and the type in which changing things in the past dramatically alters what happens in the future.
This last theory, which is how Endgame works, branches off into two possibilities. The first involves changing past events to alter the future, which can create some problems. The "Grandfather Paradox" describes a situation in which a hypothetical person travels back in time and hypothetically kills his own grandfather, which would wipe this person from existence so he couldn't kill his grandfather in the first place, which couldn't happen unless he were around to go back in time and kill his grandfather. Even if you could emerge from the past into an altered future, would you yourself be changed too? Or, after traveling back and forth through time, do you exist in some sort of weird time bubble, in which your body and memories aren't changed while everything else is?
The second possibility involves something superhero comics love to play around with: parallel universes. If you go back in time and change some stuff, you create an alternate version of the future that this version of you just hops into when you travel back to your present. It's a different present, because you've changed it, and because you've created an entirely new timeline branching off from the first. Schrödinger's cat can be alive, dead, a go-go dancer, or never even put into that box in the first place. The Marvel universe already operates according to the many worlds theory, which allows for all the parallel universes already in the canon. (The Marvel Cinematic Universe actually considers itself its own parallel universe, Earth-19999, distinct from our real world and the primary continuity of the Marvel comics, Earth-616.)
This is where Ant-Man comes in. As you know, if you've watched either or both Ant-Man and Ant-Man and the Wasp, when you get really teeny tiny you enter something called the "Quantum Realm," where stuff gets very blurry and technicolored. Time works differently in the Quantum Realm, which is why, when Ant-Man reemerges five years after The Snap, he hasn't aged more than a few hours. It's also why he and his technology are crucial to Endgame -- specifically, crucial to Tony Stark figuring out how to harness the power of the Quantum Realm and use it to transport himself and the rest of his buddies through time itself.
I’m not going to go into the mechanics of quantum time travel here because it's way too complicated. (Frankly, I did twenty minutes of Googling for this piece and I still don't understand it. If there's one thing I've learned from the Avengers, it's to embrace both my strengths and my weaknesses.) Basically, the general principles of quantum theory allow for every possibility to occur at any given time, which does away with any kind of paradox arising from time travel. The many-worlds interpretation of parallel universes rests entirely on quantum theory: every possible thing that could ever happen creates its own little bubble universe branching off from the main one. You can't change "the past," because whatever you do creates a new reality.
This is why everything Thanos did in Infinity War still affects the future, even if he didn't do it: by following the Avengers through time himself, he entered the parallel universe they created, which requires The Snap to exist. This is also why Captain America can trade blows with himself when he hops back to the Battle of New York without both of them ceasing to exist on contact.
And, yes, this does mean that somewhere out there there's a universe in which Thanos won forever and half of life is still ashes blowing in the wind. When Bruce Banner talks the Ancient One (Tilda Swinton's character from Doctor Strange) into handing over the Time Stone to him, their conversation touches a little on this wrinkle. By giving him the Time Stone, the Ancient One fears the timeline created by that alteration will sour, and everything will go bad way faster from that point on. Bruce convinces them that the plan is to return the Stones to the place they were taken from right when they were taken, and by the end of the movie we can assume that this happened successfully. It actually doesn't matter to the new timeline at all whether or not the Stones are returned (because… quantum stuff), but it's a nice little bit of altruism on the part of the Avengers. Hey, they're superheroes.