A magnetic field is the magnetic effect of electric currents and magnetic materials. The magnetic field at any given point is specified by both a direction and a magnitude (or strength); as such it is represented by a vector field. The term is used for two distinct but closely related fields denoted by the symbols B and H, where H is measured in units of amperes per meter (symbol: A⋅m−1 or A/m) in the SI. B is measured in teslas (symbol: T) and newtons per meter per ampere (symbol: N⋅m−1⋅A−1 or N/(m⋅A)) in the SI. B is most commonly defined in terms of the Lorentz force it exerts on moving electric charges.
Magnetic fields can be produced by moving electric charges and the intrinsic magnetic moments of elementary particles associated with a fundamental quantum property, their spin. In special relativity, electric and magnetic fields are two interrelated aspects of a single object, called the electromagnetic tensor; the split of this tensor into electric and magnetic fields depends on the relative velocity of the observer and charge. In quantum physics, the electromagnetic field is quantized and electromagnetic interactions result from the exchange of photons.