The work done by an electric field \(dW\) on a test charge \(q_0\) between two points in an electric field \(\vec E\) through a displacement \(d\vec l\) is \(dW = {q_0}\vec E \cdot d\vec l \) and therefore,

\[dV = -\vec E \cdot d\vec l \tag{1} \label{1}\]

In terms of x, y and z-components of \(\vec E\) and \(d\vec l\), \(\vec E = {E_x}\hat i + {E_y}\hat j + {E_z}\vec k \) and \(d\vec l = dx\hat i + dy\hat j + dy\hat k\), and

\[\begin{align*} dV &= - ({E_x}\hat i + {E_y}\hat j + {E_z}\vec k ) \cdot (dx\hat i + dy\hat j + dy\hat k)\\ or,\quad dV &= - ({E_x}dx + {E_y}dy + {E_z}dz) \end{align*}\]

Now we use partial derivative of \(dV\) with respect to \(x\), \(y\) and \(z\) to find the corresponding component of the electric field. Here it is assumed that you know what the partial derivative is. The partial derivative of \(dV\) with respect to \(x\) is

\[{E_x} = - \frac{{\partial V}}{{dx}}\]

Similarly the y and z-components of the electric field are

\[\begin{array}{c} {E_y} = - \frac{{\partial V}}{{dy}}\\ {E_z} = - \frac{{\partial V}}{{dz}} \end{array}\]

In terms of vector notation the electric field vector in terms of its components is

\[\begin{align*} \vec E &= - \left( {\hat i\frac{{\partial V}}{{dx}} + \hat j\frac{{\partial V}}{{dy}} + \hat k\frac{{\partial V}}{{dz}}} \right) \tag{2} \label{2}\\ {\rm{or,}}\quad \vec E &= - \vec {\nabla {\kern 1pt} } V \tag{3} \label{3} \end{align*}\]

Here \(\vec {\nabla \kern 1pt} \) is the gradient operator called grad which in this case represents the gradient of electric potential \(V\). The gradient operator is \(\vec {\nabla {\kern 1pt} } = \left( {\hat i\frac{\partial }{{dx}} + \hat j\frac{\partial }{{dy}} + \hat k\frac{\partial }{{dz}}} \right)\). The quantity \(\vec \nabla V\) is called potential gradient.

It's easier to determine electric field from electric potential. The direction of electric field is in the direction of decreasing potential.

If the electric field is radial or the charge distribution has spherical symmetry which produces radial electric field, \(\vec E \cdot d\vec l = Edl\cos \alpha = Edr\) and \(dr\) is the radial displacement. And from Eq.\eqref{1},

\[E = - \frac{{dV}}{{dr}} \tag{4} \label{4}\]