Station 4 · Lesson 1
ICA, simply explained
Your browser's back button takes you to the exact place you were, so open anything you like.
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
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.
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. ICA 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 ICLabel’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).
Why do I need this step?
The question: from the three recordings alone, can you extract each person’s voice on its own? This is what independent component analysis (ICA) does.
EEG has exactly the same problem:
- The people are the sources: activity in brain areas, eye blinks, muscles, the heart, and line noise.
- 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 channel 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 do it in EEGLAB?
There are no EEGLAB steps in this lesson, because it explains the idea before you run ICA.
You will meet the idea in the GUI 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.
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));
endIn 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.
How do I write it as code?
This script 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.
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));
endIn the left column you see the three channels, all mixed. In the right column you see the components: a regular rhythm, blink 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 idea | In EEGLAB | What it means |
|---|---|---|
| The way to recombine the channels | EEG.icaweights and EEG.icasphere | What ICA learns. Multiplying them by the data gives the components. |
| The shape of a component in time | EEG.icaact | The time course of each ICA component. |
| Where a component is on the head | EEG.icawinv | Each 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 components | Equal to the data rankThe number of truly independent channels; it drops after interpolation or average reference., which is never more than the number of channels | In 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). |
Which value should I choose?
There are no values to choose in this lesson. The table links the idea to what you will see in EEGLAB.
| In the idea | In EEGLAB | What it means |
|---|---|---|
| The way to recombine the channels | EEG.icaweights and EEG.icasphere | What ICA learns. Multiplying them by the data gives the components. |
| The shape of a component in time | EEG.icaact | The time course of each ICA component. |
| Where a component is on the head | EEG.icawinv | Each column is the scalp map of an ICA component: how much it contributes to each channel. |
| Number of components | Equal to the data rank, which is never more than the number of channels | In D1 after average reference 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
- You can explain the party in two sentences: the channels are microphones that hear a mix, and ICA extracts each voice on its own.
- You know the two parts of an ICA component: a scalp map (
EEG.icawinv) and a time course (EEG.icaact). - 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.
How do I check it worked?
- You can explain the party in two sentences: the channels are microphones that hear a mix, and ICA extracts each voice on its own.
- You know the two parts of an ICA component: a scalp map (
EEG.icawinv) and a time course (EEG.icaact). - 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.
What mistakes do people make?
- 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.
Your browser doesn't allow saving progress. All lessons are open, but completion marks won't be saved.
Done. Your progress is saved in this browser.UndoWhere can I read more?
4 sources, official docs first
- EEGLAB Concepts guideDocumentationIndependent Component Analysis of EEG data
- EEGLAB TutorialDocumentation6. Reject artifacts > d. Indep. Comp. Analysis
- Luck, Applied Event-Related Potential Data Analysis (1st edition)Chapter 9: Artifact Correction with ICA
- ICA applied to EEG: What is ICA?VideoFull video · 6:35
Written for EEGLAB 2026.1 · 2026-10-28
Going further
- EEGLAB Concepts guide: https://eeglab.org/tutorials/ConceptsGuide/ICA_background.html (Independent Component Analysis of EEG data)
- EEGLAB Tutorial: https://eeglab.org/tutorials/06_RejectArtifacts/RunICA.html (6. Reject artifacts > d. Indep. Comp. Analysis)
- Luck, Applied Event-Related Potential Data Analysis (1st edition): https://socialsci.libretexts.org/Bookshelves/Psychology/Biological_Psychology/Applied_Event-Related_Potential_Data_Analysis_(Luck) (Chapter 9: Artifact Correction with ICA)
- ICA applied to EEG: What is ICA?: https://www.youtube.com/watch?v=kWAjhXr7pT4 (Full video)
Need help?
Ask, share feedback, or report an error
- Report a scientific error · Needs a GitHub account. Don't have one? Use "Share your thoughts".