[Math] Why is it enough for a Tangent Plane to only agree with the slope of an $m$-input function in $m$ directions

calculusdifferential-geometrygeometrymultivariable-calculusvector analysis

Thanks for reading.

Short Version

Why is it enough for the tangent plane to only agree with the slope of a differentiable 2-input function in the $x$ and $y$ directions at a certain point for it to agree in every direction at that point?

Isn’t it still possible for the function to cross the tangent plane, even if their slopes agree in the $x$ an $y$ directions, when we move in some other direction?


Long Version

Say we have some two-input differentiable function $f(x,y)$ defining some surface in 3D space. The input into the function is $(x,y)$ coordinates, and the output of the function is the height of the surface (or hill) at each input point.

Consider some point $(x_0,y_0)$ on this surface. At this point, the surface will have an infinite number of slopes, since there are an infinite number of directions we can move in. However, for two of those directions, the slopes are easy to find:

The slope is $\frac{\partial f}{\partial x}$ in the $x$ direction.

The slope is $\frac{\partial f}{\partial y}$ in the $y$ direction.

For a plane to be tangent to a function at $(x_0,y_0)$, it means it only touches the surface at that point, and doesn't cross the surface anywhere.

When we find a tangent plane to the surface at $(x_0,y_0)$, its enough to make the slope of the plane agree with the slope of the surface in 2 directions. Usually the $x$ and $y$ directions.

I'm aware that two slopes, one in the $x$ and one in the $y$, uniquely define a single plane at that point.

However, there are an infinite number of functions that may have those slopes at that point.

Tangency implies that the slope of the tangent plane agrees with the slope of the function at that point in every direction, not just the $x$ and $y$ directions.

If it didn't agree with the slope of the function at that point in some arbitrary direction, then were we to draw lines in that direction on both the "tangent" (not actually tangent) plane and the function, those lines would intersect, and thus the plane wouldn't be brushing the surface at only a single point, and it wouldn't be a tangent plane.

Why is it enough for the tangent plane to only agree with the slope of a differentiable 2-input function in the $x$ and $y$ directions at a certain point for it to agree in every direction at that point?

Isn’t it still possible for the function to cross the tangent plane, even if their slopes agree in the $x$ an $y$ directions, when we move in some other direction?

I'd like to be able to see the answer intuitively…but I can't, and I need help.

Thank you!

enter image description here


Edit:

I added this as a comment to David's answer below, but I'll add it as part of the question too, as I think it may help communicate what I'm trying to "see".

Take the function $f(x)=x^2$. That's a parabola in 2D space.

If a tangent line agrees with the slope $2x$ at a certain point…well, there's only one slope to agree with, so I KNOW that the line will be tangent.

But, now take the surface $f(x,y)=x^2$. That's a surface in 3D space.

A tangent plane at a certain point must have a slope of $2x$ in the $x$ direction and $0$ in the $y$ direction

Lines drawn on a certain "tangent" plane in those two directions will be tangent to the surface at that point, since the slopes agree in those two directions. We used those directions (the $x$ and $y$ directions) to define the plane.

But, how can I intuitively "see" that lines drawn on the plane in ANY direction will be tangent to the function at that point?


Edit 2

As someone pointed out in the comments, a tangent line doesn't not crossing the function only applies if the function is convex (or concave) like $x^2$. Here, let me draw out the function, and draw a tangent line to $f(x)=x^2$.

enter image description here

The tangent line (blue) agrees with the slope of the function (red) in the one direction it has to agree with the slope in (the $x$ direction).

Therefor, I know that the tangent line won't cross the parabola. If it didn't agree with the slope, then it would cross it either when we moved a little bit towards the right from the point of tangency, or a little bit towards the left.

However, lets say we draw a tangent plane the graph of $f(x,y)=x^2$, with a tangent plane drawn to it.

enter image description here

Although I know lines on the plane won't cross the surface when moving in the $x$ direction or in the $y$ direction (the two white tangent lines won't cross the $x^2$ surface) since the plane agrees with the slope of the surface in those two directions, how can I know that if I draw lines on the plane in some other arbitrary direction, those lines also won't cross the surface?

Why was the slope agreeing in the $x$ and $y$ directions enough to define the tangent plane?

Thanks!


Final Thoughts:

After watching some of Ted's (in the comments) lectures on YouTube, I've realized that when I asked this question, although I had an intuitive "feel" for differentiability in one dimension, I hadn't really thought enough about what it meant in higher dimensions.

Differentiability (for a two dimensional surface) means that the function is locally flat.

Say that $T(x ⃗ )$ is the tangent plane to a function $f(x ⃗ )$ at a point $a ⃗$.

Therefor, it must agree with the slopes of $f(x ⃗ )$ in every direction at $a ⃗$, not just the $m$ Cartesian directions, for which we have the partial derivatives of $f(x ⃗ )$.

However, when we define $T(x ⃗ )$, we only make it agree with the slopes of $f(x ⃗ )$ in the $m$ Cartesian directions.

$$T(x ⃗ )=\frac{∂f}{∂x_0} (x_0-a_0 )+\frac{∂f}{∂x_1}(x_1-a_1 )+⋯+\frac{∂f}{∂x_m}(x_m-a_m )$$

(Each of the $x_i$'s are orthogonal Cartesian coordinates, they're the components of the input vector $\vec{x}$, and each of the partial derivatives above are evaluated at $\vec{a}$).

