What does slope of a line mean in 3 dimensional figures? In 2D geometry where $y=f(x)$ then $f'(a)$ means slope of the tangent line at ($a$, $f(a)$). It means the angle made with the positive $X$ axis
Now extending to 3D geometry let's say $z$=$f(x, y)$ so ∂z/∂x at let's say ($A$, $B$, $C$) gives us the slope of the tangent line at that point. But what's the definition of slope here? Is it the angle made with the positive $X$ axis or $Z$ axis or something totally different altogether?
 A: For a two dimensional surface, you can define the directional derivative.
First, let me give you an intuitive idea of what that is.
Suppose you are standing on a horizontal surface. Your feet make a right angle with your legs. The slope of your feet is $0$.
Now suppose you are standing on a curved surface, such as the side of a hill. Depending upon which compass direction you are facing, your feet may have positive slope (toes up) or negative slope (toes down) or $0$ slope.
That is what is meant by a directional derivative at a point on a surface. The direction is given by a two dimensional vector rather than a compass heading. The partial derivatives of the surface function
$$ \frac{\partial}{\partial x}f(x,y),\quad\frac{\partial }{\partial y}f(x,y)$$
are the components of the gradient vector
$$\nabla f(x,y)=\left(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y}\right)$$
and the directional derivative in the direction of the unit vector $\mathbf{u}$ is given by the formula
$$ D_\mathbf{u}f=\nabla f\cdot \mathbf{u} $$
As an example, consider $f(x,y)=x^2y-x$ and we wish to find the directional derivative at the point $(2,1)$ when facing in the direction of the unit vector $\mathbf{u}=\left(\frac{1}{2},\frac{\sqrt{3}}{2}\right)$
$$\nabla f(2,1)=\left(2xy-1,x^2\right){\huge\vert}_{(2,1)}=(3,4)$$
So the directional derivative in the direction $\mathbf{u}$ is
$$ D_\mathbf{u}f(2,1)=(3,4)\cdot\left(\frac{1}{2},\frac{\sqrt{3}}{2}\right)=\frac{3+4\sqrt{3}}{2}  $$
