Newtonian vs. Lagrangian vs. Hamiltonian Mechanics: Key Differences

Newtonian, Lagrangian, and Hamiltonian mechanics are three closely related ways of describing how physical systems move and evolve. All three belong to classical mechanics, the branch of physics concerned with motion, forces, energy, and the behavior of objects on scales where quantum effects and relativistic corrections can usually be neglected.

The key difference is how each framework describes motion. Newtonian mechanics focuses on forces and acceleration, Lagrangian mechanics uses energy and the principle of stationary action, and Hamiltonian mechanics describes how a system evolves through its positions and momenta. Although their mathematical approaches differ, they often produce the same predictions for the same physical system.

These are not three competing theories in which one replaces the others. Each offers a different perspective, making certain problems easier to understand, calculate, or generalize. Together, they provide a foundation for much of physics, from predicting the trajectory of a thrown ball to studying planetary orbits and developing the mathematical tools used in quantum mechanics.

What Newtonian mechanics describes

Newtonian mechanics, developed primarily through Isaac Newton’s work in the 17th century, describes motion by relating an object’s acceleration to the forces acting on it. Its central principle is Newton’s second law:

F = ma

Here, F is the net force on an object, m is its mass, and a is its acceleration. In plain language, an object accelerates when a net force acts on it, with greater forces producing greater acceleration for a given mass.

This approach is intuitive because it connects familiar physical causes to observable changes in motion. Gravity pulls a falling object downward, friction slows a sliding box, and a force applied to a cart changes its velocity. To predict the resulting motion, a physicist identifies the forces, determines their combined effect, and solves the equations describing the object’s acceleration.

For a single object moving along a straight line, Newton’s second law can be written as a differential equation involving position and time. Solving that equation, together with suitable initial conditions, gives the object’s future motion. Initial conditions specify the system’s starting state, such as its position and velocity.

For example, consider a ball thrown into the air. Ignoring air resistance, gravity provides a constant downward force near Earth’s surface. Newton’s laws predict that the ball slows as it rises, reaches its highest point, and accelerates downward as it falls. The same method can describe more complicated situations involving multiple objects, springs, friction, and gravitational interactions.

Newtonian mechanics is especially useful when the forces acting on a system are easy to identify and express. Engineers use it to analyze structures, vehicles, machines, and moving components. Physicists use it to study collisions, projectiles, and many other everyday mechanical processes.

However, the force-based approach can become cumbersome for complicated systems. A pendulum, for instance, is constrained to swing along a circular arc. Its motion depends on gravity, the tension in its supporting string, and the geometric restriction imposed by that string. In systems with many connected parts, calculating all the forces and constraints can require a large set of equations.

Lagrangian and Hamiltonian mechanics offer alternative ways to organize the same underlying problem.

How Lagrangian mechanics approaches motion

Lagrangian mechanics describes motion through a quantity called the Lagrangian, which is usually defined as the kinetic energy minus the potential energy:

L = T − V

Kinetic energy is the energy associated with motion, while potential energy represents energy associated with position or configuration, such as the gravitational energy of a raised object or the elastic energy stored in a stretched spring.

The Lagrangian is not simply the total energy of a system. It is a mathematical quantity that combines kinetic and potential energy in a way that allows the equations of motion to be derived systematically.

The central idea is the principle of stationary action. In classical mechanics, the action is calculated by integrating the Lagrangian over a period of time. The actual motion of a system follows a path for which this action is stationary under small variations of the path, assuming the relevant boundary conditions are fixed.

Stationary does not necessarily mean the action is the smallest possible value. It means that small changes to the path do not change the action to first order. In many familiar situations, the physical path corresponds to a minimum, but that is not universally true.

This principle leads to the Euler–Lagrange equations:

d/dt (∂L/∂q̇ᵢ) − ∂L/∂qᵢ = 0

