A gas expands and contracts faster than a solid or liquid. The reason for this has to do with the molecular interactions. In a gas, each molecule is not influenced by others around it except for collisions between molecules. Therefore it is free to expand or contract. In a solid, however, the molecules are in rigid contact with one another, and have strong bonds holding the molecules together. To "expand" a solid these bonds have to be broken, which requires more energy than in the case of a gas. To contract a solid, repulsive forces due to the molecules being in contact with each other must be overcome, which also requires additional energy. A liquid is similar to a solid in that the molecules are in contact with neighboring molecules, although the bonds that attract them to each other are not as strong.