An electrocardiogram (ECG or EKG) is a record of the electrical activity of the heart over a period of time. The instrument that makes the record is the ECG machine or Electrocardiograph. Willem Einthoven invented it. It works by attaching electrodes to the outer surface of the skin. 