The same formulae may be applied to determining the conditions for star formation in giant molecular clouds. A local fluctuation in the density of such a cloud can lead to a runaway condition in which the cloud collapses inwards under its own gravity. Such a collapse occurs when the equipartition theorem—or, equivalently, the virial theorem —is no longer valid, i.e., when the gravitational potential energy exceeds twice the kinetic energy