The four thermodynamic potentials are related by offsets of the "energy from the environment" term TS and the "expansion work" term PV. A mnemonic diagram suggested by Schroeder can help you keep track of the relationships between the four thermodynamic potentials.