
When considering a certain volume of gas (such as an air parcel), that gas can either do work on its environment by expanding (pushing outward) or have work done on it by the environment by being compressed (pushed inward.)
If the parcel expands because it is rising, then W must be positive because the air parcel is doing work.
If the parcel is compressed because it is sinking, then W must be negative because work is being on the air parcel.
In science, the Δ symbol means "change of".
According to the first law of thermodynamics,
where Q is heat, E is the internal energy of the system, and W is work done by the system.
The definition of an adiabatic process is that heat transfer to the system is zero, meaning ΔQ = 0. Then,
When air expands (rising parcel), the air parcel is doing work so W is positive, which means ΔE is negative. A negative ΔE means the air parcel is losing energy which results in a cooler temperature.
When air is compressed (sinking parcel), work is being done on the air parcel so W is negative, which means ΔE is positive. A positive ΔE means the air parcel is gaining energy which results in a warmer temperature.