Here, qᵢ represents a generalized coordinate, and q̇ᵢ represents its time derivative, or generalized velocity. A generalized coordinate is any suitable variable used to describe the configuration of a system. It might be a distance, an angle, or another quantity that captures the system’s degrees of freedom—the independent ways in which it can move.

The equations apply separately to each generalized coordinate. They provide a systematic route from the Lagrangian to the equations governing motion.

Why generalized coordinates matter

One of the greatest advantages of Lagrangian mechanics is that it can incorporate constraints without requiring every constraint force to be calculated explicitly.

Consider a simple pendulum: a mass attached to a string of fixed length. Instead of tracking the mass’s horizontal and vertical positions independently, a physicist can describe its configuration with a single angle, θ. The fixed string length is built into this choice of coordinate, so the motion automatically remains on a circular arc.

For an ideal pendulum of length ℓ, with the angle measured from the downward vertical, the kinetic and potential energies can be expressed as:

T = ½mℓ²θ̇²

V = mgℓ(1 − cos θ)

The resulting Lagrangian is:

L = ½mℓ²θ̇² − mgℓ(1 − cos θ)

Applying the Euler–Lagrange equation gives:

θ̈ + (g/ℓ) sin θ = 0

This equation describes the pendulum’s angular motion. For small angles, sin θ is approximately equal to θ when θ is measured in radians. The equation then becomes θ̈ + (g/ℓ)θ = 0, which describes approximately simple harmonic motion.

The advantage is that the derivation does not require a separate calculation of the string’s tension. The chosen coordinate already accounts for the geometric constraint.

Lagrangian mechanics is particularly valuable for systems with many interacting components, complicated geometry, or constraints. It is widely used in robotics, celestial mechanics, continuum mechanics, and theoretical physics. It also makes the relationship between physical symmetries and conservation laws especially clear.

For example, if a system’s Lagrangian does not change when the entire system is shifted in space, the corresponding symmetry is associated with conservation of linear momentum. If the Lagrangian is unchanged by a shift in time, the system’s energy is conserved under the usual assumptions. These relationships are examples of Noether’s theorem, which connects continuous symmetries to conserved quantities.

How Hamiltonian mechanics describes motion

Hamiltonian mechanics offers a third formulation of classical mechanics. Instead of organizing a system around its coordinates and velocities, it uses its coordinates and conjugate momenta.

The Hamiltonian, written H, is often equal to the total energy of a system. For many familiar mechanical systems, it is constructed from the Lagrangian using a mathematical transformation called the Legendre transform:

H = Σ pᵢq̇ᵢ − L

Here, pᵢ is the generalized momentum associated with coordinate qᵢ. In ordinary Cartesian coordinates for a particle of constant mass, momentum is simply mass multiplied by velocity. In more general coordinates, conjugate momentum is defined through the Lagrangian:

pᵢ = ∂L/∂q̇ᵢ

The Hamiltonian formulation describes motion using Hamilton’s equations:

q̇ᵢ = ∂H/∂pᵢ

ṗᵢ = −∂H/∂qᵢ

These equations show how both the coordinates and their conjugate momenta change over time. The first determines the rate of change of a coordinate, while the second determines the rate of change of its momentum.

This is a different mathematical organization from Newton’s second law, but the underlying physical motion is generally the same when the formulations are applied under equivalent conditions.

Phase space and the evolution of a system

Hamiltonian mechanics naturally describes a system in phase space, a mathematical space whose coordinates include both position and momentum. For a single particle moving in one dimension, the state is represented by a point with position q and momentum p.

As time passes, that point traces a path through phase space. The path records the evolving state of the system rather than position alone. Knowing the complete phase-space state at a given time, together with the Hamiltonian and the relevant equations, determines the subsequent evolution for a well-posed classical problem.

This perspective is useful because it treats position and momentum as complementary variables. It also reveals important geometric properties of mechanical motion and provides a natural language for studying long-term behavior, stability, and conservation laws.

