# Why is pressure negative in force and work

The equation to measure work is $$w=F\cdot D$$

However, the equation for force is $$F=(-P \cdot A)$$

Plugging this into the work equation we have:

$$w=-P\cdot A\cdot D$$

My question is, why is pressure negative in force?

Rather than representing it as $w = -PAD$, think of the formula as representing an area (that the gas is pressing against) moving a distance $D$. Since this a change in volume, we can set $w = -P\Delta V$
If you are putting work into the system (say pressing a piston into a cylinder containing a gas at a given pressure), the volume is becoming smaller, so $\Delta V$ is negative. The negative of the pressure times a negative $\Delta V$ is a positive value, which matches with the sign convention for putting work in. Vice versa, an expansion of a compressed volume at a given pressure will push the piston back out of the cylinder and allow the gas to do work, so $w$ is negative which follows the sign convention for work output.
You have to represent the equation in the most physics sensible way. Work is a scalar and the dot product of force and displacement gives out a scalar. In the second line $$F = -PA$$ is not the correct representation. Actually, it is
$$\vec{F} = -P\vec{A}$$