Spin-½: Pauli Matrix Algebra
An electron has no size, no rotating charge distribution — and yet it behaves as if it were spinning, carrying angular momentum and a magnetic moment (a measure of how strongly it aligns with, and responds to, a magnetic field) that Stern and Gerlach measured in 1922. Three 2×2 matrices, the Pauli matrices, capture the entire algebra of this "impossible" classical-looking property.
Spin as intrinsic angular momentum
Orbital angular momentum L̂ comes from a particle's motion through space and can, in principle, be zero. Spin Ŝ is different: it is an intrinsic property, present even for a particle at rest, that obeys the same commutation algebra as orbital angular momentum but takes half-integer as well as integer values. An electron has spin quantum number s = ½ — its spin angular momentum magnitude is fixed at |S| = √(s(s+1))ℏ = (√3/2)ℏ, and its projection along any chosen axis can only take two values, ±ℏ/2.
The Pauli matrices σx, σy, σz
For spin-½, the spin operators are Ŝᵢ = (ℏ/2)σᵢ, where the three Pauli matrices act on a two-component spinor |ψ⟩ = (a, b)ᵀ:
⎣1 0⎦ ⎣i 0⎦ ⎣0 −1⎦
Each Pauli matrix is Hermitian (real eigenvalues ±1), traceless, and squares to the identity: σᵢ² = I. Together with I they span the full space of 2×2 Hermitian matrices — every spin-½ operator, and every single-qubit quantum gate, can be written as a real linear combination of {I, σx, σy, σz}.
Commutation and anticommutation relations
The Pauli matrices satisfy two complementary algebraic identities that together determine essentially all of spin-½ physics:
{σᵢ, σⱼ} = 2δᵢⱼ I anticommutator — Clifford algebra / orthogonality
The commutator [σx, σy] = 2iσz (and cyclic permutations) is exactly the SU(2) angular momentum algebra [Ŝᵢ, Ŝⱼ] = iℏεᵢⱼₖŜₖ, confirming spin really does transform like angular momentum under rotations. The anticommutator {σᵢ, σⱼ} = 0 for i≠j says different Pauli matrices are "maximally incompatible" — measuring Sx destroys any previously known value of Sy, which is the algebraic root of why Stern-Gerlach measurements along different axes disagree.
Spin operators and eigenstates
σz is diagonal, so its eigenstates are the computational basis vectors, conventionally called spin-up and spin-down:
⎣0⎦
|↓⟩ = ⎡0⎤, Ŝz|↓⟩ = −ℏ/2|↓⟩
⎣1⎦
Because σz does not commute with σx or σy, |↑⟩ and |↓⟩ are not eigenstates of Sx or Sy — a spin measured "up" along z and then measured along x gives +ℏ/2 or −ℏ/2 with equal 50/50 probability. This is the spin-½ analogue of the Δx·Δp uncertainty relation, expressed through non-commuting spin components rather than position and momentum.
The Bloch sphere
Any normalised spin-½ state (up to an overall irrelevant phase) can be parametrised by two angles (θ, φ) and pictured as a point on the unit sphere:
The expectation value ⟨ψ|σ⃗|ψ⟩ then traces out exactly the point (sinθ cosφ, sinθ sinφ, cosθ) — a unit vector on the Bloch sphere. The north pole is |↑⟩, the south pole is |↓⟩, and every point on the equator is an equal superposition differing only by relative phase φ, such as the x-eigenstates (|↑⟩+|↓⟩)/√2 and (|↑⟩−|↓⟩)/√2. Rotating the physical spin by an angle α about an axis n̂ corresponds exactly to rotating its Bloch vector by α about n̂ — the same picture used for a single qubit in quantum computing.
The Stern-Gerlach experiment
In 1922, Otto Stern and Walther Gerlach fired a beam of silver atoms through an inhomogeneous magnetic field. A classical magnetic dipole with a continuous range of orientations would produce a smeared, continuous spread on the detector screen. Instead, the beam split into exactly two discrete spots.
| Prediction | Classical (continuous moment) | Observed / quantum |
|---|---|---|
| Deflection pattern | Continuous smear | Two discrete spots |
| z-projection of moment | Any value in [−μ, +μ] | Only ±ℏ/2 (two values) |
| Sequential SG (z then x) | All atoms should split identically each time | Each measurement re-randomises the next axis's outcome |
This is the direct experimental fingerprint of spin quantisation: measuring Sz along any axis always returns exactly one of the two eigenvalues ±ℏ/2, never anything in between, and never a continuous distribution.
Rotating a spinor in code
A rotation of the physical spin by angle θ about axis n̂ is generated by exponentiating the corresponding Pauli operator; for spin-½ this exponential truncates to a simple closed form because (n̂·σ⃗)² = I:
// Spinor as [re_up, im_up, re_down, im_down]; rotate about axis n by angle theta
function rotateSpinor(spinor, nx, ny, nz, theta) {
const c = Math.cos(theta / 2);
const s = Math.sin(theta / 2);
// R = c*I - i*s*(nx*sx + ny*sy + nz*sz), applied to [a, b]
const [aRe, aIm, bRe, bIm] = spinor;
const aRe2 = c*aRe + s*nz*aIm + s*ny*bRe - s*nx*bIm;
const aIm2 = c*aIm - s*nz*aRe + s*nx*bRe + s*ny*bIm;
const bRe2 = s*ny*aRe - s*nx*aIm + c*bRe + s*nz*bIm;
const bIm2 = s*nx*aRe + s*ny*aIm - s*nz*bRe + c*bIm;
return [aRe2, aIm2, bRe2, bIm2];
}
// Bloch vector from a spinor: , ,
function blochVector([aRe, aIm, bRe, bIm]) {
return {
x: 2 * (aRe*bRe + aIm*bIm),
y: 2 * (aRe*bIm - aIm*bRe),
z: aRe*aRe + aIm*aIm - bRe*bRe - bIm*bIm
};
}
🧲 Run the quantum spin simulation
Heisenberg model spin lattices, magnetism, and Bloch sphere rotations