If I have an equation $f(x,y)$ which given the $x$ and $y$ coordinate, it gives you the $z$ coordinate. How can I find the normal (directional) vector of the the point $(x,y,f(x,y))$? This would be the directional vector perpendicular to the tangent plane that touches the surface of the 3d function at that point.
Thanks.
The tangent plane at $(x_0,y_0)$ has equation \begin{align} z &= f(x_0,y_0) + \frac{\partial f}{\partial x}(x_0,y_0)(x-x_0) + \frac{\partial f}{\partial y}(x_0,y_0)(y-y_0) \\ &= f(x_0,y_0) + m_1(x-x_0) + m_2(y-y_0) \\ \end{align} thus two vectors on the plane are $v_1 = (1,y_0,f(x_0,y_0) + m_1(1-x_0))$ and $v_2 = (x_0,1,f(x_0,y_0) + m_2(1-y_0))$ then let $n = v_1 \times v_2$ be the normal you are looking for.