CO2 and methane are both greenhouse gases that trap heat in Earth's atmosphere through the greenhouse effect. Nitrogen (N2) is not a greenhouse gas as it doesn't absorb infrared radiation, while sulphates actually have a cooling effect by reflecting sunlight back into space.