The electric field is fundamentally connected to a line integral.
To evaluate this, a path that connects point A to point B is chosen, and whether the electric field lies in the direction of the path or at some angle is determined.
The dot product of the electric field and the path is calculated based on the angle between them, and all these contributions are added up into one large quantity, which turns into an integral.
Special Cases for Line Integral
For a small distance, the electric field can be assumed to be constant, and the change in potential is equal to the component of the field in the direction of the path times the distance moved.
If the path is always tangent to the field, the dot product of the electric field and the path reduces to the magnitude times the distance, and the line integral turns into an ordinary integral.
If the path is perpendicular to the field, the dot product is zero, and the change in potential is zero.
Calculating Change in Potential
The formula for calculating the change in potential if the electric field is known involves integrating the field to get to the potential.
If we want to go from potential to field, a derivative is taken, and the field can be written as a derivative of the potential.
The electric field in the direction of s is equal to the change in potential as we move in that direction, which tells us the electric field component in that direction.