# Why is the gradient perpendicular to the tangent of a plane?

Given a function $f(x,y)$, its gradient is defined to be: $\nabla f(x,y) = \frac{\partial f}{\partial x} \hat{i} + \frac{\partial f}{\partial y} \hat{j}$.

[$\hat{i}$ and $\hat{j}$ are unit vectors in the $x$ and $y$ direction]

Given this definition, the gradient vector will always be parallel to the $x$-$y$ plane.

The gradient is also supposed to be perpendicular to the tangent of a plane (its "normal" vector).

How, however, could it be perpendicular to the tangent of the plane if it is always parallel to the $x$-$y$ plane?

• Let $S$ be a surface given by the equation $f(x,y,z) = k$ where $k$ is a constant. Let $(x_0, y_0, z_0)$ be a point on the surface. Then the tangent plane to the surface $S$ at the point $(x_0, y_0, z_0)$ (is it exists) has $$\nabla f(x_0, y_0, z_0)$$ as a normal vector. – Thomas Nov 19 '15 at 13:24

The gradient is also supposed to be perpendicular to the tangent of a plane (its "normal" vector).

This isn't true. The gradient vector is perpendicular to the curve $f(x,y)=0$, not perpendicular to the plane containing the curve.

• Thanks, but it says on wikipedia that: "The components of the gradient in coordinates are the coefficients of the variables in the equation of the tangent space to the graph". If its components are the coefficients of the tangent line, then it's supposed to be it's normal. Where am I wrong? thanks :) – Cheshie Nov 19 '15 at 13:05
• In 2D, the "tangent space of the graph" is a tangent line. The gradient vector is normal to this line (and lies in the plane of the curve). Where does wikipedia say anything about the gradient vector being normal to the plane of the curve? – bubba Nov 19 '15 at 13:13
• OK then I'll change the question: how could the gradient vector be normal (i.e, perpendicular) to the tangent line you mentioned, if the gradient has to be parallel to the x axis? – Cheshie Nov 19 '15 at 13:37
• The gradient doesn't have to be parallel to the $x$-axis. What gave you that impression? – bubba Nov 19 '15 at 13:47
• Because: \nabla f(x) = \partial f / \partial x \hat{i}, i.e., it only moves in the x-axis direction, i.e. it is parallel to the x-axis. Am I wrong? – Cheshie Nov 19 '15 at 14:09

The gradient $\nabla_{x_0,y_0} f$ of a function $f(x,y)$ at $x_0,y_0$ is perpendicular to the tangent of the level-set $f(x,y)=0$ of the function at $x_0,y_0$.

That is, it is perpendicular to the curve defined by the set of points $\{(x,y) | f(x,y)=0, |x-x_0|^2+|y-y_0|^2 < \delta \}$, that is the curve in an arbitrarily small disc of radius $\delta$ around $x_0,y_0$, which satisfy $f(x,y)=0$.

For a rigourous proof of this, you'll need to refer to the implicit function theorem.

However, intuitively it is easy simple to see. Let's assume at small displacment point $x+\delta x,y +\delta y$ close to $x_0,y_0$ satisfies $f(x+\delta x,y +\delta y)=0$. Therefore, using Taylor expansion:

$$f(x+\delta x, y +\delta y) = f(x_0,y_0) + \frac{\partial f(x_0,y_0)}{\partial x} \delta x + \frac{\partial f(x_0,y_0)}{\partial y} \delta y + O(\delta^2) = f(x_0,y_0)$$

Therefore, as $\delta \rightarrow 0$, the displacement vector $(\delta_x, \delta_y)/\delta$ becomes a tangent vector, the $O(\delta^2)$ goes to zero and by the equality of the left and right side $(\delta_x, \delta_y)/\delta$ is orthogonal to the gradient.

• "Tangent plane" should be "tangent line". – Hans Lundmark Nov 19 '15 at 13:33

I think you are looking for this vector $(f_{x},f_{y},-1)$, this is normal to the "graph".

See;