The internal energy of an ideal gas decreases by the same amount as the work done by the system.