What Is the Magnetic Quantum Number: ml Explained

The magnetic quantum number, written as ml, describes the orientation of an electron’s orbital in three-dimensional space. It is one of four quantum numbers used to specify the complete state of an electron in an atom, and its allowed values are all integers from −l to +l, where l is the angular momentum quantum number. So if l = 1, ml can be −1, 0, or +1, giving three possible orientations.

How It Fits With the Other Quantum Numbers

Every electron in an atom is described by four quantum numbers, and they follow a strict hierarchy. The principal quantum number (n) sets the energy level: n = 1, 2, 3, and so on. The angular momentum quantum number (l) defines the shape of the orbital and can be any integer from 0 up to n − 1. The magnetic quantum number (ml) then specifies which orientation that orbital takes in space, ranging in integer steps from −l to +l. A fourth quantum number, the spin quantum number, describes the electron’s intrinsic spin direction.

Because ml depends on l, and l depends on n, the allowed values cascade downward. For example, if n = 3, then l can be 0, 1, or 2. When l = 2, ml can be −2, −1, 0, +1, or +2. Each of those five values corresponds to a distinct d orbital pointing in a different direction.

What ml Actually Tells You

Spherical orbitals (l = 0, called s orbitals) look the same no matter how you rotate them, so there is only one orientation and ml is always 0. But orbitals with more complex shapes can point in different directions relative to a coordinate system, and that is exactly what ml distinguishes.

Take the p orbitals (l = 1). They have a dumbbell shape, and there are three of them: one aligned along the x-axis, one along the y-axis, and one along the z-axis. These are labeled px, py, and pz, and they correspond to the three allowed values of ml: −1, 0, and +1. The d orbitals (l = 2) have a cloverleaf shape and come in five orientations, matching ml values of −2, −1, 0, +1, and +2. The f orbitals (l = 3) have seven orientations.

Counting Orbitals in a Subshell

The total number of orbitals in any subshell is 2l + 1. This formula comes directly from the range of ml values. Here is how it works across common subshells:

  • s subshell (l = 0): 2(0) + 1 = 1 orbital
  • p subshell (l = 1): 2(1) + 1 = 3 orbitals
  • d subshell (l = 2): 2(2) + 1 = 5 orbitals
  • f subshell (l = 3): 2(3) + 1 = 7 orbitals

Since each orbital can hold two electrons (one for each spin), the maximum number of electrons in a subshell is 2(2l + 1). A p subshell holds up to 6, a d subshell up to 10, and so on.

Why It Is Called “Magnetic”

The name comes from the behavior of these orbitals in an external magnetic field. Under normal conditions, all orbitals within the same subshell have exactly the same energy. The three p orbitals, for instance, are energetically identical. Physicists call these “degenerate” orbitals.

When you place an atom in a magnetic field, that degeneracy breaks. Each orbital with a different ml value shifts to a slightly different energy. A p subshell that produced a single spectral line will, in a magnetic field, produce three separate lines. This splitting is called the Zeeman effect, and the number of split levels is exactly 2l + 1, matching the number of ml values. The pattern and amount of splitting reveal both the presence of a magnetic field and its strength. This is why ml earned its name: it only matters, in terms of energy, when a magnetic field is involved.

Experimental Evidence: The Stern-Gerlach Experiment

The idea that angular momentum is quantized, meaning it can only take discrete orientations rather than any angle, was confirmed experimentally in 1922. Otto Stern and Walter Gerlach sent a beam of neutral silver atoms through an uneven magnetic field at the University of Frankfurt. Classical physics predicted the atoms would spread out into a continuous smear on the detector. Instead, the beam split into distinct, separate spots.

This result showed that the magnetic moment of each atom, which is tied to its angular momentum, could only point in a fixed number of directions relative to the field. That “space quantization,” as physicists call it, is precisely what the magnetic quantum number describes. Each discrete spot on the detector corresponded to a different allowed value of ml.

A Worked Example

Suppose you need to find all possible ml values for an electron in a 4d orbital. The “4” tells you n = 4. The “d” tells you l = 2. From there, ml ranges from −2 to +2 in integer steps: −2, −1, 0, +1, +2. That gives five orbitals, each pointing in a different spatial direction. If the question asked about a 4f orbital instead, l would be 3, and ml would run from −3 to +3, yielding seven orbitals.

The key rule to remember is simple: once you know l, you know everything. The magnetic quantum number is just every integer from −l through zero to +l, and the count of those integers, 2l + 1, tells you how many orbitals exist in that subshell.