Theory of Electromagnetics