When I calculate the gradient of a two dimension function like $ r=\frac{1}{\sqrt{x^2+y^2}}$ with the syntax of

`h[x_,y_]:=Grad[1/r,{x,y}] `

and when I checked the result with

`h[x,y][[1]] h[x,y][[2]] `

I got a right result of $ -\frac{x}{(\sqrt{x^2+y^2})^{-3/2}}$ and $ -\frac{y}{(\sqrt{x^2+y^2})^{-3/2}}$ , respectively.

However, when I tried to plot the function with syntax of

`VectorPlot[{h[x,y][[1]],h[x,y][[2]]},{x,0.1,0.3},{y,-0.3,0.3}] `

I found the value in y direction is 0, and I also confirmed with

`Plot3D[h[x,y][[1]],{x,-0.3,0.3},{y,-0.3,0.3}] Plot3D[h[x,y][[2]],{x,-0.3,0.3},{y,-0.3,0.3}] `

and the results are that the first one has a proper plot while the second one shows the function value is 0.

Would anyone give me some clue that how this happened? Thank you and best regards!