Matter, or material substance, is that which has extension in space and time. All material bodies have inherent inertia, measured quantitatively by their mass, and exert gravitational attraction on other such bodies (see gravity. Matter may also be considered as a specialized form of energy. There are three physical states of matter: solid, liquid, and gas. An ideal solid tends to return to its original shape after forces applied to it are removed. Solids are either crystalline or amorphous; most melt and become liquids when heated. Liquids and gases are both fluids: liquids are only slightly compressible but gases are easily compressed. On the molecular scale, the state of matter is a balance between attractive intermolecular forces and the disordering thermal motion of the molecules. When the former predominate, molecules vibrate about fixed positions in a solid crystal lattice. At higher temperatures, the random thermal motion of the molecules predominates, giving a featureless gas structure. The short-range intermolecular order of a liquid is an intermediate state between solid and gas.