dotting gradient in spherical coordinates with displacement vector

The gradient in spherical coordinates is given by:

$\nabla f = \left(\frac{\partial f}{\partial r}, \frac{1}{r} \frac{\partial f}{\partial \theta}, \frac{1}{r \sin \theta} \frac{\partial f}{\partial \phi} \right)$

on the other hand the gradient is supposed to give us:

$\nabla f \cdot d\vec r = df$

where $d\vec r$ is the displacement vector

if I write $\left(\frac{\partial f}{\partial r}, \frac{1}{r} \frac{\partial f}{\partial \theta}, \frac{1}{r \sin \theta} \frac{\partial f}{\partial \phi} \right) \cdot (dr,d\theta,d\phi)$

it will be wrong because:

$df = \frac{\partial f}{\partial r}dr + \frac{\partial f}{\partial \theta}d\theta + \frac{\partial f}{\partial \phi} d\phi$

I realize my displacement vector is wrong and is not $(dr,d\theta,d\phi)$, but on the other hand isn't the displacement vector by definition just composed of the small changes in each coordinate?

• The metric in spherical coordinates is $dr^2 + r^2d\theta^2 + (r\sin{\theta})^2d\phi^2$. – Neal Jun 26 '12 at 17:17

$$\left(\frac{\partial f}{\partial r}, \frac{1}{r} \frac{\partial f}{\partial \theta}, \frac{1}{r \sin \theta} \frac{\partial f}{\partial \phi} \right) \cdot (dr, r d\theta , r \sin \theta d\phi ) = \frac{\partial f}{\partial r} dr + \frac{\partial f}{\partial \theta} d \theta + \frac{\partial f}{\partial \phi} d \phi = d f$$