For a simple particle moving in one dimension under a potential energy V(q), the Hamiltonian is:

H = p²/(2m) + V(q)

In this familiar case, the Hamiltonian is the sum of kinetic and potential energy. Hamilton’s equations then give:

q̇ = p/m

ṗ = −dV/dq

The first equation relates momentum to velocity, while the second states that momentum changes according to the force associated with the potential. Since F = −dV/dq, these equations reproduce Newton’s second law for a particle of constant mass.

Hamiltonian mechanics is especially useful in advanced classical mechanics, celestial mechanics, statistical mechanics, and the development of quantum theory. It also provides tools for studying systems whose behavior is complicated by nonlinear interactions or long-term dynamical effects.

The Hamiltonian is not always identical to the total energy. That equality holds for many standard mechanical systems, but more general formulations, coordinate choices, or explicitly time-dependent systems require care when interpreting H as physical energy.

The key differences between the three formulations

The most important distinction is not the physical result each method predicts, but the variables and mathematical principles used to obtain that result.

FeatureNewtonian mechanicsLagrangian mechanicsHamiltonian mechanics
Central ideaForces determine accelerationMotion follows from the stationary-action principleMotion evolves through coordinates and conjugate momenta
Main mathematical quantityNet forceLagrangian, usually T − VHamiltonian, often equal to total energy
Primary variablesPosition and velocity, with acceleration determined by forcesGeneralized coordinates and generalized velocitiesGeneralized coordinates and conjugate momenta
Main equationsNewton’s laws, especially F = maEuler–Lagrange equationsHamilton’s equations
Treatment of constraintsOften requires explicit constraint forces or equationsOften incorporates constraints through coordinate choicesRepresents constrained motion through suitable Hamiltonian formulations
Typical strengthIntuitive force-based reasoningEfficient treatment of complex geometry and constraintsPhase-space analysis and connections to advanced physics

Newtonian mechanics is often the most direct choice when forces are easy to identify and the motion is relatively simple. Lagrangian mechanics is often more convenient when the system has complicated constraints or many degrees of freedom. Hamiltonian mechanics is especially powerful when the evolution of a system in phase space, its conserved quantities, or its connection to other areas of physics is central to the problem.

These are tendencies rather than strict rules. All three methods can solve many of the same problems, and the best choice depends on the system, the desired result, and the mathematical tools available.

How the three approaches describe the same physical system

A useful way to understand their relationship is to examine a mass attached to an ideal spring. Suppose the mass moves horizontally without friction, and the spring exerts a restoring force proportional to its displacement from equilibrium.

In Newtonian mechanics, the force is F = −kx, where k is the spring constant and x is displacement from equilibrium. Newton’s second law gives:

mẍ = −kx

Rearranging produces the equation of simple harmonic motion:

ẍ + (k/m)x = 0

The equation predicts oscillation with angular frequency √(k/m).

In Lagrangian mechanics, the kinetic energy is T = ½mẋ² and the potential energy is V = ½kx². Therefore, the Lagrangian is:

L = ½mẋ² − ½kx²

Applying the Euler–Lagrange equation produces the same equation of motion.

In Hamiltonian mechanics, the conjugate momentum is p = mẋ, and the Hamiltonian for this system is:

H = p²/(2m) + ½kx²

Hamilton’s equations give ẋ = p/m and ṗ = −kx. Combining them again yields mẍ = −kx.

All three approaches predict the same oscillation because they describe the same ideal physical system under the same assumptions. The differences lie in how the problem is formulated and how the equations are derived.

This equivalence is important: choosing a different mathematical formulation does not, by itself, change the physical laws. It changes the route taken to express and solve them.

Why Lagrangian and Hamiltonian mechanics are useful beyond simple motion

The alternative formulations become particularly valuable when a system is too complicated for straightforward force calculations.

