  We study the smooth path spaces of Euclidean spaces $\mathbb{R}^N$, as
diffeological spaces. We show that the tangent spaces of the free path space
$\mathscr{P}$ are isomorphic to $\mathscr{P}$ itself, and that the tangent
spaces of the space $\mathscr{P}_{\mathbf{p}, \mathbf{q}}$ of paths with fixed
endpoints $\mathbf{p}$ and $\mathbf{q}$ are isomorphic to the smooth loop space
of $\mathbb{R}^N$ based at the origin. We also define cotangents and gradients
of smooth maps from these path spaces, and then show that, in the case of the
action functional which arises in the calculus of variations, the gradient is
precisely the path formed out of the terms of the Euler-Lagrange equations. We
show that solutions of the Euler-Lagrange equations correspond precisely to the
zeros of the gradient, and also provide analogous interpretations for the
constrained Euler-Lagrange equations. This gives an illuminating geometric
perspective on these equations. Finally, we illustrate the theory with several
concrete examples from geometry, mechanics and machine learning.
