What is the optimal number of electrodes one can use in discrimination of tasks for a Brain Computer Interface (BCI)? To address this question, the number and location of scalp electrodes in the acquisition of human electroencephalography (EEG) and discrimination of motor imagery tasks were optimized by using a systematic optimization approach. The systematic analysis results in the most reliable procedure in electrode optimization as well as a validating means for the other feature selection techniques. We acquired human scalp EEG in response to cue-based motor imagery tasks. We employed a systematic analysis by using all possible combinations of the channels and calculating task discrimination errors for each of these combinations by using linear discriminant analysis (LDA) for feature classification. Channel combination that resulted in the smallest discrimination error was selected as the optimum number of channels to be used in BCI applications. Results from the systematic analysis were compared with another feature selection algorithm: forward stepwise feature selection combined with LDA feature classification. Our results demonstrate the usefulness of the fully optimized technique for a reliable selection of scalp electrodes in BCI applications.