In statistical mechanics, a microstate is a specific microscopic configuration of a thermodynamic system that the system may occupy with a certain probability in the course of its thermal fluctuations. In contrast, the macrostate of a system refers to its macroscopic properties, such as its temperature, pressure, volume and density. Treatments on statistical mechanics define a macrostate as follows: a particular set of values of energy, the number of particles, and the volume of an isolated thermodynamic system is said to specify a particular macrostate of it. In this description, microstates appear as different possible ways the system can achieve a particular macrostate. A macrostate is characterized by a probability distribution of possible states across a certain statistical ensemble of all microstates. This distribution describes the probability of finding the system in a certain microstate. In the thermodynamic limit, the microstates visited by a macroscopic system during its fluctuations all have the same macroscopic properties. Microscopic definitions of thermodynamic concepts Statistical mechanics links the empirical thermodynamic properties of a system to the statistical distribution of an ensemble of microstates. All macroscopic thermodynamic properties of a system may be calculated from the partition function that sums of all its microstates. At any moment a system is distributed across an ensemble of microstates, each labeled by , and having a probability of occupation , and an energy . If the microstates are quantum-mechanical in nature, then these microstates form a discrete set as defined by quantum statistical mechanics, and is an energy level of the system. Internal energy The internal energy of the macrostate is the mean over all microstates of the system's energy This is a microscopic statement of the notion of energy associated with the first law of thermodynamics. Entropy For the more general case of the canonical ensemble, the absolute entropy depends exclusively on the probabilities of the microstates and is defined as where is the Boltzmann constant. For the microcanonical ensemble, consisting of only those microstates with energy equal to the energy of the macrostate, this simplifies to with the number of microstates . This form for entropy appears on Ludwig Boltzmann's gravestone in Vienna. The second law of thermodynamics describes how the entropy of an isolated system changes in time. The third law of thermodynamics is consistent with this definition, since zero entropy means that the macrostate of the system reduces to a single microstate. Heat and