# How to arrive at the thermodynamic definition of entropy?

My question is, how do we say that, $$dS=\dfrac{dQ}{{T}} ~?$$ How do we relate heat and temperature to entropy? Why is the temperature in the denominator? Can we replace heat by work? How does this fraction measure the "randomness" of the system? Can I define entropy in the following manner; "Entropy is a number that is associated with each macro state of a system and it's larger for macro states having numerous micro states(higher probability) and smaller for macro states that have fewer micro states(lower probability)". This is what I've been able to understand after reading some texts, if this is correct, how to further associate this number with heat and temperature of a system? I've seen a lot of articles and answers, but I haven't got a clear intuition for this term. Please educate me.

• Possible duplicate of Probablistic interpretation of entropy – Jasper Nov 17 '18 at 8:53
• Your question is unclear. Some of it can be answered by the history of classical thermodynamics (Clausius), some of it is asking about the connection to statistical physics. And underneath there is the question what temperature is. – Pieter Nov 17 '18 at 10:57
• All microstates are assumed to be equally likely. Maybe this is helpful: physics.stackexchange.com/questions/302632/… (my answer there is at the bottom). – Pieter Nov 18 '18 at 1:14
• Oh god, that was supposed to be macro sates, I've added some texts, please take a look. – Aravindh Vasu Nov 18 '18 at 1:27

How do we relate heat and temperature to entropy? Why is the temperature in the denominator?

These first two questions are closely tied. In the first place, it helps to recall why it was necessary to come up with a new property called the entropy. The following simple example will show one reason and how the equation you provided for the macroscopic definition of entropy addresses it.

Let there be two bodies, A and B, that are thermal reservoirs in contact with one another (for example the ocean and the atmosphere), so that a transfer of heat $$dQ$$ between them does not alter the bulk temperature of either. We know that heat is defined as energy transfer due solely to temperature difference. So heat will not transfer between A and B unless their temperatures are different. Let the temperature of body A be higher than body B. Experience has shown that heat will only transfer naturally from A to B. Let a quantity of heat, $$dQ$$, transfer out of A into B. Since the quantity out of A equals that into B, and no work is involved, the first law (conservation of energy) satisfied.

But suppose we are told that $$dQ$$ transfers from the colder body B to the hotter A. The first law is satisfied, but experience tells us this never happens. The first law alone is insufficient to rule out this possibility. We know that it is the relationship between the temperatures of the two bodies that dictates the direction that this process can take. So we need to include temperature to define a new property (entropy) that rules out the second scenario. The definition of entropy does this.

$$dS=\frac {dQ_{rev}}{T}$$

We further stipulate that the law governing this new property says that the total change in entropy of a system plus its surroundings (change for the universe) for any process must be equal to or greater than zero:

$$dS_{tot}=dS_{sys}+dS_{surr}≥0$$

We apply this new law to bodies A and B, arbitrarily designating body A as the system and body B as the surroundings noting that the heat $$dQ$$ transferred out of body A is negative and into body B positive. Applying the second law:

$$dS_{tot}=\frac{-dQ}{T_A}+\frac{+dQ}{T_B}$$

From the equation, we observe that for all $$T_{A}>T_{B}$$, $$dS_{tot}>0$$. We further note that as the two temperatures get closer and closer to each other, $$dS_{tot}\to 0$$. Both satisfy the second law inequality.

Now let the heat transfer from the colder body B to the hotter body A). We get:

$$dS_{tot}=\frac{+dQ}{T_A}+\frac{-dQ}{T_B}$$

Which gives us, for all $$T_{A}>T_{B}$$, $$dS_{tot}<0$$, in violation of the second law.

In the limit, when the temperature difference approaches zero, the inequality approaches zero and the process is said to be reversible. However, since a finite temperature difference is always necessary for heat transfer to occur, all real processes are necessarily irreversible.

Can we replace heat by work?

If you mean replacing $$Q$$ with $$W$$ in the definition, as far as I know the answer is no. But it is a very good question because there are processes that do not involve heat transfer between a system and its surroundings (e.g., adiabatic work processes). Since $$Q$$ is zero between the system and its surrounding one might conclude that there is no increase entropy. But adiabatic processes can be irreversible. The definition for entropy can account for the irreversibility, but to do so we must apply it to heat transfer that occurs internal to the system.

Friction is an example of a source of irreversibility. Consider an ideal gas in thermal and mechanical equilibrium in a cylinder fitted with a piston. Friction between the surfaces of the piston and cylinder is dry friction. The motion between the piston and cylinder raises the temperatures of their surfaces much like when we vigorously rub our hands together to warm them up on a cold day. The temperatures of these surface are now greater than the temperature of the layer of gas next to them. Heat transfers from the surfaces to the layer of gas. The layer of gas transfers heat to inner layers of the gas and so on. We have already shown how heat transfer through a finite temperature difference increases entropy.

There is also viscous friction. In order for a process to be reversible, it must be carried out very slowly (quasi-statically) to minimize temperature and pressure differentials in the gas. If the process is carried out too quickly, pressure differentials occur causing relative motion between layers of the gas resulting in viscous friction. Once again, temperature differentials occur and heat transfers occur with the gas.

Can I define entropy in the following manner; "Entropy is a number that is associated with each macro state of a system and it's larger for macro states having numerous micro states (higher probability) and smaller for macro states that have fewer micro states (lower probability)"…” if this is correct, how to further associate this number with heat and temperature of a system?”

Your definition gets into the realm of statistical thermodynamics. I’m not versant enough to assess your definition, but I can try to provide an association between the probabilities associated with microstates and the macroscopic definition of temperature that applies to the entropy definition of classical thermodynamics.

