In this work, we implemented a brain-machine interface (BMI) based on electroencephalographic (EEG) signals and used it to classify and separate three types of mental tasks: motor imagery with the right and left hands and simple arithmetic sums. In order to reduce dimension of variables and increase classification power, we used both PCA and ICA based algorithms for spectral analysis. Our results show that we were no able to reduce dimension without reducing classification performance.