Clarification for textbook diagram on electric potential energy and work From the textbook I'm reading about the potential energy and work on a positive vs negative charged particle in a uniform E field, for the diagram (b) on the positive charged particle moving from a to b against the E field, since the work is the negative of the change in potential energy which is -qE(b-a), which based on the diagram would give a negative number (so work is negative) since b>a. But for the diagram (a) negative charge moving from a to b, I know work must be negative as well since the negative charge is moving towards the negative plate, but if I calculate the work with -qE(b-a) in this case I would get a positive number since b<a based on the diagram. I photoshopped diagram a (third image) below so that it would make sense to me so now -qE(b-a) would be a negative number. My main question is, is there something wrong with my interpretation? I feel like it's unlikely that the book is wrong and there is just something I'm not understanding.



 A: For the top two digrams assume that $\hat y$ points upwards, $\vec E = E\,\hat y$ so $\vec F = q_0\,\vec E = -q_0\, E\, \hat y$ and the displacement from $a$ to $b$ is $\Delta \vec y = \vec y_{\rm b} - \vec y_{\rm a}= (y_{\rm b} -y_{\rm a})\,\hat y$.
The work done by electric field in moving a charge $q_0$ from $a$ to $b$ is  $\vec F \cdot \Delta \vec y = -q_0\,E\,\Delta y = -q_0\,E\,(y_{\rm b}-y_{\rm a})$
The differences between the two diagrams are the sign of $q_0$ and the relative sizes of $y_{\rm a}$ and $y_{\rm b}$.
Diagram (a)
$q_0$ is positive and $y_{\rm b}>y_{\rm a}$, so the work done is
$\,\,-\,\times \;\,q_0 \,\times\: \:E\;\times \:(y_{\rm b}-y_{\rm a})$ and looking at the signs
$[-]\times \,[+]\times [+] \,\times \quad\:[+] \quad\:\Rightarrow [\bf\color{red}-]$ results in a negative quantity for the work done.
Diagram (b)
$q_0$ is negative and $y_{\rm b}<y_{\rm a}$, so the work done is
$\,\,-\,\times \;\,q_0 \,\times\: \:E\;\times \:(y_{\rm b}-y_{\rm a})$ and looking at the signs
$[-]\times \,[-]\times [+] \,\times \quad\:[-] \quad\:\Rightarrow [\bf\color{red}-]$ again results in a negative quantity for the work done.
