The Theory of Electromagnetism