quality:correction, structural:summarization, information:highlighting
Ampere's law

The magnetic field of electromagnets in the general case is given by Ampere's Law:

which says that the integral of the magnetizing field H {\displaystyle \mathbf {H} } around any closed loop is equal to the sum of the current flowing through the loop. Another equation used, that gives the magnetic field due to each small segment of current, is the Biot–Savart law.