This is the foundation of classical field theory, where the Lagrangian of a system is defined as the difference between its kinetic and potential energy. The equations of motion for fields are derived from the action principle, where the action is the integral of the Lagrangian over time.