Skip to content
Tutorials Center
My learning

Topics

Lesson 25 of 44 · Hamiltonian Mechanics

Chapter 6 Overview: Hamiltonian Mechanics

Preview of chapter 6: replace velocities by momenta, write Hamilton's first-order equations, picture motion in phase space and use Poisson brackets.

Lagrangian mechanics describes a system by its coordinates q and velocities q̇. In the 1830s William Rowan Hamilton found a second description that uses coordinates q and momenta p. It looks like a small change, but it has large consequences: the equations become first-order, the geometry of motion becomes visible, and the structure survives into quantum mechanics and statistical mechanics.

This chapter builds the Hamiltonian view from the Lagrangian one. You do not throw away anything you learned: you convert it.

Lagrangian world and Hamiltonian world side by side
Caption: the Legendre transform turns (q, q̇) and L into (q, p) and H; solving for q̇ goes back.

What you will learn

  • Why mechanics gets a second formulation, and what it buys you.
  • The one-line idea of the Legendre transform.
  • What phase space is and why trajectories never cross there.
  • What Poisson brackets and canonical transformations are for.

The chapter at a glance

Swap velocity for momentum

Velocity q̇ the Lagrangian variable
Momentum p the Hamiltonian variable

p = ∂L/∂q̇ links the two.

1 / 4

What each lesson covers

  1. The Legendre transform and Hamilton's equations: from L(q, q̇) to H(q, p), with four standard examples.
  2. Phase space and Liouville's theorem: portraits of the pendulum and the oscillator, and why phase-space area is conserved.
  3. Poisson brackets and canonical transformations: the bracket as a calculator for conserved quantities, and changes of variables that keep Hamilton's form.
  4. Chapter review: a one-page picture and ten questions.

A first look: phase portraits

A phase portrait plots momentum against position. For a mass m on a spring of stiffness k, the Hamiltonian is H = p²/2m + kx²/2, and each energy gives an ellipse. The TryIt draws several of them. This is a plot of the formula, with arrows added to show the direction of motion: the point moves clockwise.

Python Phase portrait of a harmonic oscillator

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Which pair of variables describes the state of a system in Hamiltonian mechanics?

    Hamiltonian mechanics uses coordinates q and their conjugate momenta p.
  2. 2. How many first-order equations does Hamilton's formulation use for a system with n coordinates?

    There is one equation for each q and one for each p.
  3. 3. What is plotted in a phase portrait?

    Each point (q, p) is a complete state; curves show how the state changes.
  4. 4. Which man introduced the Hamiltonian formulation?

    Hamilton published it in the 1830s.

Summary

  • The Hamiltonian view uses (q, p) in place of (q, q̇).
  • The Legendre transform converts L into H; Hamilton's equations are first order.
  • Phase space is the map on which trajectories are drawn.
  • Poisson brackets and canonical transformations are the tools you get next.

Next: The Legendre transform and Hamilton's equations