This is because given the $m$ partial derivatives of $f$ at $\vec{a}$, there’s only one unique hyper-plane approximation for $f(x ⃗ )$ which can be defined!!

That is, the $m$ partial derivatives of $f(x ⃗ )$ at $a ⃗$ define a unique hyper-plane. There is no other hyper-plane that has $m$ slopes and passes through $(\vec{a}, f(\vec{a}))$ in $(m+1)$ dimensional space ($m+1$ because we're adding one more dimension for the function's output itself).

My original question was why this implied that the tangent plane agreed with the slopes in every direction.

The answer?

It doesn't!

It's entirely possible for this "tangent" (in quotations because in this case, it's not actually tangent) to agree with the slopes in the $m$ Cartesian directions, but not in every direction (Ted has some good examples in the lectures referenced in the comments, and here's a picture from "Math-Insight").

enter image description here

However, if that unique “tangent” plane doesn’t agree with the function’s slopes in every direction (not only the Cartesian directions) that just means that the function isn’t differentiable at $a ⃗$!!! In other words, at $\vec{a}$ the function isn't locally flat.

To prove that a function is differentiable at $\vec{a}$, we attempt to build a "tangent" plane at that point by making it agree with the slope of our function in the $m$ Cartesian directions, and then show that the "tangent plane" indeed is a tangent-plane by showing that…

$$\mathrm{lim_{(|dx ⃗ |→0)}}(\frac{⁡[(f(a ⃗+dx ⃗ )-f(a ⃗ )]-[T(a ⃗+dx ⃗ )-T(a ⃗ )])}{|dx ⃗ |})=0$$

…regardless of the direction in which we move from $\vec{a}$ (regardless of the direction of $\vec{dx}$).

In his videos, Ted shows an example of this (with the difference that in his example, $T(\vec{x})$ is not a tangent plane but a linear approximation passing through the origin, although the idea is the same.)


In a nutshell, to answer my original question, if the function is differentiable, then it’s enough for the tangent plane to agree with the slope of the function in the $m$ Cartesian directions for it to agree in every direction, because $m$ slopes define a unique tangent-plane in $m+1$ dimensional space, and that the tangent plane agrees with the slopes of the function in every direction is just the definition of differentiability – that the function is locally flat.

And to show that a function indeed is differentiable, we have to show that a potential unique "tangent" (in quotes because it may not be a tangent plane if the function isn't differentiable) plane to the function at a certain point that agrees with the slope of the function in the $m$ Cartesian directions agrees with the slope of the function in every direction, so that the function indeed is locally flat.

Thank you!

Best Answer

The short answer is that the very meaning of the tangent plane implies that the slope in every direction agrees with the slope of the tangent plane.

For a longer answer, there are a few things to say.

First, there certainly do exist functions so that the slopes in different directions do not all agree with the slope of any plane; an example in polar coordinates is $$f(r,\theta) = r \cos(3\theta) $$ Using the identity $$\cos(3\theta) = \cos^3(\theta) - 3 \cos(\theta) \sin^2(\theta) $$ this converts into $x,y$ coordinates as $$f(x,y) = \frac{x^3 - 3xy^2}{x^2+y^2} $$ This function extends continuously to $(0,0)$ using $f(0,0)=0$. And it has directional derivatives in every direction. But it has no tangent plane at $(0,0)$, precisely because the slopes in the different directions do not agree with the slopes of any single plane through $(0,0)$. To see why, notice that the slope in the $\theta$ direction is equal to $\cos(3\theta)$, and as $\theta$ rotates around in a circle this slope has three maximum values of $1$, which is not possible for a plane.

Second, one might well wonder what is the meaning of the tangent plane. A good answer to this requires the following standard definition of multivariable calculus:

Definition: To say that $f(x,y)$ is differentiable at a point $(a,b)$ means that there exists a linear function $L : \mathbb R^2 \to \mathbb R$ such that $$\lim_{\langle s,t\rangle \to 0} \frac{f(a+s,b+t) - f(a,b) - L\langle s,t\rangle}{|\langle s,t\rangle|} = 0 $$ where the denominator is just the vector norm $|\langle s,t\rangle|=\sqrt{s^2+t^2}$.

Assuming that $f(x,y)$ is indeed differentiable at $(a,b)$, it is a theorem of calculus, which you should be able to find in any calculus book, that for any unit vector $\vec u = \langle s,t \rangle$, the directional derivative of $f$ in the direction $\vec u$ is equal to the value $L\langle s,t \rangle$. From this, one can define the tangent plane to be the graph of the function $z = f(a,b) + L\langle x,y\rangle$, and then it is a theorem that the slope of the graph of $f$ in any direction is equal to the slope of the tangent plane in that direction.

Furthermore, if you write the formula for the linear function $L$ in standard form like this: $$L\langle x,y\rangle = cx + dy $$ then it is a theorem that $c = \frac{\partial f}{\partial x}(a,b)$ and $d = \frac{\partial f}{\partial y}(a,b)$. From this you get the usual formula for the directional derivative at $(a,b)$, in the direction of a unit vector $\vec u = \langle s,t \rangle$, namely $$\frac{\partial f}{\partial\vec u} = L\langle s,t\rangle = s \frac{\partial f}{\partial x} + t \frac{\partial f}{\partial y} $$ That number is the slope --- both of the graph and of the tangent plane --- in the direction $\vec u$.

And to return to the example $f(r,\theta) = r \cos(3\theta)$, what goes wrong with this function is simply that it is not differentiable at $(0,0)$.

Related Question