Where did the Wachowski's get their source material? Here are some ideas on how the storyline weaves in mythology - it might help you understand the plot.
About the year 2199 machines gained artificial intelligence and humans freaked out and went to war. The machines used solar power, so humans scorched the sky in a nuclear winter, and the machines started enslaving humans and drawing off their heat and bioelectricity for power. Now they create test tube babies, grow humans in fields and plug them into the Matrix pods when they're children, feeding them on the liquified remains of those who die. The Matrix was designed to provide a mental stimulus for the human bodies. The word Matrix is derived from the Latin word for "womb", which is itself derived from the Latin word for "mother", which is "mater".
The First Matrix was designed as a perfect utopia but without choices. Humans did not accept it as real so they just kept waking up in their pods or dying. It was a disaster. So the Matrix was rebooted and redesigned to reflect human civilization in 1999, complete with freedom for people to do wrong things. Each person lived out their life in the Matrix program, acting and being acted upon. Free choice meant some people were good, others were bad, and these interactions created a perfect replica of reality. 99% of people accepted the program because of free agency. But 1% didn't, which is where the Architect had a problem to solve.
The Architect program is pure mathematics - left brain - order. The Oracle program is pure intuition - right brain - chaos. It was the Oracle that suggested the Architect redesign the Matrix to give humans free agency. Since humans were to have choices, so must the programs sent to watch over them, so they could adapt to the variances created by choice, and keep things in check.
To help the Oracle program understand human intuition even better, and thus help the Architect reduce the 1% rejection factor, the Oracle was to encourage people who sought enlightenment. She would prompt them with cryptic questions designed to draw out their free thinking. When they needed a special nudge, she would upgrade their ability to think and do with an enhancement code they would take in through the mouth; a cookie, some candy, etc.
In the Second Matrix a person responded to this stimulus and became The One. They were younger than 11, and childlike in their view of love, right and wrong. In the trilogy we learn that people older than 11 seldom adjust to the non-Matrix reality because they are too fixed in their ways. Enhanced with upgraded abilities The One learned of the truth about the human condition and hacked into the program to wake people up. These kids banded together and used what remained of real world human technology to mount a resistance against the machines, hence the hovercraft, weapons, walkers, etc. This gear was found on the surface and transported down to Zion in a time before the machines had Sentinels patrolling. When the machines realized the underground pipes and passages were being used as transport conduits by their enemies, they started sending out the Sentinels, but by then Zion was operational as a command centre and the kids had grown into adults.
The One of the Second Matrix eventually had enough experiences for a download of their knowledge into the Source to provide the Architect with new data to reduce the dropout rate of people plugged in. They were taken to the Architect's white room, and given the choice: walk through the Left Door to upgrade the Source with new data as was always intended, or walk through the Right Door back into the Matrix. If they chose the Right Door, the Matrix would be shut down while The One was inside, killing them and everyone else, and the Sentinels would wipe out the people in Zion. If they chose the Left Door, the Matrix program would get enhanced to better deal with human intuition and the resulting causality, and The One would be returned to the real world with his special program deleted (no longer The One) to select 16 women and 7 other men to repopulate Zion while anyone not chosen would be killed off by the Sentinels. This core group would then be in place to receive anyone else who dropped out of the Matrix program - which would happen because the Oracle program would continue to seek out and encourage kids to be The One, so the machines could further investigate human choice, intuition and causality.
Reboot, and in comes the Third Matrix and so on until the Sixth, when NEO emerged as the anomaly called The One. Neo is different to the other Ones. He was woken up older than 11. This means instead of having a general love for the people in the Matrix like the younger Ones had, he was old enough to have a specific love for Trinity, and a desire to save her inside the Matrix. Which is why he chose the Right Door instead of the Left Door in the Architect's room.
He was also different in that instead of running from the Agents he decided to confront them. Being a computer hacker might have given him a special perspective with which to operate inside the Matrix. When the Oracle upgraded his abilities with a cookie Neo developed the ability to see the Matrix in code while he was inside it. He could rewrite the code to stop the Agent's bullets, to reboot himself after being killed, to dive into Agent Smith's code and insert himself in its place, and even to fly.
But when he dived into Smith some of the upgraded Neo code wrote onto the Smith code. For the first time an Agent program was unplugged from its normal protocols and had freedom to reboot itself and overwrite other entities, like Neo had done. We saw it as Smith replicating himself.
This created a second and unanticipated anomaly inside the Matrix which threatened to bring the system down. So in Reloaded the Oracle told Neo he had to find the Keymaker, and get inside the Source, which ultimately was the objective written into his programming, but now needed to happen sooner rather than later. The system needed a reboot to delete Smith. She gave Neo some candy to rewrite his compliance to this goal, and told him he'd already made the choice and now needed to understand it.
When Neo, Trinity and Morpheus meet the Merovingian he talks about causality and how people can eat programs like orgasmic cake that force a reaction that can't be controlled, like Neo had with the candy. He tells Neo he's come there because he was told to be there, a puppet to the system. He denies Neo the Keymaker. Persephone helps Neo find the Keymaker, and Neo gets to the Source where he has the same discussion with the Architect that other Ones had before him.
However, this time The One does not rejoin the source code to reset the system. This time, his adult love is stronger than the compliance and causality code he'd been given. So instead of losing himself to save everyone in the Matrix - as past Ones had done - he saves Trinity from falling to her death, and restarts the code governing her heart. His consciousness is now more Program than human, living in a human body. Agent Smith was also a Program that had overwritten a human's code (Bane's) to upload into the real world and possess Bane's human body.
Neo and Smith are the same; one positive, one negative; one good, one evil. The Oracle says it clearly in Revolutions: Smith is the result of the anomaly trying to balance itself.
Neo's choice to save Trinity has changed everything. The system is still threatened by Smith's behavior, so the Oracle makes a new choice; one she has never done before because no version of The One has ever chosen the difficult path as opposed to easy one of just resetting the system. She allows herself to become merged with Smith in the hope that she'll be able to help Neo when the time is right. His choices being different to the program she fed Neo have made a believer out of her. Neo is stronger than his programming. He is really The One: self-aware and self-governing - a true god in machine terms.
At the end of their final battle, Smith tells Neo what the Oracle last told Neo: "everything that has a beginning has an end." This was the Oracle speaking to Neo through Smith, which Smith realizes because these aren't his words. When Smith replicated over the Oracle to see with her eyes, she fed him a vision of the future that was what he wanted to see, right down to what he would do, where he would stand and what he would say. Neo realizes the only way to end this is to sacrifice himself. He allows Smith to replicate onto him, thus destroying The One's program. Since Smith and The One are opposites, their merger cancels the other out, which is why all the Smiths simply delete.
The Architect then reboots to start the Seventh Matrix. This time there is an agreement for peace. There will be no reduction of Zion down to 24 people. Everyone will live. The Architect tells the rebooted Oracle that the machines will keep their peace. But he suspects the humans will not. The Oracle suggests Neo or another One will return.
I have a suspicion that because Neo's consciousness became more Program than human, even though his real world body died, his essence will be loaded into the Matrix as a Program. I think that Persephone was also a previous One now loaded into the Matrix. As a program not connected with a jacked-in human body, she remembers her mortal life, but can no longer experience the physicality, which is why she wanted to kiss Neo to remember what love feels like. Persephone knows Neo's fate will be the same as hers, which is why she tells Neo and Trinity that nothing lasts forever. When a One completes their mission and rejoins the source code, they are a product of two influences - the Oracle and the Architect, chaos and order, yin and yang, mom and dad.
The post-mortal Ones are therefore the children of the Matrix gods. In mythology, Persephone was the beautiful daughter of Zeus (= the Architect) and Demeter, goddess of fertility (aka creation, intuition = the Oracle). Persephone was abducted by Hades and taken to his underground kingdom to be his wife. In the Matrix mythos, the Merovingian is Hades, his underground night club is Club Hel.
The Merovingian is not a previous One, but he has survived Neo's predecessors and will also survive Neo. Merve is a Program that traffics information, a router. He surrounds himself with bodyguards and henchmen drawn out of the programs used to make movies and TV shows for the people plugged into the Matrix - he uses werewolves (the silver bullet killed him) and ghosts (the phase-shifting Twins) - because they cannot die inside the Matrix as easily as "normal" characters can. He keeps the Keymaster because he wants all the keys for all the backdoors in the Matrix. This is power. He also wants the Oracle's eyes to gain more power.
In an interesting esoteric versions of history the Merovingian kings were direct descendants of Mary Magdalene and Jesus Christ. Some say the Roman church killed off all remnants of this dynasty (in the Cathar Heresy of Languedoc and during the Inquisition) in order to rule the religion through the spiritual dynasty of Peter instead of the "holy blood" of Mary Magdalene's descendants, who were the Roman church's rivals in authority. In Matrix terms, the Merovingian would therefore be the offspring of one of the earlier incarnations of The One. We see that programs can have children, as is the case of Kali and Rama Chandra appealing to the Merovingian to take their daughter Sati across to the Matrix.
Another connection here: Kali (Sati's mother in the Matrix) is a name of the Hindu goddess who was the destroyer of evil spirits. Her devotees believed wisdom meant learning that no coin has only one side: as death cannot exist without life, so life cannot exist without death - a central tenet in Revolutions.
The Matrix movies draw from many places for the characters and storylines.
Architect = Zeus, god, father of the Matrix.
Oracle = Demeter, wife of Zeus, goddess, mother of the Matrix.
Persephone = daughter of Zeus & Demeter.
Merovingian = Hades, the devil. Son of a previous One.
Neo / Thomas Anderson = neo is a prefix for "new", an anagram of "one", and "anderson" literally means "son of man", the self-title of Jesus Christ.
Trinity = unity of three distinct Persons.
Morpheus = the god of dreams in Ovid's Metamorphoses.
Niobe = a mortal turned into stone by the gods.
Kali = destroyer of evil spirits.
Rama Chandra = seventh avatar of Vishnu and/or a god of fertility.
Sati = Hindu character connected to widows.
A hypostasis associated with divine wisdom, or the second person in the Trinity.
Babylonian king whose name means "the frontiers".
The story makes numerous references to historical and literary myths, including Alice's Adventures in Wonderland, Judeo-Christian imagery and the novels of William Gibson, especially Neuromancer. Gibson popularized the concept of a world wide computer network with a virtual reality interface, which was named "the matrix" in his Sprawl Trilogy, a concept which was also used with the same name in the British sci-fi series Doctor Who.
Students of Gnosticism will notice many of its themes touched upon. Other motifs include the free will vs. fate debate and the nature of reality, perception, enlightenment, and existence. In many ways The Matrix is about a kind of reality enforcement . There are also vague references to Buddhism and Daoism , with concepts of Enlightenment/Nirvana and rebirth.
The Matrix has many cinematic influences. Its action scenes, with a physics-defying style drawn directly from martial arts films, and the rooftop chase from classic American movies, are notable.
Additionally, there are notable influences from Japanese animation (anime). Both a scene almost at the end of the movie, where Neo's breathing seems to buckle the fabric of reality in a corridor he is standing in, as well as the "psychic children" scene in the Oracle 's waiting room are evocative of similar scenes from the 1980s anime classic Akira . The title sequence, the rooftop chase scene where an agent breaks a concrete tile on the roof when landing after a jump, the scene late in the movie where a character hides behind a column while pieces of it are blown away by bullets, and a chase scene in a fruit market where shots hit watermelons, are practically identical to shots in another anime science fiction classic, Ghost in the Shell .
It should be noted that the reason given in the movie for computers enslaving humans is implausible from a thermodynamic point of view. The chemical energy required to keep a human being alive is vastly greater than the bio-electric energy that could be harvested. It would be vastly more effective to burn the organic matter and power a conventional electrical generator. The Wachowski's original explanation was the machines were actually using the humans' brains as components in a massively parallel neural network computer. Because they felt non-technical viewers would have trouble understanding it, the writers abandoned this concept in favor of the "human power source" explanation.