see also:

The action, , is a functional, which means it takes a function (the system’s path through its configuration space) as input and returns a scalar. It is defined as the integral over time of the Lagrangian, , of the system:

Here, represents the generalized coordinates of the system (which can be positions, angles, or field values), are their time derivatives, and is the difference between the kinetic and potential energies for classical systems.