# For a function f(x,y) = z does the gradient of some given some point x, y lie on the x, y plane?

I am comparing the gradient to directional derivative and would like to know if the gradient in this two dimensional model lies on the x , y plane only or on and infinite number of parallel horizontal planes over the x, y plane.

Maybe I better use and example ...lets's use z = f( x, y ) = x^2 + y^2.

Yes of course, the gradient is a vector which lies in the $x-y$ plane that is for your example

$$\nabla f=(f_x,f_y)=(2x,2y)$$

Note that it represents geometrically the direction with maximum slope of the graph $z=f(x,y)$ and the maximum slope is given by the norm i.e."lenght of the gradient" vector.