When a material is heated, it undergoes thermal expansion, meaning its dimensions increase uniformly. A cavity within the material expands as if it were filled with the material itself. Imagine the cavity as a missing piece of the solid that is expanding.