Electrocardiograms (commonly abbreviated as ECGs) are a non-invasive technique for measuring the heart's electrical activity. By ``listening in'' on these signals, we can diagnose problems within two main areas: firstly, the electrical system itself (these are called Type B diagnostic statements); and secondly tissue damage to the heart, such as valve blockages, muscle misfires and other physiological issues that manifest themselves as alterations to the heart's electrical system (these are referred to as Type A diagnostic statements). Type A problems are more difficult to diagnose from ECGs, since we are observing the effect of physiological phenomena on the electrical system, rather than the electrical system itself.
ECGs are captured by attaching a number of electrodes around the body, most of which are near the heart, but some of which are at the extremities. Once the electrodes are connected; voltages, and differences between the voltages at different electrodes, are recorded as time series.
The structure of an individual heartbeat is shown in Figure 6.32. As can be seen, the heartbeat is analysed in terms of several components, commonly labelled the P, Q, R, S and T waves.