Sorry for the ugly picture but it makes my question more understandable. The $\Delta V$ from $A$ to $B$ is calculated by$$\int_A^B E \, \mathrm{d}r$$ where $r$ is the distance between $A$ and $B$. The curve line is the real path the charge take going from $A$ to $B$. Suppose that the green arrow is the $\vec E$ and the red arrow is $dl$ at some arbitrary point on the path the charge move. From what I learned from class $$\int_A^B E \, \mathrm{d}r = \int_A^B E \, \mathrm{d}l$$ This is the point I don't understand and make me reconsider what I learn about work in physics. Can someone explain why $\int_A^B E \, \mathrm{d}r = \int_A^B E \, \mathrm{d}l$
Does the calculation of the work involve vector and $E\, \mathrm{d}l$ here is the dot product of $\vec E$ and $\vec {\mathrm{d}l}$ or it is calculated by projecting all the force exert to the object to the axis created by start point and end point?