An electrocardiogram (ECG or EKG) is a painless, low-cost test that records the heart's electrical activity, making it a standard diagnostic tool for analyzing arrhythmias. It shows parameters like heart rate, rhythm steadiness, and electrical signal strength within the heart. Doctors utilize ECGs to detect heart-related issues, translating the electrical activity into line tracings for analysis.