Maxwell''s equations are a set of partial differential equations that, together with the Lorentz force law, form the foundation of classical electrodynamics, electric circuits and classical optics. These fields in turn underlie modern electrical and communications technologies. Maxwell''s equations explain how electric and magnetic fields are generated and altered by each other and by currents and charges. They are named after the Scottish physicist and mathematician James Clerk Maxwell who published an early form of those equations between 1861 and 1862. The equations have two main variants. The "microscopic" set of Maxwell''s equations uses total charge and total current, as well as the complicated charges and currents in materials at the atomic scale; it has universal applicability, but may be unfeasible to calculate. The "macroscopic" set of Maxwell''s equations shows two new auxiliary fields that explain large-scale behavior without having to consider these atomic scale details, but it needs the use of parameters characterizing the electromagnetic properties of the relevant materials. The term "Maxwell''s equations" is often used for other forms of Maxwell''s equations. For instance, space-time formulations are commonly used in high energy and gravitational physics. These formulations defined on space-time, rather than space and time separately are manifestly compatible with special and general relativity. In quantum mechanics, versions of Maxwell''s equations based on the electric and magnetic potentials are preferred.