Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Earth’s magnetic field. Origin, structure and compass

What is the Earth's magnetic field, how is it generated and how does it help us?

The online simulations of the Earth’s magnetic field on this page will help us to better understand how this important element of the Earth is created and how it works. We will discover the origin and structure of the Earth’s magnetic field and its most important characteristics, as well as its important application for navigation on Earth thanks to the magnetic compass

What is the Earth’s magnetic field

The Earth’s magnetic field is a gigantic magnetic field that surrounds the Earth. It is a fundamental feature of our planet that plays a crucial role in protecting life and guiding navigation. This magnetic field, also known as the magnetosphere, is generated by the Earth’s outer core, composed mostly of liquid iron and nickel.

Origin of the Earth’s magnetic field

The origin of the Earth’s magnetic field is believed to be the convection of molten material in the Earth’s outer core. The difference in rotation between the solid inner core and the liquid outer core, together with heat transfer within the core, creates electric currents that in turn cause the magnetic field.

Structure of the Earth’s magnetic field. Magnetic poles

The origin of the Earth’s magnetic field is what gives rise to its structure. The structure of the terrestrial magnetic field is complex, although it can be simplified by assimilating it to a magnetic dipole, i.e., it has a magnetic north pole and a magnetic south pole. However, the axis of the magnetic dipole does not coincide exactly with the Earth’s axis of rotation, resulting in an inclination of the magnetic field relative to the equatorial plane. This means that the magnetic compass does not point exactly to geographic north, but is deflected depending on location.

Reversal of the Earth’s magnetic field

The phenomenon of the reversal of the Earth’s magnetic field is a natural and fascinating process that has occurred multiple times in the history of our planet. During a reversal, the north and south magnetic poles exchange their positions, which can take thousands of years to complete. Given the origin of the Earth’s magnetic field, this change is due to alterations in the electrical currents of the Earth’s outer core, which generate the magnetic field. Although these events are infrequent, their study remains crucial to better understand the Earth’s internal dynamics and their impact on the planetary environment.

Earth’s magnetosphere

The Earth’s magnetosphere is a region surrounding our planet, formed by the Earth’s magnetic field. The Earth’s magnetosphere extends from the core to outer space, protecting our planet from the charged particles of the solar wind. These particles, mainly electrons and protons, are emitted by the Sun and are electrically charged. When they interact with the Earth’s magnetic field, they are deflected and channeled around the Earth in the form of Van Allen radiation currents, creating a kind of protective shield. The particles, when deflected towards the polar regions, produce the northern and southern auroras, creating an impressive natural spectacle.

Magnetic compass

In addition to its protective function, the Earth’s magnetic field has a significant impact on navigation. A magnetic compass uses the magnetic field for orientation, which has been fundamental to maritime navigation throughout history. A magnetic compass consists of a magnetized needle that always points to magnetic north, a rotating base, and a transparent cover that protects the instrument.

In summary, the online simulations of the Earth’s magnetic field on this page show interactively how the magnetic field acts and how the compass takes advantage of it to point north. Don’t miss them!

Simulations of the Earth's magnetic field

Magnetic compass


Ever wonder how a compass works to pinpoint the Arctic? Explore the interactions between a compass and a bar magnet, then add the earth and find the surprising answer! Vary the strength of the magnet, and see how things change both inside and out. Use the field meter to measure the changes in the magnetic field.


Licencia de Creative Commons

Magnetic field of a bar I


The structure of the Earth’s magnetic field can be modeled using a bar magnet.  The space where the magnetic force of the magnet acts is called the magnetic field. This simulation of the magnetic field shows what the magnetic field around a magnetized bar looks like. The direction of the magnetic field is determined in the direction indicated by the N pole of the magnetic needle placed at that point.
Click here to start the simulation

Magnetic field of a bar II


The structure of the earth’s magnetic field can be modeled using a bar magnet.  In this simulation of the magnetic field you can see the magnetic field around a bar indicated by arrows or compasses.
Click here to start the simulation

Magnet and compass


Ever wonder how a compass works to pinpoint the Arctic? Explore the interactions between a compass and a bar magnet, then add the earth and find the surprising answer! Vary the strength of the magnet, and see how things change both inside and out. Use the field meter to measure the changes in the magnetic field.

Screen too narrow

This Java simulation cannot run on this device because it has a screen that is too narrow. We recommend that, for a better user experience, you run it on a device with a wider screen.

Narrow screen

Although this Java simulation can be run on your device, we recommend that for the better user experience, you run it on a device with a wider screen.


Licencia de Creative Commons

STEM education equipment

Earth Sciences courses

You may also be interested

You may also be interested

Created by potrace 1.16, written by Peter Selinger 2001-2019