  We analyze the pion transition form factor using dispersion theory. We
calculate the singly-virtual form factor in the time-like region based on data
for the $e^+e^-\to 3\pi$ cross section, generalizing previous studies on
$\omega,\phi\to3\pi$ decays and $\gamma\pi\to\pi\pi$ scattering, and verify our
result by comparing to $e^+e^-\to\pi^0\gamma$ data. We perform the analytic
continuation to the space-like region, predicting the poorly-constrained
space-like transition form factor below 1 GeV, and extract the slope of the
form factor at vanishing momentum transfer $a_\pi=(30.7\pm0.6)\times 10^{-3}$.
We derive the dispersive formalism necessary for the extension of these results
to the doubly-virtual case, as required for the pion-pole contribution to
hadronic light-by-light scattering in the anomalous magnetic moment of the
muon.
