An electrocardiogram (ECG) is a recording of waveforms that reflects the electrical activity of the heart. Each heart beat involves 5 major stages, reflected in P, QRS and T waves, the size and shape of which help in assessing normality of heart functions.