What causes real gases to deviate from ideal behavior?
Yes you’re partially right. The intermolecular forces operating amongst gas molecules vary with temperature and pressure. In fact , deviations from ideality occur due to both attractive and repulsive forces. The Kinetic Gas theory makes two controversial assumptions: 1.Gas molecules are point sized particles occupying negligible volume 2. They exert negligible forces on each other. If you’re aware of it, the Boyle temperature is the temperature at which, intermolecular forces among gas molecules are minimised. As we go towards relatively lower temperatures and higher pressures, both the above assumptions fail. Gas molecules occupy a considerable part of the container volume, and attractive forces begin to dominate. As a result, the impact of the molecules on the container walls is reduced; thereby pressure falls less than the ‘ideal’ value. Contrastingly, at high temperatures, repulsive forces begin to dominate; pressure becomes higher than the ‘ideal’ value.