Fields are all around us. Whether it’s the gravitational field caused by the Earth’s mass or the electric fields created by charged particles such as electrons, there are invisible fields everywhere, representing potentials and unseen forces capable of moving objects with appropriate characteristics.

For instance, an electric field in an area means that a charged object can be deflected off its original path when it enters the region, and the gravitational field due to the Earth’s mass keeps you firmly on the surface of the Earth unless you do some work to overcome its influence.

Magnetic fields are the cause of magnetic forces, and objects that exert magnetic forces on other objects do so by creating a magnetic field. Magnetic fields can be detected by deflection of compass needles which line up with field lines (the magnetic north of the needle pointing towards magnetic south). If you’re studying electricity and magnetism, learning more about magnetic fields and the magnetic force is a crucial step on your journey.

## What Is a Magnetic Field?

In physics in general, fields are vectors with values at every region of space that tell you how strong or weak an effect is at that point, and the direction of the effect. For example, an object with mass, like the sun, creates a gravitational field, and other objects with mass entering that field are affected by a force as a result. This is how the gravitational pull of the sun keeps the Earth in orbit around it.

Farther out in the solar system, such as at the range of Uranus’ orbit, the same force applies, but the strength is much lower. It’s always directed straight at the sun; if you imagine a collection of arrows surrounding the sun, all pointing towards it but with longer lengths at close distances (stronger force) and smaller lengths at long distances (weaker force), you’ve basically imagined the gravitational field in the solar system.

In the same way as this, objects with charge create electric fields, and moving charges generate *magnetic fields*, which can give rise to a magnetic force in a nearby charged object or other magnetic materials.

These fields are a little bit more complicated in terms of shape than gravitational fields, since they have looping magnetic field lines that emerge from the positive (or north pole) and end at the negative (or south pole), but they fill the same basic role. They’re like lines of force, which tell you how an object placed in a location will behave. You can clearly visualize this using iron filings, which will align with the external magnetic field.

Magnetic fields are **always** **dipole fields**, so there are no magnetic monopoles. Generally, magnetic fields are represented with the letter *B*, but if a magnetic field passes through a magnetic material, this can become polarized and generate its own magnetic field. This second field contributes to the first field, and the combination of the two is referred to by the letter *H*, where

with μ_{0} = 4π × 10^{−}^{7} H/m (i.e., the magnetic permeability of free space) and K_{m} being the relative permeability of the material in question.

The amount of magnetic field passing through a given area is called the magnetic flux. Magnetic flux density is related to local field strength. Since magnetic fields are always dipolar, the net magnetic flux through a closed surface is 0. (Any field lines exiting the surface, necessarily enter it again, cancelling out.)

## Units and Measurement

The SI unit of magnetic field strength is the tesla (T), where:

1 tesla = 1 T = 1 kg/A s^{2} = 1 V s/m^{2} = 1 N/A m

Another widely used unit for magnetic field strength is the gauss (G), where:

1 gauss = 1 G = 10^{−}^{4} T

The tesla is quite a big unit, so in many practical situations the gauss is a more useful choice – for example, a refrigerator magnet will have a strength of about 100 G, while the Earth’s magnetic field on the surface of the Earth is about 0.5 G.

## Causes of Magnetic Fields

Electricity and magnetism are fundamentally intertwined because magnetic fields are generated by moving charge (like electric currents) or changing electric fields, while a changing magnetic field generates an electric field.

In a bar magnet or a similar magnetic object, the magnetic field results from several magnetic “domains” becoming aligned, which are in turn created by the movement of the charged electrons around the nuclei of their atoms. These movements produce small magnetic fields within a domain. In most materials, domains will have random alignment and cancel each other out, but in some materials, the magnetic fields in neighboring domains become aligned, and this produces larger-scale magnetism.

The Earth’s magnetic field is also generated by moving charge, but in this case, it’s the motion of the molten layer surrounding the Earth’s core that creates the magnetic field. This is explained by *dynamo theory*, which describes how a rotating, electrically charged fluid generates a magnetic field. The Earth’s outer core contains constantly moving liquid iron, with electrons traveling through the liquid and generating the magnetic field.

The sun also has a magnetic field, and the explanation for how this works is very similar. However, the varying rotation speeds of different parts of the sun (i.e., the fluid-like material at different latitudes) leads to the field lines getting tangled up over time as well as many phenomena associated with the sun, like solar flares and sun spots, and the roughly 11-year solar cycle. The sun has two poles, just like a bar magnet, but the motions of the sun's plasma and the gradually increasing solar activity causes the magnetic poles to flip every 11 years.

## Magnetic Field Formulas

The magnetic fields due to different arrangements of moving charge have to be derived individually, but there are many standard formulas you can use so that you don’t have “reinvent the wheel” every time. You can derive formulas for basically any arrangement of moving charge using the Biot-Savart law or the Ampere-Maxwell law. However, the resulting formulas for simple arrangements of electric current are so commonly used and quoted that you can simply treat them as "standard formulas" rather than deriving them from the Biot-Savart or Ampere-Maxwell law every time.

The magnetic field of a straight-line current is determined from Ampere’s law (a simpler form of the Ampere-Maxwell law) as:

Where *μ*_{0} is as defined earlier, *I* is the current in amps and *r* is the distance from the wire you’re measuring the magnetic field.

The magnetic field at the center of a current loop is given by:

Where *R* is the radius of the loop, and the other symbols are as defined previously.

Finally, the magnetic field of a solenoid is given by:

Where *N* is the number of turns and *L* is the length of the solenoid. The magnetic field of a solenoid is largely concentrated in the center of the coil.

## Example Calculations

Learning to use these equations (and ones like them) is the main thing you’ll have to do when calculating a magnetic field or the resulting magnetic force, so an example of each will help you tackle the sort of problems you’re likely to encounter.

For a long straight wire carrying a 5-ampere current, (i.e., I = 5 A), what is the magnetic field strength 0.5 m away from the wire?

Using the first equation with I = 5 A and r = 0.5 m gives:

Now for a current loop carrying I = 10 A and with a radius of r = 0.2 m, what is the magnetic field at the center of the loop? The second equation gives:

Finally, for a solenoid with N = 15 turns in a length of L = 0.1 m, carrying a current of 4 A, what is the magnetic field strength in the center?

The third equation gives:

Other example magnetic field calculations might work a little differently – for example, telling you the field at the center of a solenoid and the current, but asking for the N/L ratio – but as long as you’re familiar with the equations, you won’t have problems answering them.

References

- Michigan State University: Magnetic Field of a Long Wire
- Rochester Institute of Technology: Solenoids and Magnetic Fields
- Georgia State University: HyperPhysics: Solenoids
- Georgia State University: HyperPhysics: Magnetic Field of Current Loop
- GeoSci: Ampere-Maxwell
- Georgia State University: HyperPhysics: Biot-Savart Law
- Georgia State University: HyperPhysics: Magnetic Field Strength H
- Khan Academy: What Are Magnetic Fields?
- Georgia State University: HyperPhysics: Magnetic Field
- Isaac Physics: Magnetic Fields
- Massachusetts Institute of Technology: Explained: Dynamo Theory
- Space: How the Sun's Magnetic Field Works (Infographic)

About the Author

Lee Johnson is a freelance writer and science enthusiast, with a passion for distilling complex concepts into simple, digestible language. He's written about science for several websites including eHow UK and WiseGeek, mainly covering physics and astronomy. He was also a science blogger for Elements Behavioral Health's blog network for five years. He studied physics at the Open University and graduated in 2018.