I know that the equation for the work done on a gas is:
So then if you compress the gas, dV is negative and thus the work on the gas is positive, vice versa when it expands.
But this literally makes no sense to me in this problem:
"A 0.90 kg block of aluminum is heated at atmospheric pressure so that its temperature increases from 22.0°C to 40.0°C."
Pressure is constant, so it ends up being $W = -p\triangle V$. Plug in $\triangle V=3\alpha V_0 \triangle T$ and solve (given density and coefficient of volumetric expansion or whatever),
The work shows that it's negative (though I'm not actually sure why I'd even use that equation but that's what the solution says to do), but that makes no sense to me at all. How come? From my perspective you're literally giving heat to the block of aluminum.