In systems with many linked components, Newtonian mechanics may require separate equations for each object and additional equations for the forces enforcing constraints. Lagrangian mechanics can reduce that burden by choosing coordinates that directly represent the independent motions. This is particularly useful in robotics, where joints restrict how different parts of a machine can move.

Lagrangian mechanics also provides a natural route to theories in which fields, rather than just individual particles, are the main objects of study. In field theory, a Lagrangian density plays a role analogous to the ordinary Lagrangian, and the equations derived from it describe how fields evolve through space and time. This framework is central to modern formulations of electromagnetism and other fundamental physical theories.

Hamiltonian mechanics adds a complementary perspective. Its phase-space formulation supports the study of dynamical systems, including how trajectories evolve, how stable or unstable behavior develops, and how conserved quantities constrain possible motion. It is also foundational to Hamiltonian formulations of classical statistical mechanics and quantum mechanics.

In quantum theory, classical Hamiltonians help determine quantum energy operators and the equations governing time evolution. However, quantum mechanics is not simply classical Hamiltonian mechanics applied unchanged to very small objects. Quantum theory requires a different mathematical framework, including operators, quantum states, and the rules governing measurement.

Similarly, none of these three classical formulations fully replaces the need for relativistic mechanics when speeds approach the speed of light or gravitational fields become sufficiently strong. Newtonian, Lagrangian, and Hamiltonian methods can all be adapted to relativistic theories, but their familiar elementary forms have specific assumptions and limits.

Conservation laws and the role of symmetry

One reason Lagrangian and Hamiltonian mechanics are so influential is that they help reveal the deeper structure of physical laws.

A conservation law states that a quantity remains constant during a system’s evolution under specified conditions. Common examples include conservation of energy, linear momentum, and angular momentum. Newtonian mechanics can derive these laws from force equations, but the Lagrangian framework makes the connection between conservation and symmetry especially systematic.

A symmetry is a transformation that leaves the relevant physical description unchanged. If the laws governing an isolated system do not depend on the choice of spatial origin, that translational symmetry is associated with conservation of linear momentum. If the laws do not depend on the orientation of the coordinate system, rotational symmetry is associated with conservation of angular momentum.

Time-translation symmetry is associated with energy conservation. In a standard mechanical system with no explicit time dependence in its Lagrangian, the corresponding conserved energy is typically the Hamiltonian when the usual regularity conditions hold.

These connections do more than simplify calculations. They help physicists identify which quantities must remain constant and which motions are physically possible. When solving a difficult problem, a conserved quantity can sometimes provide an answer or constraint without requiring the full trajectory to be calculated.

The three formulations express conservation laws in different ways, but they are linked by the same underlying physical symmetries.

Which formulation should you use?

For a beginner studying how forces change motion, Newtonian mechanics is usually the best starting point. Its equations connect directly to everyday experience, and free-body diagrams provide a clear method for identifying the forces acting on an object.

Lagrangian mechanics becomes especially useful when the geometry of a problem is complicated or when several objects are connected by constraints. By working with generalized coordinates and energy, it can eliminate unnecessary variables and avoid calculating some constraint forces explicitly.

Hamiltonian mechanics is often the preferred framework when the problem concerns phase-space trajectories, advanced dynamical systems, statistical mechanics, or the transition from classical to quantum descriptions. Its mathematical structure also makes certain theoretical connections easier to recognize.

There is no universal rule that one formulation is always simpler or superior. A problem involving a falling object may be easiest to solve using Newton’s laws. A pendulum with several linked parts may be more manageable with a Lagrangian. A study of phase-space behavior or Hamiltonian dynamics may call for the Hamiltonian approach.

The most important lesson is that these frameworks are complementary. Newtonian mechanics emphasizes the relationship between forces and acceleration, Lagrangian mechanics emphasizes energy and stationary action, and Hamiltonian mechanics emphasizes the evolution of coordinates and momenta. Each highlights a different aspect of classical mechanics, giving physicists several powerful ways to understand and predict the same physical world.

Looking For Something Else?