## Relating Electric Potential to Electric Field

At this point you may have noticed some similarities between electric field and electric potential:

- They use the same constant
- They both relate to the amount of charge you have
- They both get smaller when you increase the distance from the charge
- Neither describes an interaction (both are only based on a single charge)

However, there are differences between these quantities:

- Electric field is a vector and electric potential is a scalar
- Electric field relates to force and electric potential relates to energy
- Electric field depends on $\frac{1}{r^2}$ and electric potential depends on $\frac{1}{r}$

So while these are two distinct quantities, it makes sense for them to be related somehow. This page of notes goes into more detail about how you can get the electric field from electric potential and vice versa.

### Getting Electric Field from Electric Potential

When you look at the equations side-by-side, you see that electric field and electric potential appear to be different by a factor of r; however, it is not quite as simple as multiplying/dividing by r, especially since we need to be able to turn a vector quantity into a scalar quantity and vice versa. $$V=\frac{1}{4\pi\epsilon_0}\frac{q}{r}$$ $$\vec{E}=\frac{1}{4\pi\epsilon_0}\frac{q}{r^2} \hat{r}$$

If you know what the electric potential is in terms of r, you can calculate the electric field by taking the negative derivative of potential with respect to r, which will give you the electric field in the $\hat{r}$ direction. * This assumes that your electric potential equation does not depend on an angle*. (If your electric potential does depend on an angle, then you have to use the gradient.)
$$\vec{E}=-\frac{dV}{dr}\hat{r}$$

If you know the electric potential in terms of x,y, and z variables, you can calculate the electric field by taking the negative derivative with respect to each direction (this is the gradient in cartesian coordinates). $$\vec{E}=-\frac{dV}{dx}\hat{x}-\frac{dV}{dy}\hat{y}-\frac{dV}{dz}\hat{z}=-\left\langle \frac{dV}{dx},\frac{dV}{dy},\frac{dV}{dz} \right\rangle$$

### Getting Electric Potential from Electric Field

If instead you start with the electric field and want to get the electric potential, we do the inverse operation: take the negative integral over a path. By integrating over a path (which has direction), we can use a dot product between the electric field and a small position vector to get the scalar voltage. If you use an indefinite integral, you have to add a constant to the integral (which you can solve for if you know the voltage a certain point - usually you set the voltage to be zero at infinity) $$V=-\int \vec{E}\bullet d\vec{r} + C$$ or if you take a definite integral, than you are really finding a change in voltage from some initial location to some final location: $$\Delta V=V_f-V_i=-\int_{r_i}^{r_f} \vec{E}\bullet d\vec{r}$$ This relationship between field and potential is very similar to the relationship between force and potential energy (for good reason, as we will talk about next week).