Laws of Thermodynamics
There are 4 fundamental laws in thermodynamics that governs everything. But the first law is called Zeroth Law due to its been discovered the last but its super fundamental than all of the rest so have been moved to the front.
Zeroth Law
This is the foundation of Temperature.
If systems and are in thermal equilibrium, and and are in thermal equilibrium, Then and are also in the same equilibrium.
This transitivity property is required for the Temperature () to be a mathematically valid property. If , and we say no heat transfer. If , then when touched with and some heat transferred, then the Temperature Property is mathematically invalid.
Also thermometer can be used because of this. If transitivity property was not valid, even when Thermometer show in two cases, we cannot say they are equal. The only way to truly say they are equal would be to make them touch and see if there is heat transfer.