The spatial response of the magnetoencephalogram (MEG) to sources in the brain's cortex is compared with that of the electroencephalogram (EEG). This is done using computer modeling of the head which is approximated by 4 concentric spherical regions that represent the brain and surrounding bone and tissue. Lead fields are calculated at points on the cortex for unipolar, bipolar and quadrupolar MEG and EEG measurements. Since lead fields are patterns of the sensitivity of these measurements to a source at various locations and orientations, they provide a convenient means for comparison. It is found that a unipolar MEG has a very different lead field than a unipolar EEG. Hence, this type of MEG detects sources at different locations and orientations than this EEG. Although bipolar MEG and EEG lead fields are found to have similar patterns, the MEG lead field is narrower than that of the EEG and hence 'sees' a smaller area on the cortex than the EEG. This is because the potentials measured by the EEG are 'smeared' by the low-conductivity skull; the magnetic fields measured by the MEG are not smeared. Quadrupolar MEG and EEG lead fields are found to be about the same. The responses of bipolar MEGs and EEGs to distributed sources, which are composed of aligned and randomly oriented dipoles, are compared. It is found that for both types of sources, the MEG 'sees' an area on the cortex which is approximately 0.3 times that for the EEG. Hence, the MEG appears to be useful for detecting a more restricted group of sources than the EEG.