An electrocardiograph is a medical device used to record the heart's electrical activity and rhythms, thereby producing an electrocardiogram (ECG).