Abstract. The rate of erosion of a geomorphic surface depends on its local gradient and on the material fluxes over it. Since both quantities are functions of the shape of the catchment surface, this dependence constitutes a mathematical straitjacket, in the sense that – subject to simplifying assumptions about the erosion process, and absent variations in external forcing and erodibility – the rate of change of surface geometry is solely a function of surface geometry. Here we demonstrate how to use this geometric self-constraint to convert an erosion model into its equivalent Hamiltonian, and explore the implications of having a Hamiltonian description of the erosion process. To achieve this conversion, we recognize that the rate of erosion defines the velocity of surface motion in its orthogonal direction, and we express this rate in its reciprocal form as the surface-normal slowness. By rewriting surface tilt in terms of normal slowness components, and by deploying a substitution developed in geometric mechanics, we extract what is known as the fundamental metric function of the model phase space; its square is the Hamiltonian. Such a Hamiltonian provides several new ways of solving for the evolution of an erosion surface: here we use it to derive Hamilton's ray tracing equations, which describe both the velocity of a surface point and the rate of change of the surface-normal slowness at that point. In this context, erosion involves two distinct directions: (i) the surface-normal direction, which points subvertically downwards, and (ii) the erosion ray direction, which points upstream at a generally small angle to horizontal with a sign controlled by the scaling of erosion with slope. If the model erosion rate scales faster than linearly with gradient, the rays point obliquely upwards; but if erosion scales sublinearly with gradient, the rays point obliquely downwards. Analysis of the Hamiltonian shows that these rays carry boundary-condition information upstream, and that they are geodesics, meaning that erosion takes the path of least erosion time. This constitutes a definition of the variational principle governing landscape evolution. In contrast with previous studies of network self-organization, neither energy nor energy dissipation is invoked in this variational principle, only geometry.