Segregation of magma from the mantle in subduction zones is one of the principal mechanisms for chemical differentiation of the Earth. Fundamental aspects of this system, in particular the processes by which melt forms and travels to the Earth's surface, remain obscure. Systematics in the location of volcanic arcs, the surface expression of this melting, are widely considered to be a clue to processes taking place at depth, but many mutually incompatible interpretations of this clue exist (for example, see refs 1-6). We discriminate between those interpretations by the use of a simple scaling argument derived from a realistic mathematical model of heat transfer in subduction zones. The locations of the arcs cannot be explained by the release of fluids in reactions taking place near the top of the slab. Instead, the sharpness of the volcanic fronts, together with the systematics of their locations, requires that arcs must be located above the place where the boundary defined by the anhydrous solidus makes its closest approach to the trench. We show that heat carried by magma rising from this region is sufficient to modify the thermal structure of the wedge and determine the pathway through which both wet and dry melts reach the surface.