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

Earth’s magnetic field. Origin, structure and compass

27/03/2026

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!

Explore the exciting STEM world with our free, online, simulations and accompanying companion courses! With them you’ll be able to experience and learn hands-on. Take this opportunity to immerse yourself in virtual experiences while advancing your education – awaken your scientific curiosity and discover all that the STEM world has to offer!

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.

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.

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

“If I have seen further, it is by standing on the shoulders of giants”

Isaac Newton

Your path to becoming a giant of knowledge begins with these top free courses
Your path to becoming a giant of knowledge begins with these top free courses

Test your knowledge

Earth’s magnetic field is a vast magnetic structure that surrounds the planet and acts as a protective shield against charged particles from the Sun. Its origin lies in the outer core, a layer composed mainly of liquid iron and nickel. In this region, heat causes convection currents in the molten material, while the inner solid core rotates at a slightly different rate. These combined motions generate electric currents, which in turn produce the magnetic field through a mechanism known as the geodynamo. Although the field is often represented as a simple dipole with a north and south magnetic pole, its real structure is far more complex and constantly changing. This magnetic field is essential for maintaining conditions suitable for life and has played a crucial role in navigation throughout human history.
Earth’s magnetic field can be approximated as a dipole, with a magnetic north and south pole. However, the dipole axis does not perfectly align with Earth’s rotational axis, creating an inclination that affects compass readings. The field is also dynamic: throughout Earth’s history, magnetic reversals have occurred, during which the magnetic poles switch places. These reversals, which take thousands of years, result from changes in the electric currents within the outer core. Another key component is the magnetosphere, a region extending from Earth’s interior into space. Here, the magnetic field deflects charged particles from the solar wind, forming radiation belts and producing auroras near the poles. This dynamic structure protects the planet and helps scientists study the interaction between Earth and its space environment.
Because a compass aligns with the magnetic north pole, not the geographic one. These two points are not in the same place, since Earth’s magnetic field is slightly tilted compared to the planet’s axis of rotation. As a result, the compass needle always points toward the magnetic pole, which changes position over time as the magnetic field evolves. This means that depending on where you are on Earth, the compass will show a small deviation from true north. Even with this difference, compasses remain very useful tools for navigation.
The magnetosphere is a region surrounding Earth that is shaped by the planet’s magnetic field. Its main role is to protect us from the solar wind, a stream of charged particles coming from the Sun. When these particles reach Earth, the magnetosphere deflects them and guides them around the planet, forming areas such as the Van Allen radiation belts. This protection prevents the atmosphere from being stripped away and shields living organisms from harmful radiation. When some particles enter near the poles, they create auroras, producing beautiful displays of light in the sky.
It means that the magnetic north and south poles can switch places. This process does not happen suddenly; it takes thousands of years to complete. The reversal occurs because the electric currents in the outer core, which generate the magnetic field, change their pattern. Although it may sound alarming, magnetic reversals have happened many times in Earth’s history without causing major disasters. What changes is the orientation of the field and the way the magnetosphere interacts with the solar wind. Scientists study these reversals to better understand Earth’s interior and the long‑term behavior of its magnetic field.

You may also be interested

Created by potrace 1.16, written by Peter Selinger 2001-2019
Cargando clima y ubicación...

You may also be interested

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