In my textbook, the gravitational field is given by$$\mathbf{g}\left(\mathbf{r}\right)=-G\frac{M}{\left|\mathbf{r}\right|^{2}}e_{r}$$ which is a vector field. On the same page, it is also given as a three dimensional gradient$$\mathbf{g}=-\mathbf{\nabla\phi}=-\left(\frac{\partial\phi}{\partial x},\frac{\partial\phi}{\partial y},\frac{\partial\phi}{\partial z}\right)$$ As this second equation is also a vector field, why doesn't it contain a basis vector of some sort and why isn't $\mathbf{g}$ given as a function of something or other?
Also, how do you actually get from the gravitational potential field $$\phi=\frac{-Gm}{r}$$
to the second equation? I can see that you apply the operator $\nabla$ but how does that give you $\mathbf{g}$?
Thank you