The electrocardiogram (also known as an EKG or ECG) is a non-invasive device that measures and monitors the electrical activity of the heart through the skin. The ECG produces a distinctive waveform in response to the electrical changes taking place within the heart.