Skip to content

Learning Differential Geometry for Hamiltonian Monte Carlo

You can get a taste of Hamiltonian Monte Carlo (HMC) by reading the very gentle introduction in David MacKay’s general text on information theory:

Follow this up with Radford Neal’s much more thorough introduction to HMC:

  • Neal, R. 2011. MCMC Using Hamiltonian Dynamics. In Brooks, Gelman, Jones and Meng, eds., Handbook of Markov Chain Monte Carlo. Chapman and Hall/CRC Press.

To understand why HMC works and set yourself on the path to understanding generalizations like Riemann manifold HMC, you’ll need to know a bit about differential geometry. I really liked the combination of these two books:

  • Magnus, J. R. and H. Neudecker. 2007. Matrix Differential Calculus with Application in Statistics and Econometrics. 3rd Edition. Wiley?


As a bonus, Magnus and Neudecker also provide an excellent introduction to matrix algebra and real analysis before mashing them up. The question mark after “Wiley” is due to the fact that the preface says that the third-edition is self-published and copyright the authors and and available from the first author’s home page. It’s no longer available on Magnus’s home page, nor is it available for sale by Wiley. It can be found in PDF form on the web, though; try Googling [matrix differential calculus magnus].


  1. konrad says:

    That’s chapter 30 in Mackay, not 31 – at least in my hardcopy, don’t know if the downloadable version is different.