How do we use magnets to take pictures of the brain?
Magnets are everywhere – they exist in our electronics, cars, refrigerators, and so on. The Earth itself is one giant magnet, which is why we can use compasses to navigate! They also have many incredible biomedical applications, including magnetic resonance imaging (MRI), which allows us to take pictures of biological tissues and organs in a non-invasive manner. In fact, many of you may have had MRI scans of body parts to assess injuries. I recently wrote about a neuroimaging technique called diffusion MRI, which lets us look at the physical connections in the brain that allow different regions to communicate with one another. But now I want to take a step back, and answer the following question: how do we use magnets to take pictures of the brain in the first place?
The Basics of Magnetism
First, it will be helpful to understand what magnets really are. We are all familiar with the kind of magnets that stick to our refrigerators (unless you have a stainless steel refrigerator – more on that in a moment). These are permanent magnets – objects made up of a material that has been magnetized and therefore produces its own magnetic field. However, only a few materials can actually be magnetized, and these happen to be the same materials that are strongly attracted to magnets – iron, nickel, and cobalt (not stainless steel!). These are called ferromagnetic materials, and are the only materials whose magnetic attraction is strong enough to be felt naturally. There are other types of magnetic materials (including paramagnetic and diamagnetic substances), but their forces are too weak for us to notice without the use of sensitive measuring instruments. Nonetheless, what I want to convey through this article is that anything can be affected by magnetism with a strong enough magnet. Magnetism is a fundamental force (indeed, it is one of the four fundamental forces in physics, and the only one besides gravity that we can experience!) that deals with the nature of matter itself.
So what makes a magnet magnetic? It’s all about electrons, which are subatomic particles that exist in all atoms. Electrons have a negative charge and are always moving (or rather – spinning*), and this movement is responsible for both electricity and magnetism (as these words suggest, magnetism is actually one part of a force called electromagnetism). More specifically, electrons that are spinning around something produce an electric current. This electric current (and indeed all electric currents) creates a magnetic field. Electrons are naturally always spinning around their own axis, so they each create their own small magnetic field. Usually, in any given chunk of matter, all of the electrons are spinning around axes that are pointing in different directions, so their small magnetic fields cancel each other out, which is why most materials aren’t magnetic on a macroscopic scale. However, with ferromagnetic materials, we can force all of the spinning electrons to point in the same direction so that there is a net negative charge on one end and a net positive charge on the other, thus creating a magnet. Depending on how easy it is to force these spinning electrons to line up, it may become permanently magnetized, or only be magnetized when exposed to another magnet (this is what usually happens when we stick a magnet onto metal). This special property of ferromagnetic materials (the ability to realign their spinning electrons in the presence of an external magnetic field) is what makes magnets “sticky”; when you have two objects each with a negative charge on one end and a positive charge on the other, the opposite forces will attract each other.
Aside from permanent magnets, we can actually create another type of magnet called an electromagnet simply by running an electric current through a coiled wire, forcing the electrons to spin around. You may be familiar with this concept if you ever did the experiment in grade school where you create a temporary magnet by wrapping a copper-coated wire around a nail, and taping the ends of the wire to a battery to allow a current to flow through – rendering the nail magnetic! These objects will only remain magnetic as long as there is an electric current flowing, so they require a constant source of energy. 
How do MRI magnets probe biological tissue?
Because all atoms contain charged subatomic particles, any material can be affected by a magnet if the magnet is strong enough – even the stuff we are made of! This is where MRI comes in.
MRI actually works on the protons – positively charged subatomic particles – in our bodies (I’ll explain why in a moment, but for now simply note that protons require less energy to perturb than electrons). When someone is placed within an MRI machine, which is basically a large, strong electromagnet, all the protons in their body (which are also spinning around their own little axes just like electrons) align with the machine’s magnetic field.
Then, we send in a radio wave (an electromagnetic wave in the frequency range that radios use). In the MRI world, we call these waves radio frequency (RF) pulses. The RF pulse that we send in tips the protons out of alignment from the main magnetic field. Importantly, not just any RF pulse will do. In order to be able to exchange energy with the protons, the RF pulse needs to have the same frequency as the protons spinning about their axis. This is the concept of resonance (the R in MRI). Schering explains it in an intuitive, comical way: “This is as if someone were looking at you. You may not notice it, because there is no exchange of energy, so you do not change your position/alignment. However, if someone were to pound you in the stomach, exchange energy with you, your alignment would be disturbed” . Then, when the RF pulse is turned off, the protons start to re-align themselves with the main field. As they do so, they emit an energy signal that we can measure! The protons in different tissues re-align themselves at slightly different rates, and this is how we are able to create an image that shows contrast between different areas.
A note on the safety of electromagnetic radiation
One of the tremendous clinical strengths of MRI is that it is a very safe procedure (as long as caution is taken to not bring any metal around the scanner, as the large magnet will suck it in!). As I mentioned before, the RF pulses sent into the body by the MRI machine are electromagnetic waves in the radio-frequency range, which has the lowest energy along the electromagnetic spectrum (see the figure below). This level of electromagnetic radiation poses no health risk to humans. On the other hand, x-ray scans (appropriately named after the type of electromagnetic wave they use), give off much higher energy and can cause damage to tissue. This is what makes them useful in radiation therapy to kill tumors, and it’s also why x-ray scans pose a very slight health risk. The use of RF pulses is also why MRI works on protons instead of electrons, which would require pulses in the microwave frequency (yes, the same microwaves you use to heat your food!) to get the same effect.
Magnets are like magic
I may be biased since I work with MRI on a daily basis, but to me, magnets are fascinating. It blows my mind that we can take advantage of one of the fundamental forces of physics to, quite literally, re-orient the nature of matter itself to not only make possible the technology that we use daily, but to probe living tissue and learn more about one of the most complex and mysterious objects – the human brain. I hope I’m not alone in being captivated and enthralled by these ideas, but perhaps I’m more enthusiastic than others. While working with the magnetic properties of matter seems kind of magical (at least to me), it’s really just physics!
*Note: I feel obligated to point out that electrons (and other subatomic particles like protons) are not truly spinning around an axis, but this is an extremely helpful way to imagine this whole picture and have an intuitive feel for how magnetic fields are generated. The truth is a bit more abstract and requires more understanding of quantum mechanics. Kurt T. Bachmann of Birmingham-Southern College writes:
“Spin is a bizarre physical quantity. It is analogous to the spin of a planet in that it gives a particle angular momentum and a tiny magnetic field called a magnetic moment. Based on the known sizes of subatomic particles, however, the surfaces of charged particles would have to be moving faster than the speed of light in order to produce the measured magnetic moments. Furthermore, spin is quantized, meaning that only certain discrete spins are allowed. This situation creates all sorts of complications that make spin one of the more challenging aspects of quantum mechanics. In a broader sense, spin is an essential property influencing the ordering of electrons and nuclei in atoms and molecules, giving it great physical significance in chemistry and solid-state physics… Indeed, many if not most physical processes, ranging from the smallest nuclear scales to the largest astrophysical distances, depend greatly on interactions of subatomic particles and the spins of those particles.”
 Schild, H.H. (1990). MRI Made Easy (… Well Almost). Schering. (https://rads.web.unc.edu/wp-content/uploads/sites/12234/2018/05/Phy-MRI-Made-Easy.pdf)