A phenomenon in which an object collapses because its internal gas pressure, magnetic pressure, or material strength is unable to support its own weight. For a gas, a region will become gravitationally unstable when its mass rises above a critical value, the Jeans mass. In molecular clouds, the Jeans mass can be low enough for stars and planets to form. In the early Universe, the instabilities may have been large enough to produce galaxies and clusters of galaxies. In Earth-like planets, gravitational instability leads to the precipitation of heavier elements downwards to form the core.