What EEG actually measures
An EEG electrode reads a voltage at the scalp — but that voltage is not a single neuron talking. It is the faint, summed echo of millions of cells, and it only becomes visible when they line up and fire together.
The signal does not come from action potentials. Those spikes are too fast and too small, and they fire at scattered times, so they cancel out from a distance. What an EEG actually picks up is the slower postsynaptic potential — the gentle voltage shift across a neuron's membrane when it receives input.
Even those are tiny. A single neuron produces a field measured in nanovolts at the scalp — far below the noise floor. The reason EEG works at all is summation: cortical pyramidal neurons are stacked in parallel, all pointing the same way, like a palisade. When a large population is active at the same moment, their little fields add into something measurable — tens of microvolts.
So two conditions must hold for a scalp signal to appear. Drag the controls and watch the summed trace climb out of the noise.
This single idea — that EEG measures synchrony, not raw activity — quietly explains almost everything that follows: why alpha waves appear when the cortex idles in unison, why a seizure produces such huge deflections, and why "more brain activity" does not always mean a bigger signal.
A single neuron's field is far too small to reach the scalp. The recorded voltage is the sum of many pyramidal-cell dipole fields:
where pᵢ is each cell's dipole moment and kᵢ a geometric weight. Synchrony is everything: if N cells fire together the sum grows with N; if they fire at random it grows only with √N.
So a million in-step neurons can dominate the trace while a million independent ones nearly cancel — which is why EEG measures coordination, not total activity.
Volume conduction
The signal doesn't reach the electrode in a straight line. It spreads outward through brain, skull, and scalp — so by the time it arrives at the surface, a pinpoint source has become a broad, blurry smudge.
A patch of active cortex behaves like a tiny current dipole. That current doesn't stay put: it flows through every conductive path available — brain, cerebrospinal fluid, skull, scalp. This is volume conduction, and it means a single source is "seen" by a wide swath of electrodes at once.
The skull makes it worse. Bone has very low conductivity, so it acts as a spatial low-pass filter — it smears the pattern sideways and shrinks its amplitude. Two more things shape what reaches the surface: depth (deeper sources are weaker and broader) and orientation (a dipole pointing straight out makes one focal peak; one lying flat makes a two-lobed +/− pattern).
Drag the dipole. Push it deep, pull it to the surface, flip its orientation, toggle the skull — and watch what the ring of electrodes actually records.
Notice that a tangential source (folded into a sulcus) produces a split positive/negative pattern whose peaks sit beside the source rather than over it — one reason scalp maps can be so misleading about where the activity really is.
A current dipole p in a medium of conductivity σ produces a potential that falls with distance r and depends on angle:
The low-conductivity skull between source and electrode acts as a spatial low-pass filter — the pattern is blurred and spread out. Each electrode therefore sees a weighted mixture of all sources (the forward model):
where s are the source currents, v the scalp voltages, and L the lead-field matrix fixed by head geometry and tissue conductivities. Recovering s from v is the (hard, ill-posed) inverse problem of Section 23.
The 10–20 system & montages
Before you can compare two recordings, the electrodes have to go in the same places — and the readings have to be wired up the same way. The 10–20 system is the shared map; a montage is the wiring diagram laid on top of it.
The name is literal. Electrode positions are set as steps of 10% and 20% of the distance along lines drawn between bony landmarks — the nasion (bridge of the nose), the inion (bump at the back of the skull), and the two preauricular points in front of the ears. Because the steps are percentages, the same layout scales to any head.
Names encode location. A letter gives the region — Fp (pre-frontal), F (frontal), C (central), P (parietal), O (occipital), T (temporal) — and a number gives the side: odd on the left, even on the right, z down the midline.
Click any electrode to inspect it. Raise the density, and switch montages to watch the same electrodes get rewired into the channels a reader actually scans.
Explore in 3DNotice that bipolar chains plot the difference between neighbours, so a sharp focus shows up as a phase reversal — two channels pointing at each other — which is exactly how clinicians pinpoint a spike. You'll see why once referencing is on the table in the next section.
Positions are set as percentages of the measured distances between skull landmarks (nasion–inion front-to-back, and pre-auricular ear-to-ear), stepped at 10% and 20% — hence "10–20":
Measuring in proportions, not centimetres, makes placement consistent across different head sizes. What you plot is then a montage — a linear combination of electrode voltages:
The same recording, viewed through different montages, emphasises different things — which is why the montage is chosen for the question being asked.
Referencing schemes
There is no such thing as the voltage at one electrode. EEG only ever measures a difference between two points — so every number you see depends on what you compared it against. The reference isn't a detail; it's half the measurement.
Because the reference is subtracted from every channel, whatever the reference electrode is picking up gets injected — inverted — into the entire recording. Put the reference somewhere quiet and the map stays honest; put it on top of an active source and that source smears across every channel at once.
The same recording can be re-referenced after the fact, and each scheme tells a different story: common (one shared reference), average (subtract the mean of all electrodes), bipolar (each channel is a neighbour minus neighbour), and the Laplacian (an electrode minus its surrounding ring). Below, one fixed brain — a focal spike plus a widespread rhythm — is shown through all four.
Watch the bipolar scheme with the focus mid-chain: the channel just above the source deflects one way and the channel just below deflects the other — a phase reversal that points straight at the source. That, not a single big trace, is how a focal spike is localised on a real EEG.
There is no absolute voltage — every EEG value is a difference between two points. The referencing scheme chooses what you subtract:
Each choice reshapes the view. A noisy reference injects its noise into every channel; the average reference forces the montage to sum to zero across the head; the Laplacian subtracts the local mean, sharpening focal sources and suppressing broad, shared activity.
Sampling, impedance & gain
The brain's signal is smooth and continuous; a computer can only store numbers. Three steps bridge that gap — and each one can quietly wreck the data if you get it wrong: how often you sample, how cleanly the electrode touches the scalp, and how you amplify and digitize what's left.
An EEG signal is measured in microvolts, far smaller than the noise around it, so it must be amplified and then turned into discrete numbers by an analog-to-digital converter. Sampling rate sets how many snapshots per second you take; impedance is how good the electrode-to-skin contact is; and gain & bit-depth set how finely the amplified voltage is sliced into numbers.
Pick a topic and push the controls to their limits to see each failure mode appear.
A useful rule of thumb: sample at least 3–4× the highest frequency you care about (not just the bare 2× Nyquist minimum), keep impedances low and balanced across electrodes, and leave amplifier headroom so a blink or movement doesn't clip.
Sampling. To capture a frequency f without distortion, sample above twice it (the Nyquist criterion):
Break it and a high frequency disguises itself as a lower one (aliasing):
Digitizing. An ADC of B bits spanning input range R has a voltage step of
Impedance. Johnson (thermal) noise from a contact impedance Z rises as
— which is why keeping impedance low directly buys you a cleaner signal.
Frequency bands
An EEG trace looks like a single wiggly line, but it's really many rhythms layered on top of one another. By long convention those rhythms are grouped into five bands, and the mix between them is a fingerprint of brain state — from deep sleep to intense focus.
The bands run slow to fast: delta (under ~4 Hz, deep sleep), theta (4–8 Hz, drowsiness and memory), alpha (8–13 Hz, relaxed wakefulness with eyes closed), beta (13–30 Hz, active thinking and movement), and gamma (above ~30 Hz, high-level cognition). The recorded signal is simply their sum.
Toggle each band on and off and drag its strength. Watch the individual rhythms add up into the composite trace, and read off which state the mixture resembles.
The boundaries are conventions, not hard walls — labs differ slightly on where alpha ends and beta begins, and "gamma" can mean anything from 30 to 100+ Hz. What's real is the underlying continuum of frequencies, which the next section pulls apart properly with the Fourier transform.
The recorded rhythm is simply a sum of oscillations at different frequencies, amplitudes, and phases:
"Band power" is the energy inside a frequency range — the area under the power spectrum between the band's edges:
The bands — δ (<4), θ (4–8), α (8–13), β (13–30), γ (>30 Hz) — are conventional slices carved from one continuous spectrum; the boundaries are agreements, not physics.
Time ↔ frequency
The single most important idea in signal analysis: any wiggle in time, however complicated, is exactly equal to a sum of plain sine waves. The Fourier transform is the machine that finds them — turning a wave you read left-to-right into a spectrum you read by frequency.
These are two views of the same thing. The time domain shows voltage moment by moment; the frequency domain shows how much of each rhythm is present. A pure tone becomes a single spike in the spectrum; mix two tones and you get two spikes — each peak's height is that component's strength.
Build a signal on the left and watch its spectrum on the right. Then try the presets: a sharp spike spreads across all frequencies, a square wave reveals a ladder of harmonics, and the EEG-like signal shows the 1/f slope and alpha bump real brains produce.
One subtlety worth seeing: the transform throws away nothing — it also stores the phase of each sine (when its peaks land), which is why the spectrum is unchanged if you slide the waveform sideways. Magnitude tells you what frequencies; phase tells you where they line up.
The Fourier transform rewrites any signal as a sum of sinusoids. For sampled data it is the discrete Fourier transform:
Each Xk is a complex number carrying an amplitude and a phase at frequency fk = k · fs / N:
The FFT evaluates this in N·log N operations instead of N². Frequency resolution is fixed by how long a record you transform:
The alpha rhythm & Berger effect
When Hans Berger made the first human EEG recordings in the 1920s, one thing leapt out: close your eyes and relax, and a steady ~10 Hz rhythm swells over the back of the head. Open them, or start thinking hard, and it vanishes. That on-off behaviour — the Berger effect — is the easiest brain rhythm to see for yourself.
This is alpha (8–13 Hz). It is strongest over the occipital and parietal scalp — the visual areas — and it is largely absent at frontal sites. It appears with relaxed wakefulness and eyes closed, and is blocked (desynchronized) by visual input or mental effort. Its presence is a quick sign of a healthy, awake, resting brain.
Close and open the eyes below, switch the recording site, and try a mental-arithmetic state — and watch the alpha rhythm and its power rise and fall.
The blocking is technically desynchronization: at rest, large pools of occipital neurons idle in synchrony at ~10 Hz (recall Section 01 — synchrony is what makes a signal visible). Engage the visual system and those neurons break step to do independent work, so the summed rhythm collapses even though the cortex is more active.
Alpha reactivity is quantified as the power in the 8–13 Hz band, and how far it drops when the eyes open:
The blocking itself is desynchronization: the idle occipital population sits in step near 10 Hz, so its fields sum coherently (∝ N). Engage the visual system and those neurons do independent work — the coherent sum collapses toward ∝ √N. It is the synchrony argument of Section 01 run in reverse.
Spectrograms
A single Fourier spectrum tells you which frequencies are in a recording — but not when. Brain activity is rarely steady: alpha comes and goes, a seizure builds, a spindle flickers past. The spectrogram solves this by running the FFT over and over on a sliding window, stacking the results into a picture of frequency changing through time.
Read it like a map: time runs left to right, frequency bottom to top, and colour shows power — cool where a rhythm is weak, hot where it's strong. A steady tone is a horizontal stripe; a rising chirp is a diagonal; a sharp spike is a vertical streak smeared across all frequencies at one instant.
The catch is the window. Drag it short for crisp timing but fuzzy frequency, or long for crisp frequency but smeared timing — you cannot sharpen both at once. The window box sweeping across the trace shows exactly which slice each column is built from.
This is the time–frequency uncertainty principle in practical form: a brief event is sharp in time but inherently broad in frequency (the spike's vertical streak), while a long steady rhythm is sharp in frequency but its on/off edges blur. Wavelet methods tackle this by using short windows for high frequencies and long windows for low ones — adapting the trade-off across the spectrum.
A spectrogram is the short-time Fourier transform: slide a window w along the signal and Fourier-transform each slice, then take its power:
The window length forces an unavoidable trade-off — you cannot be sharp in time and frequency at once:
Short window → precise timing, coarse frequency; long window → precise frequency, smeared timing. Wavelets adapt the window length per frequency to soften this limit.
The artifact zoo
Brain signals at the scalp are only tens of microvolts — so almost everything else the body does is bigger. A blink can be ten times the size of the rhythm you're hunting. Most of the skill in EEG is learning to recognise these intruders on sight, because each one has a tell-tale shape, location, and rhythm.
The give-aways are spatial and spectral. Eye artifacts shout at the frontal electrodes; muscle lives at the temporal sites and the fast end of the spectrum; mains hum sits at exactly 50 Hz everywhere; the heartbeat ticks at about 1 Hz; and an electrode coming loose produces a sharp jump on a single channel. Knowing where to look is half the battle.
Switch each intruder on and watch where and how it corrupts the four channels. The legend tracks what's active, and the worst-hit channel is highlighted.
A useful instinct: if something is far larger than everything around it, perfectly periodic, or confined to one channel or the very front of the head, distrust it. Real cortical rhythms are modest in amplitude, spatially smooth (Section 02), and rarely metronomic.
A recording is the brain signal plus a sum of artifact sources, each with its own scalp weighting w:
Artifacts are identified by three fingerprints:
Mains sits at exactly 50 Hz, muscle above ~20 Hz, heartbeat near 1 Hz; eyes weight the front, muscle the temples. Section 12 inverts this very equation — estimating the aᵢ and their weights — to subtract the artifact terms while keeping sbrain.
Filtering
Once you can name the intruders, the first tool for removing them is the filter: keep the frequencies you want, attenuate the rest. Three filters do most of the work — a high-pass to kill slow drift, a low-pass to kill fast muscle, and a narrow notch to kill mains hum.
A high-pass passes frequencies above its cutoff, so a 0.5–1 Hz high-pass flattens baseline wander while leaving brain rhythms intact. A low-pass passes frequencies below its cutoff, so a 40 Hz low-pass removes muscle fuzz. Together they form a band-pass. A notch carves out a narrow slice — at 50 Hz, exactly where the mains lives.
But filters are not free. Push the high-pass too high and you erase real slow activity; push the low-pass too low and you blunt sharp events. Drag the cutoffs and watch both the waveform and its spectrum respond.
Filtering is reversible only in the sense that you keep the raw data — the act itself discards information. Anything inside the stop-band is gone, including any brain activity that happened to live there. That's why heavier artifact problems are often better handled by decomposition, which can subtract an artifact without sacrificing a whole frequency range — the subject of the next section.
A filter multiplies the spectrum by a frequency response H(f), keeping some frequencies and attenuating others:
The same operation in the time domain is convolution with the filter's impulse response h:
A Butterworth filter of order n and cutoff fc has magnitude response
High-pass keeps f > fc, low-pass keeps f < fc, a notch zeros a narrow band at 50 Hz. Whatever falls in the stop-band is discarded — brain activity included.
ICA artifact removal
Filtering removes a whole frequency range — but a blink and a brain rhythm can overlap in frequency, so a filter can't separate them. Independent Component Analysis can. Instead of filtering by frequency, it filters by spatial pattern: it learns how each hidden source spreads across the electrodes, then pulls the sources apart.
Every electrode records a mixture of sources — brain rhythms plus artifacts like blinks and heartbeat. ICA estimates a set of independent components, and each arrives as a pair: a fixed scalp map (where it projects) and a time course (what it does). To rebuild a channel you add the components back up, each weighted by its map — so if you drop a component first, its contribution simply disappears from every channel at once.
That is the whole trick, and it differs from a frequency filter: removing the blink subtracts only its spatial pattern, leaving overlapping brain frequencies fully intact. Watch it directly below. Each channel's recorded trace (grey) is broken into the cleaned result (blue) plus a coloured layer for every component you remove — so recorded = cleaned + the artifacts taken out. The height of each coloured band follows that component's scalp map, which is why a blink towers over the frontal channels and all but vanishes at the back.
ICA treats the recording as a linear mixture. If x is the vector of the 5 channel voltages at one instant and s the hidden sources, then
ICA estimates the unmixing matrix W = A-1. Each row of W is a spatial filter — a set of channel weights that isolates one component's time course:
To clean the data you keep some components and rebuild — which is the same as subtracting the back-projection of the removed ones:
The columns Ai used in this demo — the scalp maps that define each filter — are the numbers below. A blink's map is frontal, the heartbeat's is near-uniform, and brain α is posterior:
Cells shaded by weight (pale = weak, deep = strong). Removing a component multiplies its whole column by zero.
The catch worth remembering: ICA assumes the sources are statistically independent and mix linearly, and it needs enough channels to separate them (you can't pull four sources cleanly out of two electrodes). It also can't label components for you — that judgement, by topography and time course, is still the human's job, though automated classifiers increasingly help.
Epoching & rejection
A raw recording is one long stream. To study the brain's response to an event, you cut that stream into short segments — epochs — time-locked to each stimulus, clean up their baselines, and throw out the ones ruined by artifacts.
Every event (a flash, a beep, a button press) leaves a marker in the recording. An epoch is a window around each marker — here −200 ms to +800 ms. The 200 ms before the event is the baseline: nothing has happened yet, so it should sit near zero. Slow drifts mean it often doesn't, so each epoch is baseline-corrected by subtracting its own pre-stimulus mean.
Then comes the ruthless part. A single blink can be 100 µV — five times the brain signal — and if it lands inside an epoch it will dominate everything computed from it. So any epoch whose amplitude exceeds a rejection threshold is discarded before it can do damage. Slide the threshold below and watch epochs flip between ✓ keep and ✕ reject; the blink-contaminated ones (E2, E5, E7) are the first to go.
Epoching cuts the continuous signal x(t) into fixed segments locked to each event time tₖ:
Baseline correction subtracts each epoch's own pre-stimulus mean so it starts at zero:
Rejection discards any epoch whose corrected amplitude ever exceeds the threshold θ:
The survivors are what gets averaged in Section 14. Because the average divides by the number of epochs, a single un-rejected 100 µV blink among twenty 20 µV epochs shifts the mean by ~5 µV — often larger than the effect being measured, which is why this step comes first.
Why averaging works
A single trial is almost all noise — the brain's response to one stimulus is buried under spontaneous activity ten times larger. Averaging many trials rescues it, because the response is the same every time while the noise is different every time.
Line up many epochs on the stimulus and add them together. The event-related potential (ERP) is time-locked: the same bumps appear at the same delays in every trial, so they reinforce. The background EEG is random relative to the stimulus, so across trials it partly cancels. The signal survives; the noise erodes.
The payoff is precise. Signal adds up in proportion to the number of trials N, but random noise grows only as √N — so the signal-to-noise ratio improves by √N. Four times the trials, half the noise; a hundred trials, a tenfold cleaner waveform. Watch the average below sharpen onto the true ERP (dashed) as trials accumulate.
Model each trial as the same signal s(τ) plus independent random noise ni(τ):
Average N of them. The signal term is unchanged; the noise terms average toward zero:
If the noise has standard deviation σ and is independent across trials, the averaged noise has standard deviation
The signal stays at full height while the noise shrinks as 1/√N, so the signal-to-noise ratio grows as √N. Halving the noise needs 4× the trials; a 10× improvement needs 100 — diminishing returns that set the practical length of every ERP experiment.
The component zoo
Once you have a clean average, its peaks and troughs are not random wiggles — each recurring deflection is a named ERP component with a characteristic timing, polarity, scalp location, and psychological meaning.
A component is defined by four things: when it peaks (latency), which way it goes (positive or negative), where on the scalp it is largest (topography), and what it responds to (its functional role). Naming follows a simple code — a letter for polarity and a number for latency — so N170 is a negativity around 170 ms and P300 a positivity around 300 ms.
Early components (P1, N170) are sensory: they track the physical stimulus and sit at the back of the head. Later ones (P300, N400, P600) are cognitive: they depend on meaning, attention, and expectation, and shift forward over parietal cortex. Pick a component below, or press play to tour the zoo.
A component is read off the averaged waveform (Section 14) as two numbers within a chosen time window [t₁, t₂]:
Overlapping components are separated with a difference wave — subtracting a control condition cancels everything shared and leaves the effect:
This is how the MMN and N400 are isolated: whatever both conditions have in common (the sensory response) subtracts out, exposing the component driven by the manipulation. The naming code is just polarity × latency:
ERD / ERS
Not every response is a peak in the average. Many events change the power of an ongoing rhythm rather than adding a fixed waveform — the mu rhythm over motor cortex collapses when you move, then rebounds afterwards. These are event-related desynchronization and synchronization.
An ERP is phase-locked: the same wave appears at the same delay every trial, so averaging the raw signal reveals it. ERD/ERS are induced: they are time-locked to the event but their phase is random from trial to trial. Average the raw signal and they cancel to nothing — the only way to see them is to average power, not voltage.
ERD (desynchronization) is a drop in band power: the neurons stop idling in unison and get to work. ERS (synchronization) is a rise above baseline — most famously the beta "rebound" after a movement ends. Both are expressed as a percentage change from a pre-event reference. Watch below: the single trials clearly lose amplitude around the event, the phase-locked average stays flat, yet the power curve dives (ERD) and overshoots (ERS).
First isolate the rhythm and turn it into instantaneous power — band-pass filter, then square (or take the Hilbert envelope):
Average P(t) across trials (not the raw signal), then express it as a percentage change from a pre-event reference power R (the mean of P over a baseline window):
Negative = ERD (power lost), positive = ERS (power gained). Contrast with the ERP, which averages voltage:
That single difference — averaging power vs. averaging voltage — is why induced rhythms are invisible to one method and obvious to the other.
Phase, coherence & PLV
Two brain regions can oscillate at the same frequency without meaning anything — unless their rhythms keep a consistent phase relationship. Measuring that consistency is how EEG infers functional connectivity: which areas are talking to each other.
Every oscillation has an instantaneous phase — where it is in its cycle. Take two signals and look at their phase difference Δφ moment by moment. If Δφ stays roughly constant, the two are phase-locked: knowing one tells you the other. If Δφ drifts randomly, they are independent, however similar their frequencies.
The phase-locking value (PLV) turns this into a number. Plot each Δφ as a unit arrow on a circle; if they all point the same way they add up to a long resultant (PLV → 1); if they scatter they cancel (PLV → 0). Raise the coupling below and watch the cloud of arrows tighten and the PLV climb.
Extract each signal's instantaneous phase from its analytic signal (real part = signal, imaginary part = its Hilbert transform):
Take the phase difference between the two channels, then average it as unit vectors over N samples (or trials). The length of that mean vector is the PLV:
Coherence is the close cousin that also keeps the amplitudes — the normalised cross-spectrum:
PLV uses unit vectors, so it measures phase consistency alone; coherence weights each vector by amplitude, so strong-amplitude moments count more. When amplitudes are steady the two nearly agree.
Cross-frequency coupling
Rhythms of different speeds are not independent. A slow wave can act as a conductor for a fast one — the phase of theta deciding when gamma is allowed to be loud. This phase–amplitude coupling is a candidate mechanism for how the brain packages information.
The idea is simple and striking: gamma bursts (~40 Hz) do not fire evenly through time. They cluster at a preferred point in the slower theta cycle (~6 Hz) — riding on its crests, say, and falling silent in its troughs. The slow rhythm's phase gates the fast rhythm's amplitude.
To see it, extract theta's phase and gamma's amplitude, then ask: how does gamma amplitude depend on theta phase? Bin gamma amplitude by theta phase and plot it. Flat means no coupling; a peak means gamma prefers one phase. The height of that peak is summarised by the Modulation Index. Raise the coupling and pick a preferred phase below.
Band-pass into the two rhythms, then take the slow phase and the fast amplitude from their analytic signals:
Sort Afast into bins of φslow and average, giving the mean-amplitude distribution over phase. Normalise it to a probability:
The Modulation Index is how far that distribution sits from flat (uniform U), measured by Kullback–Leibler divergence and scaled to [0, 1]:
A flat distribution (no coupling) gives MI = 0; concentrating gamma into one phase bin drives MI upward. Scanning many slow/fast band pairs produces a comodulogram.
Sleep staging
Sleep is not one state but a nightly journey through several, and EEG is how we read the map. Each stage has an unmistakable electrical signature — from the big slow waves of deep sleep to the spindles and K-complexes that punctuate lighter sleep.
A night is scored in 30-second epochs into Wake, N1, N2, N3, and REM. As you descend, the EEG slows and grows: fast low-amplitude wake activity gives way to theta, then to spindles and K-complexes, then to towering delta waves. REM is the twist — its EEG looks almost like wakefulness, yet the body is paralysed and the eyes dart.
Plotting the stage against time gives a hypnogram, the shape of a night. Deep N3 dominates the early cycles; REM periods lengthen toward morning. Press play to travel through the night, or pick a stage to inspect its signature.
Scoring works on fixed 30-second epochs. Each is characterised by how its power is spread across bands (Section 06), summarised as relative band power:
Two AASM rules drive the key stages. N3 requires substantial slow-wave activity:
Spindles (a marker of N2) are detected by band-passing 11–16 Hz and thresholding the envelope:
Automated stagers feed these features — band powers, spindle/K-complex counts, and the EMG/EOG channels — into a classifier that labels each epoch, reproducing the human staircase.
Seizures & epileptiform
Epilepsy is a disorder of synchrony gone wrong — populations of neurons that should fire independently instead discharge together, and EEG sees it with brutal clarity. It remains the single most important test in epilepsy.
Between seizures the EEG can still betray an irritable brain through interictal discharges: brief spikes (under 70 ms) and sharp waves (70–200 ms), often followed by a slow wave. Their location points to the epileptogenic zone. During a seizure — ictal — the record transforms into rhythmic, evolving, high-amplitude activity.
Two distinctions organise everything: focal (starting in one region, sometimes spreading) versus generalized (whole brain at once, bilaterally synchronous), and the seizure's evolution — onset, build-up, slowing, and the flat postictal suppression that follows. Pick a pattern below; press play to watch the seizures evolve and spread.
Epileptiform transients are classified largely by duration and by how far they tower over the background:
Automatic detectors flag a candidate when a transient exceeds a multiple of the background standard deviation:
Seizure onset is caught by the rise of a running line-length (or energy) measure, which grows when the signal becomes large and fast:
An ictal rhythm is confirmed by its evolution — amplitude and frequency changing over seconds (here 6 Hz slowing toward 2–3 Hz) — which separates a real seizure from a brief burst or an artifact.
Brain–computer interfaces
A brain–computer interface turns EEG into commands — letting someone spell, move a cursor, or steer a wheelchair with no muscles at all. Every one is built on a signal you have already met in this guide.
The engineering trick is always the same: find a neural signal the user can control or that a stimulus reliably evokes, measure it in real time, and classify it into a choice. Three paradigms dominate, each borrowing a phenomenon from earlier sections — the P300 oddball response, motor-imagery ERD, and the steady-state response to flicker.
Pick a paradigm below and interact with it — click a letter to spell, imagine a hand, or look at a flickering target — then press play to watch the system gather evidence and decode your intent.
P300 speller. Rows and columns flash; the attended letter's row and column are the rare "oddball", evoking a P300. Averaging over repetitions (Section 14) sharpens it, and the letter is the intersection of the highest-scoring row and column:
Motor imagery. Imagining a hand desynchronizes the contralateral sensorimotor mu rhythm (Section 16). The feature is log band-power at C3 vs C4; a linear classifier reads the difference:
SSVEP. Targets flicker at distinct frequencies; attention drives occipital EEG at the attended frequency and its harmonics. Detect the peak:
All three convert a noisy voltage into one discrete choice — the essence of a BCI.
Anesthesia & consciousness
General anesthesia is a reversible, drug-induced coma — and EEG is the window onto how deep it goes. As consciousness fades, the electrical signature changes in an orderly, readable way that anesthesiologists increasingly watch in real time.
The progression is stereotyped for drugs like propofol. Awake EEG is low-amplitude and fast. With sedation, activity briefly speeds up, then a striking frontal alpha rhythm appears alongside large slow (delta) waves — the classic signature of surgical anesthesia. The eyes-closed alpha of wakefulness lives at the back of the head, but under anesthesia alpha migrates to the front — a shift called anteriorization.
Push deeper and the EEG fractures into burst-suppression: seconds of activity separated by near-flat silence, with the silent fraction growing until the trace goes isoelectric. Monitors condense all this into a single depth index (BIS-like, 100 awake → ~40–60 surgical → 0 flat). Drag the depth below, or press play to run a whole anesthetic from induction to emergence.
The burst-suppression ratio is the fraction of an epoch spent below a near-flat threshold — it climbs with depth:
Depth indices also track how the power spectrum concentrates at low frequencies. One ingredient is spectral entropy — high when power is spread (awake), low when it collapses into slow waves:
Anteriorization is the frontal shift of the alpha centre-of-mass — occipital alpha power drops while frontal alpha rises under propofol:
Monitors like BIS combine burst-suppression, spectral, and higher-order (bispectral) features into one 0–100 scale — useful, but only a proxy for the state of the brain.
Source localization
EEG measures voltages at the scalp, but the questions we ask are about the brain: where did this activity come from? Answering that means running the physics backwards — and running it backwards is where EEG meets its hardest limit.
Going forwards is easy and unique: given a source (a current dipole at some location and orientation) and a model of the head's conductivities, the scalp potentials are fully determined. Going backwards — from scalp map to source — is the inverse problem, and it is fundamentally ill-posed. Because of volume conduction (Section 02), infinitely many source configurations produce almost the same scalp pattern, so the answer is never unique.
Methods cope by adding assumptions: dipole fitting (a few point sources), or distributed estimates like minimum-norm and sLORETA (a smooth current image). All share the same weaknesses — estimates blur over centimetres and bias toward the surface, worsening for deep sources. Drag the dipole below to watch the scalp map form and the estimate smear; then switch to the resolution trade-off that defines EEG's place among brain-imaging methods.
The forward model is linear: a leadfield matrix L (built from the head geometry and conductivities) maps source currents s to sensor voltages x:
The inverse problem seeks s from x. There are far more source locations than sensors, so L cannot simply be inverted — the problem is under-determined. Solutions add a constraint, e.g. the minimum-norm estimate picks the smallest-energy current that fits:
The regularisation λ trades data-fit against smoothness, which is exactly what blurs the estimate and biases it superficial. sLORETA standardises this estimate by its variance to reduce location bias. However posed, resolution is limited:
More sensors and lower noise tighten the estimate, but the ill-posedness never fully goes away.