The observation of hyperfine structure in atomic hydrogen by Rabi and co-workers and the measurement of the zero-field ground-state splitting at the level of seven parts in 10 13 are important achievements of mid-twentieth-century physics. The work that led to these achievements also provided the first evidence for the anomalous magnetic moment of the electron, inspired Schwinger's relativistic theory of quantum electrodynamics and gave rise to the hydrogen maser, which is a critical component of modern navigation, geo-positioning and very-long-baseline interferometry systems. Research at the Antiproton Decelerator at CERN by the ALPHA collaboration extends these enquiries into the antimatter sector. Recently, tools have been developed that enable studies of the hyperfine structure of antihydrogen - the antimatter counterpart of hydrogen. The goal of such studies is to search for any differences that might exist between this archetypal pair of atoms, and thereby to test the fundamental principles on which quantum field theory is constructed. Magnetic trapping of antihydrogen atoms provides a means of studying them by combining electromagnetic interaction with detection techniques that are unique to antimatter. Here we report the results of a microwave spectroscopy experiment in which we probe the response of antihydrogen over a controlled range of frequencies. The data reveal clear and distinct signatures of two allowed transitions, from which we obtain a direct, magnetic-field-independent measurement of the hyperfine splitting. From a set of trials involving 194 detected atoms, we determine a splitting of 1,420.4 ± 0.5 megahertz, consistent with expectations for atomic hydrogen at the level of four parts in 10 4. This observation of the detailed behaviour of a quantum transition in an atom of antihydrogen exemplifies tests of fundamental symmetries such as charge-parity-time in antimatter, and the techniques developed here will enable more-precise such tests.