An electrocardiogram, also known as an EKG, helps detect and diagnose different heart conditions. An EKG is a non-invasive, painless test that records the electrical signals produced from your heart. An EKG can detect:
Abnormal heartbeats (arrhythmias)
Heart defects
Blocked or narrow heart arteries (coronary heart disease)
A heart attack (in emergency situations) or a previous heart attack