# Positive and Negative works [duplicate]

When we displace a body from ground to a height we do positive work against gravity and gravity too does work but negative. Do they cancel each other? Or does the external force do extra work?

Since the body is at rest at the beginning and at the end of the motion, the total change in kinetic energy is zero. This means that the total work done on the body is zero, which means that the work done by the lifting force and gravity canceled each other out. In other words, $$\Delta K = W$$ or the change in kinetic energy of a body is equal to the work done on it.
Now, sometimes it is useful to separate work done by conservative forces (like gravity) and non-conservative forces, so \begin{align} \Delta K &= W_{cons} + W_{non-cons} \\ &= F_{cons}\Delta x + W_{non-cons} \\ &= -\Delta U + W_{non-cons} \end{align} where the subscript $cons$ means conservative and $non-cons$ means non-conservative, with $F_{cons}$ referring to the sum of all conservative forces. These forces act through a distance $\Delta x$. The symbol $\Delta U$ refers to a change in potential energy, which is equal to the negative of the work done by a conservative force. If we define the total mechanical energy of a body as the sum of kinetic and potential energy $$E = K + U$$ then we can write $$\Delta E = \Delta K + \Delta U = W_{non-cons}$$ So, the total change in mechanical energy of a body is equal to the work done by non-conservative forces. If all of the forces on a body are conservative, then total mechanical energy is conserved.