How a Laser Works

A pumped gain medium between two mirrors. Below threshold it glows weakly; above it, stimulated emission builds a narrow beam.

Controls

Live readouts

Numerical checks

What to try
  • Press "Switch pump on": inversion x = N/N_th climbs to 1, overshoots, and the output fires as damped spikes (relaxation oscillations) in a solid-state medium (pick Nd:YAG; He-Ne is overdamped and rises smoothly).
  • Lower the pump below the threshold marker on the middle plot: the output collapses to a faint spontaneous glow (the beam disappears).
  • Make the output mirror more transparent (smaller R2): threshold rises, but more of the intracavity light is coupled out per round trip.
  • Shorten the cavity: the mode spacing c/2L grows, so fewer longitudinal modes fit under the gain curve.
The science

A four-level gain medium is described by two rate equations, upper-level population N and intracavity photon number phi:

dN/dt = R - N/tau_sp - G N phi dphi/dt = G N phi - phi/tau_c + beta N/tau_sp

R is the pump rate, tau_sp the spontaneous lifetime, G the stimulated-emission coupling and beta (illustrative 1e-3) the fraction of spontaneous emission that lands in the lasing mode. The cavity photon lifetime follows from the round-trip loss:

delta = -ln(R1 R2) + delta_int, tau_c = 2L / (c delta)

Threshold is where gain equals loss, N_th = 1/(G tau_c), i.e. R_th = N_th/tau_sp. With x = N/N_th, y = G tau_sp phi, s = t/tau_sp and kappa = tau_sp/tau_c the system becomes dimensionless:

dx/ds = r - x(1+y), dy/ds = kappa [ y(x-1) + beta x ], r = R/R_th

Above threshold the steady state clamps the inversion at x = 1 and y = r - 1: extra pump all goes into light (gain clamping). Linearising there gives the relaxation oscillation, a damped spike train:

omega_d = sqrt( kappa (r-1) - ((1 + (r-1))/2)^2 ), decay rate (1+y0)/2

If kappa (r-1) is smaller than the squared damping term the response is overdamped: no spikes. This is why He-Ne (short tau_sp, "class A") never spikes while Nd:YAG (long tau_sp, "class B") does. Output power is P = eta_s P_th y with slope efficiency eta_s = eta_q (-ln R2)/delta; P_th scales with the total loss delta.

Longitudinal modes sit at multiples of c/2L. A Gaussian gain curve of width dnu_g, scaled by r, lets every mode with r exp(-4 ln2 (nu/dnu_g)^2) > 1 oscillate (small-signal count). Honest simplifications: single transverse mode, uniform pumping, no spatial hole burning or mode competition (a homogeneously broadened medium like Nd:YAG would settle on very few modes, so its count is an upper bound), no thermal effects. Gain-medium constants (tau_sp, linewidth, pump scale, quantum efficiency) are illustrative round numbers, not data sheets; the pump scale is in made-up watts per medium.