We did in lectures gradient of a scalar field and I am wondering how is the grad of a vector field. I tried the following Let
$$V = f(x,y,z)\hat{\imath} + g(x,y,z)\hat{\jmath} + h(x,y,z)\hat{k} \, .$$
Then by definition
$$\mathrm{grad}(V)= \hat{\imath} V_x + \hat{\jmath}V_y + \hat{k}V_z \, ,$$
where $V_x$, $V_y$, $V_z$ denote the partial derivatives of $V$ with respect to to $(x,y,z)$. But $i V_x = f(x,y,z)x$ since $\hat{\imath}\cdot\hat{\imath}=1$, $\hat{\imath}\cdot\hat{\jmath}=0$, and $\hat{\imath}\cdot\hat{k}=0$.
Similarly, $\hat{\jmath}V_y = g(x,y,z)y$ and $\hat{k}V_z=h(x,y,z)$. So we end up with
$$\mathrm{grad}(V) = f(x,y,z)x + g(x,y,z)y + h(x,y,z)z = \mathrm{div}(V) \, .$$
I guess that is wrong but what is wrong with the method.