Abstract
This paper investigates the prefrontal cortex in the brain while one is performing a mental arithmetic task. It was conducted to provide more information and to encourage further research on how the brain functions. Because there have been varying beliefs relating to which parts of the brain are acti- vated during mental cognition, this research aims to provide further insight into this idea. Data was gathered from an EEG dataset and was analyzed using the pspectrum function in MATLAB. A power spectrum analysis was performed to determine which electrode channels activated the most. The hy- pothesis was that there will be more activity in the frontal lobe than other areas. The hypothesis was correct, showing that channels in the frontal lobe had a higher power of non-alpha waves, indicating that higher activity was present in the prefrontal cortex during the arithmetic task when compared to other areas of the brain. Since pre-frontal cortex activity has been known to be associated with or- ganizational skills, this research may provide insight into the organizational aspects of mathematical tasks. However, this analysis method, the power spectrum, was unable to achieve unanimous results across all subjects, therefore further research on different analysis methods may be beneficial.
Keywords: Power spectrum, EEG, prefrontal cortex, mental arithmetic, MATLAB
1. Introduction
Mathematical problems like mental arithmetic tasks activate cognitive reasoning and calculation. Though we try to separate them, these activities are strongly intertwined. For example, number ordering skills and even ordering the months of the year greatly influenced arithmetic performance1. Neuro imaging technologies like Functional Magnetic Resonance Imaging (fMRI, which gives a visual image of the brain and its locations of activity.2 Electroencephalography (EEG), which measures the brain’s postsynaptic potentials2, and other BCI’s detect signals and patterns in the brain that can be measured and analyzed.
The four frequency bands: delta (1.5-3.5 Hz), theta (3.5-7.5 Hz), alpha (7.5-13.5 Hz), and beta (13.5-19.5 Hz) are the most common bands used in EEG analysis. Theta and delta were found to have been related to brain activation during working memory tasks3, but in the back regions of the brain they have been associated with visual spatial tasks4. Al- pha waves have been compared to attention and the exclusion of unwanted information5,6,7 and the fast waves (beta and gamma) can be correlated with information transfer between regions8. Previous research has also shown that the power of alpha waves increases in meditation depth, and in contrast it decreases with cognition. Further, in theta waves the power decreases when meditation deepens, therefore they increase when one is experiencing disturbances9.
Previous research focused on the occurrences of alpha waves and came to the conclusion that alpha activity tends to decrease during cognitive tasks10. Furthermore, there is a direct correlation between brain activity and beta waves, implying that the increase in beta waves are a result of brain jogging11. Additionally, several imaging studies have concluded that arithmetic tasks have a di- rect contribution to the activation of the frontal and parietal cortices12, with semantic behavior associ- ated with the parietal region13,14 and the working memory being a main cognitive process present during the solving of mathematical processes15. It was also shown that subjects with a damaged frontal region had problems working with multiple pieces of information but were consistent with more straightforward arithmetic questions16. As a result, it was indicated that
the dorsolateral prefrontal cortex was activated in two-step mathematical problems and not in one-step problems. Several studies have reported that simple mathematical calculations triggered the activa- tion of the parietal regions17,18 but the frontal region started to become more involved and active once more difficult steps were needed19,20,21, which could be due to an increase in demand of the working memory22. It was also shown that the left prefrontal-parietal cortex was activated in order to maintain multiple pieces of information23. Because of the difference in findings on which areas of the brain are correlated with arithmetic, this research aims to establish a clear difference in the prefrontal and pari- etal cortices during arithmetic tasks.
The purpose of this research is also to validate the reproducibility of similar studies that analyze the activation of different brain areas. We aim to use a different analysis method in order to provide an independent analysis of brain activity during mathematical tasks. MATLAB was used to analyze and visualize the power spectrum of the EEG signals before and during a mental arithmetic task.
Power Spectrum and MATLAB
A power spectrum analysis is an important application of signal processing. Power spectrum density analysis quantifies how the intensity of a time-varying signal is distributed across the frequency do- main. MATLAB was used to perform the power spectrum density analysis. A power spectral density analysis has been used to analyze various brain activities, espiecally in epilepsy and seizures24. However, one has to be cognizant about the leakage effects of this analysis, where peaks with higher powers tend to leak into a neighboring peak with lower power25. The multitaper method was introduced as a solution to prevent leakage26. This study used the average power across the complete activity to minimize leakage effects.
Results
Figure 2 is an example of the pspectrum plots for channels 1 to 7 on subject 1. In the graph in Figure 2, the left side represents the EEG waves before the task and the right represents activity during the task. Every channel was analyzed. The y-axis is the frequency in Hz, while the x-axis is the time in minutes.
The colorbar on the right is power in decibels, with yellow being a higher power and blue being a lower power.
Data from 36 subjects was analyzed. The number of subjects that showed increased activity during the mental arithment task for each channel is shown in Table 1.
Ch 1-4 | # subj. | Ch 5-8 | # subj. | Ch 9-12 | # subj. | Ch 13-16 | # subj. | Ch 17-20 | # subj. |
Fp1 | 19 | F7 | 17 | C3 | 6 | P3 | 4 | Fz | 11 |
Fp2 | 18 | F8 | 19 | C4 | 5 | P4 | 5 | Cz | 3 |
F3 | 10 | T3 | 4 | T5 | 9 | O1 | 5 | Pz | 5 |
F4 | 10 | T4 | 11 | T6 | 9 | O2 | 6 |
It can be seen that the channels associated with the prefrontal cortex (Fp1, Fp2, F7, F8) showed higher activity during the mathematical task, meaning that the subjects had the most activity in the prefrontal cortex rather than the parietal. Details about the electrode placement can be found in Methods.
In the example graph below, the left side represents the EEG waves before the task and the right repre- sents activity during the task. Every channel was analyzed. The y-axis is the frequency in hertz, while the x-axis is the time in minutes. The colorbar on the right is power in decibels, with yellow being a higher power and blue being a lower power.
Discussion
Looking at the gathered results, only 4 channels (Fp1, Fp2, F7, F8) were found to have significant activity during mathematical tasks: Fp1 – 19 out of 36 subjects (52.7%) showed higher activity, Fp2 – 18 out of 36 subjects (50%) showed higher activity, F7 – 17 out of 36 subjects (47.2%) showed higher activity, and F8 – 19 out of 36 subjects (52.7%) showed higher activity.
Our results as to which channels are related to mental arithmetic both support previous research and presents a different idea from other research done in the field. Others observed that there is a de- velopmental shift in brain activation from the pre-frontal lobe to the left-parietal with age27, as children grow from ages 8 to 1928. When performing mental arithmetic tasks, our subjects, aged 16-26, showed more activity on the pre-frontal lobe symmetrical for both left and right sides.
Previous research indicates that the frontal cortex subserves domain-general processes of problem solv- ing, such as the structuring of multiple solution steps, whereas parietal cortex supports number-specific early encoding processes that vary as a function of problem size29. Our research supports this because the type of subtraction task used (4 digits minus 2 digits) requires some extent of organizational, non straightfor- ward thinking. To elaborate, one may need to decide and plan how to approach the subtraction problem. One may decide to subtract the tens digit first and units digit later, while someone else may decide to subtract it in the reverse order. Or divide the number up in different ways to achieve the subtraction. For example, 2634 – 52 = 2600+34-(50+2) = 2550 + 32 = 2582.
However, not every subject had an increase in prefrontal cortex activity during the task — only around half of them did. It was considered that some subjects may be experiencing the shift from the prefrontal cortex to parietal, but after relooking at the ages of the subjects in which the 5 channels (Fp1, Fp2, F7, F8, Fz) had experienced ’higher’ activity, even subjects of ages above 19 showed high prefrontal cortex activity and some subjects of ages less than 19 showed less activity in that area. It is possible that the subjects weren’t putting much effort into the task, or there is an issue with the analysis method, meaning that it was unable to capture detailed differences during the task.
Materials and Methods
EEG Dataset
EEGs are recordings of mental activity of the brain via non-invasive electrodes on the surface of the scalp. Several electrodes are placed in different parts of the scalp, allowing specific electrodes to gather signals from specific parts of the brain. The gathered EEG waves are then analyzed for their frequency and power content.
The EEG data was gathered from Physionet Databases30. The data was recorded monopolarly using the Neurocom EEG 23-channel system, and the frontal, parietal, temporal, and occipital regions were ac- counted for with the use of 21 channels. A filter with a 30Hz cut-off frequency and a power line notch filter of 50Hz were also used to filter out frequencies greater than 30 Hz, and power noise of 50Hz. The Independent Component Analysis (ICA) was used to eliminate artifacts during preprocessing, such as eyes, muscle, and cardiac pulsation.
The arithmetic task was a subtraction task, where 36 subjects were required to subtract a two digit number (such as 23) from a four digit number (such as 3174).
Every participant solved the exact same mathematical problems. They were given 4 minutes to com- plete the task, and the number of problems solved in 4 minutes was recorded. However, upon recieving the dataset, it was seen that during the subtraction task, 3 minutes were recorded and before the task 1 minute was recorded. The participants were only accepted if they have a good vision, color vision, no mental or cognitive impairment, or any verbal disabilities.
The subjects are split into two groups:
- Group “G”, who performed a Good quality count (The mean number of operations per 4 minutes was 21, standard deviation was 7.4).
- Group “B” performed a Bad quality count (The mean number of operations in 4 minutes was 7, standard deviation was 3.6).
EEG Analysis
The EEG data was downloaded from Physionet Databases, from the “EEG During Mental Arithmetic Tasks” dataset in the European data format (EDF). The EEG data was recorded using electrodes and placing them in specific places around the brain to ensure coverage of the scalp. This is called the international 10/20 scheme (see Figure 3). The subjects were recorded two times: before and during a subtraction task. All subjects were recorded for one minute before the task, and 3 minutes during the task. Because data timings were inconsistent, we decided to compare the first minute for both recordings. Data was recorded with a sampling rate of 500 samples per second.
EEG analysis was performed using the pspectrum function in MATLAB. The parameters provided to the pspectrum function are detailed below.
pspectrum(data, sampling_rate, “spectrogram”,… ’FrequencyLimits’, [0,20],…
OverlapPercent=0,… MinThreshold=-20,… TimeResolution=1)
- data: EEG data
- sampling_rate: 500Hz
- FrequencyLimits: The range of frequencies analyzed
- MinThreshold: Power over -20 dB is graphed.
- OverlapPercent: No overlap was used to prevent leakage.
- TimeResolution: Indicates the duration of segments over which the short-time power spectra is computed.
The average power in the first minute was calculated with the pspectrun() and bandpower() MAT- LAB functions.
[p, f] = pspectrum(data, sampling_rate, ’power’); bandpower(p, f, [0,20], ’power’)
After getting the average power, if statements were utilized in order to determine which graph – either the before graph or during graph – had a higher power. It was put into a spreadsheet in order to organize results.
A 10% error margin was considered for the analysis, that is, if the before and during numbers were within 10% of each other, they were considered to be the same and not meaningful.
MATLAB code and analysis data used in this research can be found here31 github location.
Conclusion
It was determined from this research that mental arithmetic is directly correlated to the frontal lobe activity. This supports research that indicates how working memory as well as other brain activators stimulate the prefrontal cortex. To expand on this research, studies can be made to thoroughly examine the parts of the brain that deal with specific aspects of mental cognition and investigate the difference in brain waves between word problems and arithmetic problems. Additionally, the analysis can be performed on different frequency bands to find any dependency of EEG signals across the different frequency bands when complex mental mathematical operations are performed.
References
- Kinga Morsanyi, Eoin O’Mahony, and Teresa McCormack. Number comparison and number ordering as predictors of arithmetic performance in adults: Exploring the link between the two skills, and investigating the ques- tion of domain-specificity. Quarterly Journal of Experimental Psychology, 70(12):2497–2517, 2017 [↩]
- Michael X. Cohen. Where does eeg come from and what does it mean? Trends in Neurosciences, 40(4):208–218, 2017 [↩]
- M. T. Carrillo-De-La-Peña and L. García-Larrea. Right frontal event related eeg coherence (ercoh) differentiates good from bad performers of the wis- consin card sorting test (wcst). Neurophysiologie Clinique/Clinical Neurophysiology, 37(2):63–75, 2007 [↩]
- Bernard T Jap, Sara Lal, and Petra Fischer. Inter-hemispheric electroencephalography coherence analysis: Assessing brain activity during monotonous driving. International Journal of Psychophysiology, 76(3):169–173, 2010 [↩]
- Nicholas R Cooper, Rodney J Croft, Scott J Dominey, Adrian P Burgess, and John H Gruzelier. Paradox lost? explor- ing the role of alpha oscillations during externally vs. internally directed attention and the implications for idling and inhibition hypotheses. International journal of psychophysiology, 47(1):65–74, 2003 [↩]
- John J Foxe and Adam C Snyder. The role of alpha-band brain oscillations as a sensory suppression mechanism during selective attention. Frontiers in psychology, 2:154, 2011 [↩]
- Lisa Payne, Sean Guillory, and Robert Sekuler. Attention-modulated alpha-band oscillations protect against intrusion of irrelevant informa- tion. Journal of cognitive neuroscience, 25(9):1463–1476, 2013 [↩]
- Andreas K Engel and Pascal Fries. Beta-band oscillations—signalling the status quo? Current opinion in neurobiology, 20(2):156–165, 2010 [↩]
- Sucharit Katyal and Philippe R Goldin. Alpha and theta oscillations are inversely related to progressive levels of meditation depth. Neuroscience of consciousness, 2021(1):niab042, 2021 [↩]
- Donald W Gross and Jean Gotman. Correlation of high-frequency oscillations with the sleep–wake cycle and cognitive activity in humans. Neuroscience, 94(4):1005–1018, 1999 [↩]
- Y. Hendrayana, J. D. K. Negara,
N. Nuryadi, A. Gumilar, and M. Lesyiana. The impact of beta brain waves in improving cognitive func- tion through brain jogging applications. International Journal of Human Movement and Sports Sciences, 8:73–77, 2020 [↩]
- Vinod Menon, Susan M Rivera, Christine D White, Gary H Glover, and Allan L Reiss. Dissociating prefrontal and parietal cortex acti- vation during arithmetic processing. Neuroimage, 12(4):357–365, 2000 [↩]
- Stanislas Dehaene, Nathalie Molko, Laurent Cohen, and Anna J Wilson. Arithmetic and the brain. Current opinion in neurobiology, 14(2):218–224, 2004 [↩]
- Evelyn Eger, Philipp Sterzer, Markus O Russ, Anne-Lise Giraud, and Andreas Kleinschmidt. A supramodal number repre- sentation in human intraparietal cortex. Neuron, 37(4):719–726, 2003 [↩]
- Mark H Ashcraft and Judith A Krause. Working memory, math performance, and math anxiety. Psychonomic bulletin & re- view, 14:243–248, 2007 [↩]
- J Besnard, P Allain, G Aubin, V Chauviré, F Etcharry-Bouyx, and D Le Gall. An integrative view of luria’s perspective on arithmetic problem solving: The two sides of environmental dependency. Journal of Clinical and Experimental Neuropsychology, 36(1):88–109, 2014 [↩]
- Pierre Burbaud, Philippe Degreze, Patrice Lafon, Jean-Michel Franconi, Bernard Bouligand, Bernard Bioulac, and Michel Allard. Lateralization of prefrontal activation during internal mental calculation: a functional magnetic resonance imaging study. Journal of Neurophysiol- ogy, 74(5):2194–2200, 1995 [↩]
- Stanislas Dehaene, Elizabeth Spelke, Philippe Pinel, Ruxandra Stanescu, and Sofia Tsivkin. Sources of mathematical thinking: Behavioral and brain-imaging evidence. Science, 284(5416):970–974, 1999 [↩]
- Pierre Burbaud, Philippe Degreze, Patrice Lafon, Jean-Michel Franconi, Bernard Bouligand, Bernard Bioulac, and Michel Allard. Lateralization of prefrontal activation during internal mental calculation: a functional magnetic resonance imaging study. Journal of Neurophysiology, 74(5):2194–2200, 1995 [↩]
- Jordan Grafman, Domenico Passafiume, Paolo Faglioni, and François Boller. Calculation disturbances in adults with focal hemispheric damage. Cortex, 18(1):37–49, 1982 [↩]
- M. Jack- son and E. K. Warrington. Arithmetic skills in patients with unilateral cerebral lesions. Cortex, 22(4):611– 620, 1986 [↩]
- J. Molina del Río, M. A. Guevara, M. Hernández González, R. M. Hidalgo Aguirre, and M. A. Cruz Aguilar. Eeg corre- lation during the solving of simple and complex logical–mathematical problems. Cognitive, Affective, & Behavioral Neuroscience, 19:1036–1046, 2019 [↩]
- J. Molina del Río, M. A. Guevara, M. Hernández González, R. M. Hidalgo Aguirre, and M. A. Cruz Aguilar. Eeg correlation during the solving of simple and complex logical–mathematical problems. Cognitive, Affective, & Behavioral Neu- roscience, 19:1036–1046, 2019 [↩]
- Shasha Liu, Jia Wang, Shuang Li, and Lin Cai. Epileptic seizure detection and prediction in eegs using power spectra density parameterization. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 31:3884–3894, 2023 [↩]
- J. Muthuswamy and N.V. Thakor. Spectral analysis methods for neurological signals. Journal of neuroscience methods, 83(1):1–14, 1998 [↩]
- Tzvika Melman and Jonathan D. Victor. Robust power spectral estimation for eeg data. Journal of Neuroscience Methods, 268:14–22, 2016 [↩]
- Christina Artemenko. Developmental fronto-parietal shift of brain activation during mental arithmetic across the lifespan: A registered report protocol. PLOS ONE, 16(8):e0256232, 2021 [↩]
- Susana M. Rivera, Allan L. Reiss, Mark A. Eckert, and Vinod Menon. Developmental changes in mental arithmetic: evidence for increased functional specialization in the left inferior parietal cortex. Cerebral Cortex, 15(11):1779–1790, 2005 [↩]
- Nadja Tschentscher and Olaf Hauk. Frontal cortex supports the early structuring of multiple solution steps in symbolic problem-solving. Journal of Cognitive Neuroscience, 29(1):114–124, 2017 [↩]
- Ivan Zyma, Serhii Tukaev, Ilya Seleznov, Ken Kiyono, Andrii Popov, Maksym Chernykh, and Oleksii Shpenkov. Electroencephalograms during men- tal arithmetic task performance. Data, 4(1):14, 2019 [↩]
- Vir Chhabra. Eeg mental arithmetic. https://github.com/vir-chh/EEG_MentArith, 2025. GitHub repository [↩]