This is a textbook on statistical mechanics and thermodynamics. It begins with the molecular nature of matter and the fact that we want to describe systems containing many (1020) particles. The first part of the book derives the entropy of the classical ideal gas using only classical statistical mechanics and Boltzmann’s analysis of multiple systems. The properties of this entropy are then expressed as postulates of thermodynamics in the second part of the book. From these postulates, the structure of thermodynamics is developed. Special features are systematic methods for deriving thermodynamic identities using Jacobians, the use of Legendre transforms as a basis for thermodynamic potentials, the introduction of Massieu functions to investigate negative temperatures, and an analysis of the consequences of the Nernst postulate. The third part of the book introduces the canonical and grand canonical ensembles, which are shown to facilitate calculations for many models. An explanation of irreversible phenomena that is consistent with time-reversal invariance in a closed system is presented. The fourth part of the book is devoted to quantum statistical mechanics, including black-body radiation, the harmonic solid, Bose–Einstein and Fermi–Dirac statistics, and an introduction to band theory, including metals, insulators, and semiconductors. The final chapter gives a brief introduction to the theory of phase transitions. Throughout the book, there is a strong emphasis on computational methods to make abstract concepts more concrete.