# If a gas absorbs heat, then how can its temperature remain constant?

My book has this line:

In an isothermal expansion, the gas absorbs heat and does work

But, if a gas absorbs heat, then how can its temperature remain constant? (as the process is isothermal)

From the first law, $\Delta U=Q-W$. If the process is isothermal, then $\Delta U=0$ (assuming an ideal gas), so Q = W. The heat energy is consumed by your gas doing work, so there is no change in internal energy (temperature).