Classical thermodynamics basically defines temperature (so called “kinetic temperature”) as the average random translational kinetic energy of the atoms/molecules of a substance. Let’s take our two bodies A and B but now assume they are not thermal reservoirs (i.e., temperatures can change). To simply further let them be solids in thermal contact. Macroscopically we know that heat will flow naturally from A to B because and not the other way, since we’ve never observed it. Is it impossible? It seems that way. But perhaps it is possible but highly improbable. To consider this we look at what’s going on at the molecular level.

Although the average translational kinetic energy of all the molecules is higher for A than B, the energies of the individual molecules of both bodies are distributed overq a range of energies (Boltzmann distribution). So in the cold body B we can find some molecules with higher kinetic energy than some molecules in body A. If one of the high-energy B molecules collides with one of the low energy A molecules the A molecule may gain kinetic energy and the B molecule lose an equal amount of kinetic energy (assumes perfectly elastic collisions). The A molecule increases in the average kinetic energy of the molecules in A. However for the macroscopic temperature of the hotter body A to increase, the high- energy B molecules must selectively collide with low energy A molecules. It’s not impossible, but it would be highly improbable since we would expect the collisions to occur randomly between all the A and B molecules.

Sorry if this was too long. I’m sure it doesn’t answer all your questions, but perhaps it will help in further understanding what you have and will read on the subject.

• "Classical thermodynamics basically defines temperature (so called “kinetic temperature”) as the average random translational kinetic energy of the atoms/molecules of a substance." it is not what classical thermodynamics says about temperature. the thermodynamic definition is $\partial{E}/\partial{S}$ or some related quantity. It is only through the kinetic theory of gases that one can justify the connection between a macroscopic quantity ($T$) and a microscopic one (the kinetc energy of molecules). – GiorgioP Nov 19 '18 at 21:17
• @GiorgioP I didn't intend to mean a formal definition. Perhaps I should have said "described" instead of "defined".I think it is only through the kinetic theory of gases that we can justify a connection between temperature and internal energy, because temperature does not measure rotational and vibrational modes of KE nor does it measure the PE associated with intermolecular forces. – Bob D Nov 20 '18 at 8:43
• Temperature measures rotational and vibrational modes of KE as well, provided that they are not frozen as a consequence of a too small kT as compared to the spacing between energy levels. – GiorgioP Nov 20 '18 at 13:18
• @GiorgioP I agree that rotational and vibrational modes of KE contribute to temperature by colliding with molecules in translation thus adding to their translational KE. But I still believe that it is the average translational KE of the collection of molecules that temperature directly measures. If you want to discuss this any further, let’s do it in CHAT. – Bob D Nov 20 '18 at 13:47

It seems to me that the question in the title is crystal clear, referring to the thermodynamic definition of entropy. Unfortunately, the following elaboration on the basic question introduces concepts (randomness, microstates, probability) which are external to the realm of thermodynamics and pertain to statistical mechanics. At variance with ideas conveyed sometimes at introductory level, statistical mechanics aims to reproduce the thermodynamic behavior of equilibrium systems, but it is neither a generalization, nor a justification of thermodynamics, although it may provide a clarification for many thermodynamic concepts.

Coming to the formula connecting differential of entropy ($$dS$$), exchanged heat ($$dQ$$) and absolute temperature ($$T$$), the first observation is that in general is not true that $$dS=dQ/T$$. The equality holds, and becomes the thermodynamic definition of $$dS$$, only for a reversible exchange of heat (let's indicate it as $$dQ_{rev}$$).

From a purely thermodynamic point of view, the only point which requires justification is to show that $$\frac{dQ_{rev}}{T}$$ actually defines the differential of a function of state. The classic way of obtaining such result is through a careful analysis of the Carnot cycle.

The reasoning goes as follows (I will not fill all the details but I just recall the key points of a derivation which can be found in every good thermodynamic textbook).

From the analysis of the efficiency of the Carnot cycle, one finds that it is possible to associate to any arbitrary temperature scale $$\theta$$ a thermodynamic temperature $$T=\phi(\theta)$$ through the equality: $$\frac{Q_1}{Q_2}=\frac{T_1}{T_2},$$ where $$Q_1$$ and $$Q_2$$ are the heat exchanged between system and environment at the two isotherms a Carnot cycle is made of.

As a consequence of the definition of the absolute temperature, applying the above formula to a very small reversible Carnot cycle, one gets: $$\frac{dQ_1}{T_1}=\frac{dQ_2}{T_2}$$ and decomposing a generic cycle into a sequence of isotherms and adiabatic transformations, one arrives to $$\oint \frac{dQ_{rev}}{T}=0$$ for any cycle in the thermodynamic space. As a consequence, $$\int_A^B \frac{dQ_{rev}}{T}$$ can be written as $$S_B-S_A$$, which is a function of the state B, once the state A is taken as reference.

Since the highest possible efficiency of a Carnot cycle can be obtained only in correspondence of a reversible cycle, in the non-reversible case $$\oint \frac{dQ}{T}<0$$ which implies $$S_B-S_A > \int_A^B \frac{dQ}{T}$$ i.e. the entropy of an isolated system ($$dQ=0$$) can only increase if the system is made evolving from a state $$A$$ to a state $$B$$ by removing some internal constraint.

In the whole story above, there is no trace of "number of states', probability, randomness or alike.

Probability and number of states come into play, and have a precise operative meaning, only with Statistical Mechanics. But, at level of equilibrium statistical mechanics, it is not easy to define the exchanged heat. What is usually done is to show that one or more statistical mechanics formulae behave like the thermodynamic entropy and thus can be identified with it.

A final word about randomness. Even at level of Statistical Mechanics it is not possible to establish a link between randomness in configuration space and entropy. The main reason being that the existence of such a link is not always true.