Partial derivative not parallel to $x$ or $y$ axis In attached example I want to find slope along $x=y$ direction. I know how to find partial derivatives when we are parallel to $x$ axis (keep $y$ constant and take partial derivative with respect to $x$) or $y$ axis, but I don't know how to get find slope/derivative when we are not parallel to any of those axis.
My thinking is that to find the slope along $x=y$ direction, in curves' equation we can replace $x$ with $y$ and then take a derivative with respect to $x$. Is that correct?
 A: I'm assuming we're talking about a situation where we have some function $z = f(x,y)$, which describes a surface as a function of $x$ and $y$. Let's focus our attention on some specific point $\mathbf{P} = (a,b)$. If you know $f_x = \partial f / \partial x$ and $f_y = \partial f / \partial y$ at $\mathbf{P}$, then you can construct two vectors $\mathbf{v}_x = (1,0, f_x)$ and $\mathbf{v}_y = (0, 1, f_y)$ that lie in the tangent plane $\pi_1$ at $\mathbf{P}$. The normal vector of $\pi_1$ is $\mathbf{n}_1 = \mathbf{v}_x \times \mathbf{v}_y = (-f_x, -f_y, 1)$.
The slopes/derivatives that you're interested in can be described by tangent lines lying in the tangent plane $\pi_1$ that are obtaining by slicing $\pi_1$ with vertical planes having various orientations. For example, slicing with the vertical plane $x=a$ will give us back the partial derivative $f_x$.
Specifically, suppose we are given a vector $\mathbf{u} = (u_x, u_y,0)$ lying in the $xy$-plane, and we want to know about the slope of the surface in the direction of $\mathbf{u}$. We can construct a vertical plane $\pi_2$ containing the point $\mathbf{P}$ and the vector $\mathbf{u}$ and use it to "slice" the surface. But, we don't really need to slice the surface itself, we only need to slice its tangent plane $\pi_1$. This will give us a tangent line that defines the "slope" of the surface in the direction $\mathbf{u}$. The normal of $\pi_2$ is in the direction $\mathbf{n}_2 = (-d_y, d_x, 0)$, so the direction of the tangent line is $\mathbf{n}_1 \times \mathbf{n}_2 = (u_x, u_y, u_x f_x + u_y f_y)$.
In your case $\mathbf{u} = (1,1,0)$, and the vertical plane $\pi_2$ is the plane $x=y$. The intersection of the surface tangent plane and the plane $\pi_2$ is a line in the direction of $(u_x, u_y, u_x f_x + u_y f_y) = (1,1,f_x + f_y)$.
If we take $\mathbf{u} = (1,0,0)$, then the tangent line direction is $(1,0,f_x)$, which is exactly what we would expect, because the tangent line in this direction corresponds to the partial derivative $f_x$.
I think that all of this is consistent with the answer given by copper.hat. My answer is just more geometric (and more long-winded) :-)
A: Generally to find the slope in a particular direction, consider the function $\phi(t) = f(x+t d$). Then $\phi'(0) = \frac{\partial f(x)}{\partial x} d$.
In terms of coordinates, $\phi'(0) = \sum_{i=1}^n \frac{\partial f(x)}{\partial x_i} d_i$.
In your example, $d = (1,1)^T$.
Depending on your application, you may want to scale $d$ to have unit norm.
A: In general $$\frac{\partial u}{\partial\textbf{l}}=\nabla u\cdot\textbf{l}$$ is the expression for derivative along $\textbf{l}$, if $\|\textbf l\|=1$
