How does a magnet work?
When you bring a magnet close to a spoon, it attracts it – even without touching it. This happens because a magnet creates a magnetic field around itself. Thanks to this field, a magnet can attract or repel other magnets and act on ferromagnetic materials (such as iron or common steel).
The magnetic field is invisible, but you can see it using iron filings. If you place a magnet under a sheet of paper and sprinkle filings on top, they arrange themselves into characteristic lines. These lines are called magnetic field lines, and they show the direction and relative strength of the field. The closer the lines are, the stronger the magnetic field is in that area [00:23].
Magnetic field lines emerge from one end of the magnet and enter the other, which defines their direction. They form closed loops. The places where the magnetic field lines leave and enter the magnet are called the poles of the magnet:
- from the north pole (N) the field lines emerge,
- into the south pole (S) the field lines enter.
The direction of magnetic field lines and the way they form closed loops, along with their tendency to follow the smoothest and most energy-efficient paths, determine the behaviour of two magnets when they are close to each other.
Although each magnet can close its field lines within the magnet itself, the presence of a nearby opposite pole causes the field lines to follow a smoother and more energy-efficient path. Therefore, with opposite poles (N–S), the field lines connect between the magnets and form a single magnetic field. The result is attraction.
Conversely, when the same poles (N–N or S–S) face each other, the field lines cannot connect smoothly – they would point against each other. Such an arrangement is energetically unfavourable, so the magnetic field is pushed out into the surrounding space. This outward deflection of the field is observed as repulsion between the magnets.
You might ask: is it possible to get only a north pole or only a south pole from a magnet? No. A “pole” is not a part of the magnet that you can remove – it is the place where the magnetic field lines leave the magnet and the place where they enter it. Since the magnetic field lines form closed loops, both must always be present.
Therefore, when you cut a magnet, you do not separate the north pole from the south pole. The magnetic field in each part rearranges to form closed loops again – and in this way two new pairs of places where the field lines leave and enter are created. The result is two smaller magnets, each with its own north and south pole. This principle also applies when a magnet is divided into even smaller parts – a separate “single pole” will not appear.
We already know that there are always two poles. But where does the magnetic field itself come from? To understand this, we need to look at the level of atoms – at electrons, their spin, and how their magnetic effects in atoms (and between atoms) combine or cancel out. This determines whether a material is attracted by a magnet, whether it can arrange itself to become a magnet with its own magnetic field, or whether its response to a magnetic field is so weak that we hardly notice it in everyday life.
To understand where the magnetic field comes from, we need to look at the level of atoms. At the centre of an atom is the nucleus, made up of positively charged protons and electrically neutral neutrons. Around the nucleus are negatively charged electrons.
We know that electrons, protons and neutrons have mass. Protons and electrons have electric charge. Do these particles have any other property?
Yes, there is one that is essential for magnetism, even though it is not often discussed. It is called spin.
Spin is a purely quantum property that has no counterpart in classical physics. Because of spin, elementary particles have a magnetic moment – a magnetic effect. In simple terms, we can imagine particles with spin as tiny magnets.
All elementary particles have spin, but its magnetic effect is most significant in electrons. That is why electrons are key for magnetism.
Electron spin is the main contribution to the magnetism of an atom, though not the only one. When an electron moves around the nucleus, it behaves like a tiny electric current – and every current creates a magnetic field. This field is the second contribution to the magnetism of the atom and is called the orbital magnetic field.
It may therefore seem that every atom must be magnetic – electrons have a magnetic moment due to spin and also move within the atom, thereby creating an orbital magnetic field. At first glance, every atom should therefore be magnetic, and consequently every material made of such atoms.
In reality, however, it is not that simple. In many atoms, the magnetic effects of electrons cancel each other out, so the atom as a whole has no resulting magnetic moment. And even when individual atoms do have a magnetic moment, this still does not mean that the material will show magnetic behaviour – either as a magnet or by responding noticeably to a magnetic field.
For a material to be magnetic overall, it is not enough that electrons have spin and create a magnetic field. Several conditions must be met at multiple levels:
- Favourable arrangement of electrons in the atom – so that the atom has a magnetic moment, typically due to the presence of unpaired electrons.
- Favourable arrangement of atoms in a solid – so that the magnetic moments of neighbouring atoms can align with each other and enable the formation of magnetic domains.
- Favourable arrangement and behaviour of magnetic domains – so that the material shows magnetic behaviour.
Let us look at the individual conditions in more detail:
1. Favourable arrangement of electrons in the atom
Electrons in an atom occupy orbitals. One orbital can contain at most two electrons. If there are two electrons in an orbital, they have opposite spins, and their magnetic effects largely cancel each other out. Similarly, the effects of their motion within the atom can also cancel out.
A fully occupied orbital usually does not contribute to the overall magnetism of the atom. For an atom to contribute to magnetism, it must have at least one unpaired electron – that is, an electron occupying an orbital on its own.
2. Favourable arrangement of atoms in a solid
The mere presence of unpaired electrons and the magnetic effect of individual atoms is not enough for a material as a whole to behave like a magnet.
This is because the magnetism of a material as a whole is also influenced by the arrangement of atoms in a solid. In some materials, the magnetic moments of neighbouring atoms can align in the same direction, which is energetically favourable for the system. In other materials, however, these moments do not align uniformly, and the result is that the material as a whole is not magnetic.
Right: misaligned moments – their magnetic moments cancel each other out.
Even if the magnetic moments of atoms in a material are able to align, they do not usually align uniformly throughout the entire volume of the material. Instead, they align only locally – in smaller regions called magnetic domains.
Each piece of material usually consists of many such domains. Within one domain, the magnetic moments of atoms are oriented in the same direction, but individual domains may be oriented differently. Their magnetic effects can therefore cancel each other out.
– their individual magnetic effects cancel each other out.
For example, in an ordinary piece of iron there are many domains that are oriented differently. Their effects therefore cancel each other out, and the iron itself does not show magnetic behaviour. Only when the iron is placed in an external magnetic field (for example near a magnet or in a field created by an electric current) can the domains rearrange and begin to orient more uniformly. Only then does the material become a magnet.
In the previous section, we saw that the magnetism of a material is determined by the behaviour of magnetic domains. This raises an important question: what happens when the external magnetic field is removed?
The difference between materials lies in how firmly the domains are bound within the crystal structure of the material and how easily they can return to their original arrangement after the field is removed.
Materials in which the domains easily return to their original disordered state after the field is removed are called magnetically soft. In contrast, materials in which the domains are more firmly bound, so that once they become aligned they can maintain this arrangement even without an external magnetic field, are referred to as magnetically hard.
A permanent magnet is a magnetically hard material that has been magnetised – its domains are aligned and, after the external field is removed, they do not spontaneously return to a disordered state. Therefore, it can maintain its own magnetic field for a long time.
Special materials and alloys are used to manufacture strong permanent magnets, for example those based on neodymium, iron and boron.
Watch the video for an even better understanding – clear visualisations and specific examples that will quickly clarify magnetism.
