Cephalic references are widely used to record Electroencephalography (EEG). The effect of an active common reference on the recorded EEG is one of the oldest technical problems in the study of EEG. Moreover, in many cases EEG channel recordings are contaminated to different degrees with line noise that can pose a significant problem for EEG interpretation and analysis. Thus, identification and removal of the reference signal and line noise is of importance. Here we apply independent component analysis (ICA) and principle component analysis (PCA) to intracranial recordings and propose three methods to remove the reference signal and line noise based on the assumption that the scalp reference and line noise are independent from the local and distributed intracranial sources. The assumption of independence between the scalp reference and intracranial sources is generally valid because the reference scalp electrode is relatively electrically isolated from the intracranial electrodes by the skull's high resistivity and supported by our previous simulation results . The assumption of independence between the line noise and intracranial sources is definitely true. We apply the three proposed methods to intracranial EEGs from one patient undergoing evaluation for epilepsy surgery, and compare the results to bipolar, average, and notch filter iEEGs.