Electrocardiography is the recording of the electrical activity of the cardiac impulse-conducting system as detected by electrodes properly arranged on the body. ECG is used to examine the heart’s function and diagnose disorders such as myocardial infarction. Electrocardiogram is a graphic tracing of the variations in electrical potential caused by the excitation of the heart muscle.