The relationship between Neo and Agent Smith in the films is very misunderstood, and since this figures so crucially into the amazing ending is a large part of the reason the later movies get so critically panned. Neo (the apparent hero) and Agent Smith (the apparent villain) are the inevitable resultant of the Matrix’s programming equations which produces anomalies in the system. Neo, or the One exists, and thus Smith must exist as well as an inevitable product of the mathematical equations of the system attempting to balance themselves out. Hence Smith is Neo’s opposite, the Yang to Neo’s Yin.