A quantum gas exhibits degeneracy when quantum phenomena, such as the Pauli exclusion principle for fermions or Bose-Einstein condensation for bosons, become significant. This condition arises when the thermal de Broglie wavelength of the particles approaches or exceeds the average distance between them.The thermal de Broglie wavelength is defined as \(\lambda_{th} = \frac{h}{\sqrt{2\pi m k_B T}}\), and it increases as the temperature \(T\) decreases.The average inter-particle separation is inversely related to the particle density \(n = N/V\), meaning it decreases as the particle density \(n\) increases.Consequently, a system becomes degenerate (indicating a high degree of degeneracy) under conditions of low temperature and high particle density. This forces fermions into higher energy states or bosons into the ground state, both of which are characteristic quantum behaviors.