A closed formula is obtained for the infrared singularities of dimensionally
regularized, massless gauge-theory scattering amplitudes with an arbitrary
number of legs and loops. It follows from an all-order conjecture for the
anomalous-dimension matrix of n-jet operators in soft-collinear effective
theory. We show that the form of this anomalous dimension is severely
constrained by soft-collinear factorization, non-abelian exponentiation, and
the behavior of amplitudes in collinear limits. Using a diagrammatic analysis,
we demonstrate that these constraints imply that to three-loop order the
anomalous dimension involves only two-parton correlations, with the possible
exception of a single color structure multiplying a function of conformal cross
ratios depending on the momenta of four external partons, which would have to
vanish in all two-particle collinear limits. We argue that such a function does
not appear at three-loop order, and that the same is true in higher orders. Our
formula predicts Casimir scaling of the cusp anomalous dimension to all orders
in perturbation theory, and we explicitly check that the constraints exclude
the appearance of higher Casimir invariants at four loops. Using known results
for the quark and gluon form factors, we derive the three-loop coefficients of
the 1/epsilon^n pole terms (with n=1,...,6) for an arbitrary n-parton
scattering amplitude in massless QCD. This generalizes Catani's two-loop
formula proposed in 1998.Comment: 46 pages, 9 figures; v2: improved treatment of collinear limits,
references added; v3: improved discussion of non-abelian exponentiation,
references updated; v4: typo in eq. (17) fixed, references updated; v5:
additional term in (17