{
  "id": "gauss-law-for-magnetism",
  "title": "Gauss’s Law for Magnetism",
  "lang": "en",
  "source_lang": "en",
  "summary": "Gauss’s law for magnetism states that the net magnetic flux through any closed surface is zero, expressing the absence of magnetic monopoles in classical electromagnetism.",
  "category": "science",
  "subcategory": "physics",
  "type": "concept",
  "aliases": [
    "Magnetic Gauss law",
    "Gauss’s magnetic law",
    "Law of zero magnetic flux"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/gauss-law-for-magnetism/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/gauss-law-for-magnetism/",
      "json": "https://aiwiki.page/zh/gauss-law-for-magnetism.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Gauss’s law for magnetism is one of Maxwell’s equations, stating that the net magnetic flux through any closed surface is zero. Equivalently, the magnetic field has zero divergence: it has no local sources or sinks corresponding to isolated magnetic charges. The law applies to static and time-dependent fields, in vacuum and in matter, within conventional electromagnetism."
    },
    {
      "heading": "Mathematical statement",
      "text": "Integral form\n\nFor a closed surface \\(S\\), the law is\n\n\\[\\oint_S \\mathbf{B}\\cdot d\\mathbf{A}=0,\\]\n\nwhere \\(\\mathbf{B}\\) is the magnetic flux density, commonly called the magnetic field, and \\(d\\mathbf{A}=\\hat{\\mathbf n}\\,dA\\) is an area element directed along the outward unit normal.\n\nThe dot product selects the component of the field perpendicular to each surface element. Outward flux contributes positively and inward flux negatively. The equation states that these signed contributions cancel over the entire surface.\n\nA closed surface completely encloses a volume and has no boundary edge. It can be a sphere, a cube, or an irregular surface; it need not correspond to a physical object. The law does not require the field to be uniform or the surface to possess any symmetry.\n\nIn the International System of Units, magnetic flux density is measured in teslas and magnetic flux in webers, with\n\n\\[1\\,\\mathrm{Wb}=1\\,\\mathrm{T\\,m^2}.\\]\n\nDifferential form\n\nThe local form is\n\n\\[\\nabla\\cdot\\mathbf{B}=0.\\]\n\nIn Cartesian coordinates, this becomes\n\n\\[\\frac{\\partial B_x}{\\partial x} +\\frac{\\partial B_y}{\\partial y} +\\frac{\\partial B_z}{\\partial z}=0.\\]\n\nThe divergence measures the net outward flux per unit volume in the limit of a shrinking volume. A field with zero divergence is called solenoidal or divergence-free.\n\nThe integral and differential forms are connected by the divergence theorem:\n\n\\[\\oint_{\\partial V}\\mathbf{B}\\cdot d\\mathbf{A} = \\int_V \\nabla\\cdot\\mathbf{B}\\,dV.\\]\n\nFor sufficiently regular fields, requiring zero flux through every closed surface is equivalent to requiring zero divergence at every point. Idealized discontinuities and singular sources require the corresponding integral or distributional treatment."
    },
    {
      "heading": "Physical meaning",
      "text": "No isolated magnetic poles\n\nA bar magnet has north and south poles, but neither pole is an isolated source or sink of the magnetic field. Outside the magnet, field lines conventionally run from its north pole toward its south pole; inside, they continue from south toward north.\n\nCutting an ordinary bar magnet produces smaller magnets, each with north and south poles, rather than separated magnetic charges. At the microscopic level, magnetism arises from electric currents and intrinsic magnetic moments associated with particles such as the electron. These sources produce fields consistent with zero magnetic divergence.\n\nAn isolated magnetic charge is called a magnetic monopole. Gauss’s law for magnetism encodes its absence in conventional Maxwell theory. It does not constitute a mathematical proof that monopoles cannot exist in a more general physical theory.\n\nField lines need not form closed loops\n\nMagnetic field lines cannot begin or end at a regular point where the field is nonzero. They are often illustrated as closed loops, especially around simple magnets or current loops. However, zero divergence does not imply that every individual field line is a closed curve.\n\nField lines may extend indefinitely, and in complicated fields they may follow nonclosing trajectories. The precise statement is that the magnetic field has no local sources or sinks, not that all its field lines must return to their starting points.\n\nZero net flux is not zero field\n\nThe law does not say that the magnetic field vanishes on a closed surface or within its enclosed volume. A uniform magnetic field passing through a closed box has inward flux through one side and equal outward flux through the opposite side.\n\nNor does it require zero flux through an open surface. A flat loop, for example, can enclose substantial magnetic flux. Changes in such flux are central to Faraday’s law of induction."
    },
    {
      "heading": "Relation to the other Maxwell equations",
      "text": "Gauss’s law for magnetism contrasts with Gauss’s law for electricity, which in vacuum has the form\n\n\\[\\nabla\\cdot\\mathbf{E}=\\frac{\\rho}{\\varepsilon_0},\\]\n\nwhere \\(\\mathbf{E}\\) is the electric field, \\(\\rho\\) is electric charge density, and \\(\\varepsilon_0\\) is the vacuum permittivity. Electric charges act as sources and sinks of electric fields; conventional Maxwell theory contains no corresponding magnetic charge density.\n\nThe magnetic Gauss law is also distinct from the Ampère–Maxwell law. The former constrains the divergence of \\(\\mathbf{B}\\), while the latter relates its curl to electric current and a changing electric field. Zero divergence therefore does not imply that the magnetic field is curl-free or spatially uniform.\n\nPreservation under time evolution\n\nFaraday’s law in differential form is\n\n\\[\\nabla\\times\\mathbf{E} =-\\frac{\\partial\\mathbf{B}}{\\partial t}.\\]\n\nTaking the divergence and using the identity that the divergence of a curl vanishes gives\n\n\\[\\frac{\\partial}{\\partial t} \\left(\\nabla\\cdot\\mathbf{B}\\right)=0.\\]\n\nThus, if Gauss’s law for magnetism holds initially, exact evolution according to Faraday’s law preserves it. This makes it a constraint on permissible initial magnetic fields, rather than an independent evolution equation."
    },
    {
      "heading": "Magnetic vector potential",
      "text": "A magnetic field can be expressed locally in terms of a magnetic vector potential \\(\\mathbf{A}\\):\n\n\\[\\mathbf{B}=\\nabla\\times\\mathbf{A}.\\]\n\nBecause\n\n\\[\\nabla\\cdot(\\nabla\\times\\mathbf{A})=0,\\]\n\nthis representation automatically satisfies Gauss’s law for magnetism.\n\nThe potential is not unique. Replacing it by\n\n\\[\\mathbf{A}'=\\mathbf{A}+\\nabla\\chi\\]\n\nfor a sufficiently smooth scalar function \\(\\chi\\) leaves \\(\\mathbf{B}\\) unchanged. This freedom is an example of the gauge freedom central to gauge theory.\n\nA divergence-free field admits such a potential locally. The existence of one smooth potential throughout an entire region also depends on the region’s topology and on global flux conditions; local zero divergence alone is not sufficient in every domain."
    },
    {
      "heading": "Magnetic materials and interfaces",
      "text": "The law applies to \\(\\mathbf{B}\\) inside matter as well as in vacuum. In macroscopic SI electromagnetism,\n\n\\[\\mathbf{B}=\\mu_0(\\mathbf{H}+\\mathbf{M}),\\]\n\nwhere \\(\\mathbf{H}\\) is the auxiliary magnetic field, \\(\\mathbf{M}\\) is magnetization, and \\(\\mu_0\\) is the vacuum permeability. Consequently,\n\n\\[\\nabla\\cdot\\mathbf{H}=-\\nabla\\cdot\\mathbf{M}.\\]\n\nThus, \\(\\mathbf{H}\\) need not have zero divergence. Descriptions of magnetized matter sometimes introduce effective magnetic pole densities to represent magnetization. These are mathematical devices, not evidence for fundamental magnetic monopoles.\n\nApplying the integral law to a thin pillbox straddling an interface gives\n\n\\[\\hat{\\mathbf n}\\cdot(\\mathbf{B}_2-\\mathbf{B}_1)=0.\\]\n\nThe normal component of \\(\\mathbf{B}\\) is therefore continuous across the interface. Its tangential component can change; the relevant tangential boundary conditions follow from the other Maxwell equations and the material properties."
    },
    {
      "heading": "Applications",
      "text": "Consistency checks and boundary conditions\n\nGauss’s law provides a necessary check on proposed magnetic fields. A field with nonzero divergence in an ordinary region cannot be a valid conventional magnetic field there.\n\nThe law alone generally does not determine a magnetic field. It supplies a constraint that must be combined with currents, material relations, other field equations, and boundary conditions.\n\nIt also implies that two oriented surfaces sharing the same boundary have equal magnetic flux, provided their union bounds a volume in which the law holds. This makes the flux associated with a circuit independent of the chosen spanning surface under those conditions.\n\nElectromagnetic waves\n\nFor a plane wave with magnetic field proportional to\n\n\\[e^{i(\\mathbf{k}\\cdot\\mathbf{r}-\\omega t)},\\]\n\nthe divergence condition requires\n\n\\[\\mathbf{k}\\cdot\\mathbf{B}=0.\\]\n\nThe magnetic field is therefore perpendicular to the wavevector. Together with the other Maxwell equations, this establishes the transverse character of plane electromagnetic waves in vacuum.\n\nNumerical simulation\n\nIn computational electromagnetism and magnetohydrodynamics, discretization errors can produce a nonzero numerical divergence of the magnetic field. Such errors can introduce unphysical behavior, including spurious forces in plasma simulations.\n\nMethods such as constrained transport, divergence cleaning, and vector-potential formulations are used to preserve or control the divergence constraint. They differ in whether they maintain a discrete version of the law directly or reduce errors after they arise."
    },
    {
      "heading": "Historical context and possible extensions",
      "text": "The law is named after Carl Friedrich Gauss and is mathematically associated with the divergence theorem bearing his name. Its physical content belongs to the nineteenth-century development of magnetic field theory, including Michael Faraday’s field-line picture and James Clerk Maxwell’s synthesis of electricity and magnetism.\n\nSome extensions of electromagnetic theory introduce magnetic charge. With a convention in which magnetic charge density \\(\\rho_m\\) enters through \\(\\mu_0\\), the law would become\n\n\\[\\nabla\\cdot\\mathbf{B}=\\mu_0\\rho_m.\\]\n\nThe corresponding closed-surface flux would measure the enclosed magnetic charge rather than necessarily vanish. Additional modifications to Maxwell’s equations would be needed to describe magnetic currents consistently.\n\nMagnetic monopoles occur in several theoretical frameworks, but no fundamental magnetic monopole has been experimentally established. Effective monopole-like excitations studied in certain condensed-matter systems are emergent phenomena, not isolated fundamental magnetic charges or violations of the microscopic law."
    }
  ],
  "links": [
    "maxwells-equations",
    "magnetic-flux",
    "magnetic-field",
    "electromagnetism",
    "international-system-of-units",
    "divergence-theorem",
    "electric-current",
    "electron",
    "faraday-law-of-induction",
    "gauss-law",
    "electric-field",
    "electric-charge",
    "magnetic-vector-potential",
    "gauge-theory",
    "magnetization",
    "electromagnetic-radiation",
    "magnetohydrodynamics",
    "michael-faraday",
    "james-clerk-maxwell"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}