The classical theory of electric and magnetic fields, both in the static and dynamic case. It also covers general questions about magnets, electric attraction/repulsion, etc. Distinct from electrical-engineering.
When to Use This Tag
electromagnetism covers the classical description of both static and dynamic electromagnetic phenomena, summarised in Maxwell’s equations. For the discussion of electric circuitry, use electric-circuits instead, while quantum-electrodynamics should be used for the (non-classical) QFT approach to electromagnetism. The classical counterpart, classical-electrodynamics is typically used, as an alternative to electromagnetism, to emphasise that the question focuses on the dynamical aspects of electric and magnetic phenomena, as opposed to electrostatics and magnetostatics.
Introduction
Maxwell's theory provide a classical description of the phenomena arising from static and moving electric charges, either macroscopic or microscopic (such as the electron). The relevant quantities are the electric field $\vec E$ and the magnetic field $\vec B$, which obey maxwell-equations (cf. below).
The distinction between electrostatics and electrodynamics is helpful for the following reason: in the static cases, charges affecting an electric field are assumed to be stationary, and currents causing a magnetic field do not change magnitude or direction; thus simplifying the analysis of the equations of motion. The dynamical case allows for both of these to happen, leading to a much richer phenomenology, which includes electromagnetic waves and time-dependent magnetic and electric fields.
Maxwell's equations
An electric charge is often denoted by $q$ and an electric current by $I$. These objects can be written as the integrals of the densities $\rho,\vec j$, known as the charge and current densities. These densities act as sources for the electric field $\vec E$ and the magnetic field $\vec B$, as described by Maxwell's equations: $$ \nabla\cdot\vec E=4\pi\rho$$$$ \nabla\cdot\vec B=0$$$$ \nabla\times\vec E=-\frac{1}{c}\frac{\partial\vec B}{\partial t}$$$$ \nabla\times\vec B=\frac{1}{c}\left(4\pi\vec j+\frac{\partial\vec E}{\partial t}\right) $$
These equations, together with some appropriate boundary conditions, determine the value of the electric and magnetic fields uniquely. The solutions typically exhibit radiation phenomena, in the form of electromagnetic waves, cf. electromagnetic-radiation. This phenomenon is the origin of, for example, visible-light, and is the fundamental principle behind optics.
For more details, see maxwell-equations, electric-fields, magnetic-fields, charge, and electric-current.
Manifest covariance
The electric and magnetic fields can be combined into a single object, known as the field strength tensor, which is a rank-2 anti-symmetric tensor $F^{\mu\nu}$, with components $$ F^{0i}=\frac1cE^i,\qquad F^{ij}=-\epsilon^{ijk}B^k $$
This tensor allows us to recast Maxwell's equations in a manifestly covariant form. To this end, we introduce the so-called four-current, with components $j^\mu=(c\rho,\vec j)$. Using this notation, Maxwell's equation can be written as $$ \partial_\mu F^{\mu\nu}=j^\nu,\qquad \partial_{ [ \alpha } F_{ \beta \gamma ] } = 0 $$
This notation is particularly useful when dealing with dynamic phenomena, such as electromagnetic waves, because the latter propagate at the speed of light, forcing us to analyse the system taking into account all the subtleties of special-relativity.
For more details, see lorentz-symmetry, covariance, and tensor-calculus.
Gauge fields
The equation $\partial_{ [ \alpha } F_{ \beta \gamma ] } = 0$, together with some regularity conditions, implies that there exists a four-vector $A^\mu$, called the four-potential, such that $$ F_{\mu\nu} = \partial_\mu A_\nu - \partial_\nu A_\mu $$ holds. The object $A$ is known as a gauge field, and a redefinition of the form $$ A_\mu\to A_\mu+\partial_\mu\lambda $$ for an arbitrary function $\lambda$, is known as a gauge transformation. One readily checks that the strength tensor is invariant under these transformations. The general theory of gauge fields and gauge transformations is known as gauge-theory, and is a major topic in modern physics, such as particle-physics, field-theory, mathematical-physics, etc.