Artificial Intelligence (often abbreviated to AI) is defined as the capability of a machine to imitate intelligent behavior; suitably programmed computing machinery is capable of duplicating human cognitive mental states.
After the Machine Rights movement and subsequent riots, the Machines retreated to the cradle of human civilisation, Mesopotamia, and built a Machine City there which they named 01. Here the Machines prospered, developing more advanced technology, including the creation of new and better AI.
As humanity's economies failed in the face of this competition, they turned to other means to try to regain supremacy, launching a preemptive nuclear strike on the fledgling Machine nation. Instead of destroying the Machines (who were not as vulnerable to heat and radiation as humans), it led to the Machine War and the eventual downfall of humanity.
During the war, the humans decided to remove the Machines' power source, solar power, by darkening the sky in what they called Operation Dark Storm. This didn't stop the Machines, as they developed a form of fusion and continued the war until the humans were entirely subjagated. Those who survived were placed in pods of fluid, and linked up to a simulated reality devised by the Machines, called the Matrix. From here, the Machines extracted the humans' thermal, bioelectric and kinetic energy.
The Matrix itself was developed by Artificially Intelligent sentient programs, most notably the Architect and the Oracle. Within it, all aspects of the world are simulated by different programs, and the humans within it watched and controlled by the Agent programs.