Voltage from Electric Field

The change in voltage is defined as the work done per unit charge, so it can be in general calculated from the electric field by calculating the work done against the electric field. The work per unit charge done by the electric field along an infinitesmal path length ds is given by the scalar product

Then the work done against the field per unit charge in moving from A to B is given by the line integral: