What is ECG machine and how it works

ECG is a transthoracic interpretation of the electrical activity of the heart over time captured and externally recorded by skin electrodes.It is a noninvasive recording produced by an ECG device. In English speaking countries, medical professionals often write EKG.
 
The ECG works mostly by detecting and amplifying the tiny electrical changes on the skin that are caused when the heart muscle "depolarises" during each heart beat. At rest, each heart muscle cell has a charge across its outer wall, or cell membrane. Reducing this charge towards zero is called de-polarization, which activates the mechanisms in the cell that cause it to contract. During each heartbeat a healthy heart will have an orderly progression of a wave of depolarisation that is triggered by the cells in the sinoatrial node, spreads out through the atrium, passes through "intrinsic conduction pathways" and then spreads all over the ventricles. This is detected as tiny rises and falls in the voltage between two electrodes placed either side of the heart which is displayed as a wavy line either on a screen or on paper. This display indicates the overall rhythm of the heart and weaknesses in different parts of the heart muscle.