Station 4 · Lesson 1

ICA, simply explained

Core12 minBefore this lesson: Re-referencingPrint the card

The idea in brief

Imagine a party with three people talking at the same time, and three microphones in different places in the room. Each microphone records a mix of the three voices. The microphone close to one person hears that person louder, but it hears the others too.

Before and after

Three stages. Sources: brain with a regular 10 Hz wave, blink with large slow peaks, muscle with fast activity. What the channels record: frontal, central and temporal electrodes, each a mix of the three, the frontal one with a strong blink. After ICA: three components that look like the sources, in a different order, with the blink sign flipped.
What does this show?

Notice two things in the last stage. First, the order of the components does not match the order of the sources. Second, a component may be flipped or have a different size. ICAA method that separates the recording into independent sources, some brain and some artifact. finds the shape of each source in time, but it does not know its name, its true size, or its order. Naming the components is your job, or ICLabelA tool that classifies each ICA component into seven classes with a probability for each.’s later.

Your next questions, each answered in its own section:

Why do I need this step?

The reasons in detail, and the terms you need

The question: from the three recordings alone, can you extract each person’s voice on its own? This is what independent componentOne independent source from ICA, with its own scalp map and time series. analysis (ICA) does.

EEGA recording of the brain's electrical activity from electrodes on the scalp. has exactly the same problem:

  • The people are the sources: activity in brain areas, eye blinks, muscles, the heart, and line noiseInterference from the mains supply at 60 Hz in Saudi Arabia or 50 Hz elsewhere..
  • The microphones are the channels on the head.
  • The mixing happens because the current spreads through the head before it reaches the electrodes. The official documentation describes this mixing as passive and linear: it adds no new information.

So every channelThe signal recorded from one electrode, as shown in EEGLAB. is a mix. Channel FPz at the front of the head, for example, records brain activity together with strong eye blinks.

ICA looks for a way to recombine the channels that gives signals as independent of each other in time as possible. Each of these signals is called an ICA component (independent component).

How do I do it in EEGLAB?

3 steps in the menus

There are no EEGLAB steps in this lesson, because it explains the idea before you run ICA.

You will meet the idea in the GUIThe windows and menus used with the mouse instead of typed commands. in the next lessons:

  • Running ICA: from Tools then Decompose data by ICA. Afterward, ICA weights shows Yes in the main window.
  • Scalp maps: from Plot then Component maps then In 2-D. Each map shows where a component appears on the head.
  • Removing a component: from Tools then Remove components from data. This is a separate step you decide on after reviewing.

How do I write it as code?

The same steps in 25 lines of MATLAB

This scriptA MATLAB file of commands that runs processing steps in order. is optional. Run it after installing EEGLAB if you want to see the party for yourself. It makes three artificial sources, mixes them into three “channels”, then separates them with the EEGLAB function runica.

MATLAB
eeglab nogui;   % puts runica on the MATLAB path

% Three made-up sources, 10 seconds at 128 Hz
srate = 128;
t = (0:10*srate-1) / srate;
brain = sin(2*pi*10*t);                        % steady 10 Hz rhythm
n = round(0.3*srate);
win = 0.5 - 0.5*cos(2*pi*(0:n-1)/(n-1));       % smooth bump for one blink
blink = zeros(size(t));
blink(round([1.5 4 6.5 9]*srate)) = 1;
blink = 5 * conv(blink, win, 'same');          % four large, slow blinks
muscle = 0.5 * randn(size(t));                 % fast, irregular activity
S = [brain; blink; muscle];

% Each channel records a different mix of the three sources
A = [1.0 0.8 0.3;     % frontal channel: strong blink
     0.9 0.2 0.4;     % central channel
     0.7 0.1 1.0];    % temporal channel: strong muscle
X = A * S;

% ICA unmixes the channels without knowing A
[weights, sphere] = runica(X, 'extended', 1);
act = weights * sphere * X;

figure;
for k = 1:3
    subplot(3, 2, 2*k-1); plot(t, X(k, :));   title(sprintf('Channel %d (mixture)', k));
    subplot(3, 2, 2*k);   plot(t, act(k, :)); title(sprintf('ICA component %d', k));
end

In the left column you see the three channels, all mixed. In the right column you see the components: a regular rhythm, blinkClosing and opening the eye; seen as large peaks on frontal channels. peaks, and random activity, each in its own row.

Which value should I choose?

Suitable values for your analysis goal

There are no values to choose in this lesson. The table links the idea to what you will see in EEGLAB.

In the ideaIn EEGLABWhat it means
The way to recombine the channelsEEG.icaweights and EEG.icasphereWhat ICA learns. Multiplying them by the data gives the components.
The shape of a component in timeEEG.icaactThe time course of each ICA component.
Where a component is on the headEEG.icawinvEach column is the scalp mapA top-down picture showing how a value is spread over the head. of an ICA component: how much it contributes to each channel.
Number of componentsEqual to the data rankThe number of truly independent channels; it drops after interpolation or average reference., which is never more than the number of channelsIn D1 after average referenceA reference equal to the mean of all scalp channels. and with no interpolated channel: 31 components from 32 channels. Each interpolated channel removes one (see Running ICA).

How do I check it worked?

3 quick checks
  1. You can explain the party in two sentences: the channels are microphones that hear a mix, and ICA extracts each voice on its own.
  2. You know the two parts of an ICA component: a scalp map (EEG.icawinv) and a time course (EEG.icaact).
  3. If you ran the script, you see three separate components in the right column, each resembling one of the three sources, possibly in a different order or with a flipped sign.

What mistakes do people make?

5 mistakes and how to avoid them
  • Thinking ICA deletes something. ICA alone does not change your data. It gives you another way to see the same data. Removal is a separate decision in the ICLabel lesson.
  • Confusing a channel with an ICA component. A channel is what one electrode records. An ICA component is a source computed from all channels together, and it has a map over the whole head.
  • Confusing an ICA component with an ERP component. An ERP component such as P3 is a peak in the average of the epochs. An ICA component is an independent source computed from all time points of the recording, not from the average. Always say “ICA component” or “ERP component”.
  • Expecting the same order every time. The order, sign, and size of components may differ between runs. Find a component by its shape, not its number.
  • Expecting more sources than channels. ICA cannot find more components than the data rank. With 32 channels you do not get 50 sources.

Where can I read more?

4 sources, official docs first

Written for EEGLAB 2026.1 · 2026-10-28

Need help?

Ask, share feedback, or report an error