Over a 13-month period, serum potassium and magnesium levels were measured in 590 patients admitted to a coronary care unit. Hypokalemia, often in the absence of diuretic use, occurred in 17% of the 211 patients with acute myocardial infarction. Patients with acute myocardial infarction and a potassium level of less than 4.0 mEq/L (4.0 mmol/L) had an increased risk of ventricular arrhythmias (59% vs 42%). Because hypokalemia is common in acute myocardial infarction and is associated with ventricular arrhythmias, routine measurement of serum potassium levels and prompt correction are recommended. Hypomagnesemia occurred in only 4% of the patients, but it was more common in the group with acute myocardial infarction than in the group without myocardial infarction (6% vs 3%). Ventricular arrhythmias occurred in ten of the 13 patients with both acute myocardial infarction and hypomagnesemia, but eight of these patients also had low serum potassium levels. This low incidence of hypomagnesemia does not justify routine measurement of serum magnesium levels. However, the mean level (2.5 +/- 0.4 mg/dL [1.03 +/- 0.16 mmol/L]) in a reference population of healthy volunteers was unexpectedly high and suggests that the low incidence of hypomagnesemia in our population may not be applicable to other centers and may reflect a higher magnesium content in our geographic area of southeastern Ontario.