If you want to know the temperature outside, that information is only a click or tap away. Before computers and smartphones, however, you needed to look at an actual thermometer.
One style of thermometer is a liquid-in-glass thermometer. These consist of a glass tube filled with a visible liquid (such as mercury or dyed alcohol). The glass tube is marked with different temperatures, and the temperature reading corresponds to the mark closest to the top surface of the liquid.
A thermometer works because matter expands as it gets hotter: at higher temperatures the liquid takes up a larger volume, filling up more of the inside of the glass tube. The marks on the glass tube are calibrated such that the mark for is reached when the liquid is at , the mark for is reached when the liquid is at , and so on.
Thermal expansion affects all matter, not just liquids. Solids also expand as they get hotter. Unlike a liquid, solids aren't constrained by a container, so they expand along every dimension. When a solid rod is heated, its length increases. Sheets will increase in area, and cubes will increase in volume.
In other words, the distance between any two points on the solid increases as its temperature increases.
You might wonder, "If the solid glass tube of the thermometer also gets bigger as it heats up, why does the level of the liquid go up at all?"
It's true that the volume inside the glass tube will increase as it heats up, but the liquid inside expands much faster than the glass (by 10 to 100 times), so it still reaches higher temperature marks as the temperature of the whole thermometer increases.
How much a material expands over a rise in temperature is called its coefficient of thermal expansion. For example, the coefficient of thermal expansion of glass is per degree Celsius, while the coefficient of thermal expansion of the liquid inside a thermometer is much higher. This means after a rise of , a glass tube's length is multiplied by
This amount seems tiny, but if glass (or another solid) isn't given room to expand and contract with natural temperature changes in the environment, these small changes can sometimes be enough to cause it to crack or shatter.