Work is a dot produce of Force * distance.
W = F. S = FSCos(theta)
Only the component of a force in the direction of the movement of its point of application does work.
When object A transfers energy to object B, we say that A does positive work on B. B is said to do negative work on A. In other words, a machine like a tractor is defined as doing positive work. This use of the plus and minus signs relates in a logical and consistent way to their use in indicating the directions of force and motion in one dimension.
Negative work is said to be done when the force direction and direction of movement is opposite. because in that case, angle (theta) = 180 degree and Cos (180) = -1
So , W = F S Cos(theta)
W = F S Cos(180)
W = -F S