An ECG is a recording of the electrical activity of the heart over time using skin electrodes. It is the gold standard for diagnosing cardiac diseases in a noninvasive manner. The ECG records the P wave from atrial depolarization, the QRS complex from ventricular depolarization and repolarization of the atria, and the T wave from ventricular repolarization. Proper electrode placement and ensuring good skin contact is important for obtaining an accurate recording. The recording is then analyzed based on heart rate, rhythm, intervals, wave amplitudes and shapes to identify any abnormalities.