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

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!

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$$.

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.

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.

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").

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!

• Aren't you making an assumption that $f$ is a convex function? (If you don't make that assumption, then things go wrong even for a 1-argument function like $x \mapsto x^3$, which crosses its tangent line $y = 0$ at $0$.) Mar 12, 2020 at 22:03
• @RobArthan good point...hmm...I guess that kind of kills my "Long Version" but my fundamental question still applies: Why is it enough for the tangent plane to only agree in some directions for it to agree with the slope in every direction? Mar 12, 2020 at 22:37
• The crucial thing you're missing is the rigorous definition of differentiable: It's a lot more than merely existence of the partial derivatives. In particular, it tells you that the tangent vectors in the coordinate directions do in fact span (i.e., give a basis for) the entire tangent plane. Mar 12, 2020 at 22:48
• P.S. You might find my YouTube lectures somewhat helpful. See in particular 3500, lectures 22 and 23. Mar 12, 2020 at 23:05
• @TedShifrin I looked at your vids! They're awesome!!!! (Now that school is cancelled because of Coronavirus, I'm going to learn math from your playlists!!!!) What I have to say is a tad bit long to put into a comment...I appended it at the end of my question! Let me know when you see it. Thanks again! Mar 14, 2020 at 19:05

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)$$.

• Lee, thank you so much. So, if the function is differentiable at a certain point, that means that there exists a tangent plane (linear approximation) at that point, and if that tangent plane agrees with the partial derivatives in the $x$ and $y$ directions, it must also agree in all other directions (so that the limit which you mention goes to zero). However, why is it that its enough for the tangent plane to only agree in the $x$ and $y$ directions? That's what I can't see intuitively! Surely, there are many differentiable functions that have the same partial derivatives at some point, so... Mar 13, 2020 at 22:57
• ...why is it that for ALL those difeferentiable functions, the tangent plane at that point would be the same, even if the functions are different? I updated my question and added some pictures that may help get across my confusion. Thank you again, I think the limit definition you gave me is definitely helping me get closer to the answer....why does that limit ALWAYS go to zero, regardless of the direction in which $(a+s, b+t)$ is with respect to $(a,b)$ so long as the partial derivatives agree in only two directions? Mar 13, 2020 at 22:59
• Lee, thanks again! I just re-read your answer and it makes a heck of a lot more sense now! If I could accept two top answers, I would accept yours as well! Mar 14, 2020 at 20:35

If the slope of the function in any particular direction does not match the slope of the tangent plane in that same direction, then this so-called "tangent" plane was not really a tangent plane, was it?

Consider the function $$f(x,y) = \lvert x+y\rvert - \lvert x-y\rvert.$$ If you take directional derivatives in the $$x$$ or $$y$$ directions at $$(x,y) = (0,0),$$ you get zero. But if you look at the function along any other line through $$(0,0)$$ you get something proportional to $$\lvert t\rvert$$ where $$t$$ is the distance along the line. This has "right" and "left" derivatives of opposite signs at $$(0,0)$$.

In fact there is no tangent plane to this function at $$(0,0)$$ any more than there is a tangent line to $$g(x) = \lvert x\rvert$$ at $$x = 0.$$ The plot of $$f$$ consists of pieces of four planes intersecting at $$(0,0).$$ Any of those planes is equally eligible (or ineligible) to be the "tangent" plane. In fact there is no unique tangent plane at $$(0,0),$$ and the function is not differentiable there.

What it comes down to is that the thing that makes a multivariable function differentiable at a particular point is that the function has a unique "tangent plane" at that point and that no matter which direction you go from that point, the instantaneous rate of change in the function will give you a line whose slope matches the slope of the tangent plane in that direction. If anything happens to contradict this, the function simply is not differentiable at that point.

In short, the tangent plane at a point $$(x_0,y_0)$$ says exactly and completely what the directional slope of the function will be in any direction from $$(x_0,y_0)$$. All you need to do is to identify the tangent plane.

But as a reminder, all of this depends on the function being differentiable in the first place. Fortunately we have lots of ways to know that a function is differentiable without having to check its slope in every possible direction, just as we don't have to do another delta-epsilon proof on every single differentiable function we deal with in single-variable analysis.

• Thanks David! Alright, if I understand your answer, the definition of a function being differentiable at a certain point is that it has a tangent plane. Once we identify a plane that agrees with two slopes at that point, that plane MUST be the tangent plane at that point, since the two slopes uniquely identify the plane. Okay, I accept that. However, at the end you say that there are other ways to show differentiability without having to check the slope...is there a way to connect those "ways" with the tangent plane "definition" intuitively? Thanks! Mar 13, 2020 at 2:11
• You have things such as the sum of two differentiable functions is differentiable, the composition of two differentiable functions is differentiable, and so forth. Each of these has a proof. The proof may take a few more steps than just looking at a picture like the one in your diagram. For example, in the sum, we start with two surfaces and get a third surface in a completely different place. We have to prove the properties of that third surface. So I don't know if that's "intuitive" enough. Mar 13, 2020 at 2:26
• Hmm...but I can't see it even for very simple functions. In your answer, you say that we don't have to do a delta-epsilon proof in single-variable analysis. But, for example, take the function $f(x,y)=x^2$. 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$. A tangent plane at a certain point must have a slope of $2x$ in the $x$ direction and $0$ in the $y$ direction. Mar 13, 2020 at 2:39
• So tangent lines drawn on the plane in those two directions will be tangent to the surface. But, how can I intuitively see that tangent lines drawn on the plane in ANY direction will be tangent to the function at that point? Also, in my previous comment, I meant "take the function $f(x) = x^2$" the first time. Thanks again. Mar 13, 2020 at 2:42
• Wait--how do you know that $f(x) = x^2$ has only one slope at any given point? Either you looked at a graph that looks smooth, and you trust that there isn't some microscopic funny stuff going on, or you've done a delta-epsilon proof, or you know that the product of two differentiable function is differentiable, you know $x^2 = x \cdot x,$ and you know that $g(x) = x$ is differentiable. But there are really only two approaches, leap of faith or proof. Mar 13, 2020 at 2:48

I hope this could help.

If the position is $$P(x,y)=\left(\begin{array}{c}x\\y\\f(x,y)\end{array}\right)$$ then $$\partial_x=\left(\begin{array}{c}1\\0\\\frac{\partial f(x_0,y_0)}{\partial x}\end{array}\right)\qquad {\rm and}\qquad \partial_y=\left(\begin{array}{c}0\\1\\\frac{\partial f(x_0,y_0)}{\partial y}\end{array}\right)$$ are the tangent directions affine to the position $$P(x_0,y_0)$$ and then the tangent space at $$P(x_0,y_0)$$ is generated by these.

One can get a parametrization for the tangent plane by cutting the expansion (at $$(x_0,y_0)$$) of $$\left(\begin{array}{c}x\\y\\f(x,y)\end{array}\right)$$ up to the linear terms.

EDIT

If $$f(x,y)=x^2$$ you have a channel like surface with profile $$x^2$$, then the GPS for that surface is $$\left(\begin{array}{c}x\\y\\x^2\end{array}\right).$$ Now you will get for the linearization $$\left(\begin{array}{cc}1&0\\0&1\\2x_0&0\end{array}\right) \left(\begin{array}{c}x-x_0\\y-y_0\end{array}\right)+ \left(\begin{array}{c}x_0\\y_0\\x_0^2\end{array}\right) = \left(\begin{array}{c} x \\ y \\ 2x_0x-x_0^2\end{array}\right).$$ In the final expression is the parametrization of a plane, and, you can read how the 3rd component of the tangent plane at $$(x_0,y_0,x_0^2)^{\top}$$ depends only on $$x$$, and on $$x_0$$ of course.

I've been looking for an intuitive answer as you did

Unfortunately, i didn't find anything, so posting my own answer

Here what I came up to by careful analysis

Full derivative @ point $$x_0$$ is $$Df(x_0)$$ which satisfies:

$$||f(x) - f(x_0)-Df(x_0)(x-x_0)|| \le \varepsilon (x-x_0)$$

where $$x \rightarrow x_0$$

Here we don't have anything telling us neither about directions nor about orientation.

We rely only on some 'closeness' notion.

To get directions, we have to consider directional derivatives.

If we substitute $$x = x_0+te$$ to the upper formula, where $$e$$ is a unit vector, $$t \to 0$$ is a scalar, we'll get:

$$||\frac{f(x_0 + te) - f(x_0)}{t} - Df(x_0)e|| \le \varepsilon$$

$$\frac{f(x_0 + te) - f(x_0)}{t}$$ is a definition of directional derivative. So we see, that $$Df(x_0)e$$ is a directional derivative as well (it's close up to $$\varepsilon$$ to real directional derivative).

Now watch my hands.

$$Df(x_0)$$ is a linear map, by definition.

Now we're interested not in algebraic definition, but in geometric behaviour.

A linear map transforms vectors to vectors, planes to planes (roughly speaking)

So if you take any vector, say, $$e$$ and, apply a linear map to it: $$Le$$, you'll get another vector. If you apply this linear map to any of vectors in domain of L, you'll get a bunch of vectors in codomain. (same story if you take entire domain(plane in case of a function of 2 variables) and apply L to it, you'll get linearly transformed domain. (another plane, but just with different slopes).

Here we don't take the entire 'hyperplane' for L, we just take $$e$$.

In case of $$f:\mathbb R \to \mathbb R$$, we have only two unit $$e$$ vectors - left and right.(if we put a point on a line and mark two unit vectors starting at that point - we'll get one pointing from point to right, another from point to right:

---------($$e_2$$)<--($$x_0$$)-->($$e_1$$)-------

If we do transofrm those $$e_1$$ and $$e_2$$ with L, we'll get them lying on another still straight line, as vectors were straight, L is linear, so everything kept straight.

Note, we had only left and right orientation, positioned on a line in this case.(x-y plane)

Now consider a derivative of function of two variables and let's apply the same logic.

$$f:\mathbb R^2 \to \mathbb R$$ (z = f(x,y)), so we'll get 3d space. Now, we have a whole bunch of unit vectors forming a unit circle in domain of $$L$$ starting at $$x_0$$, all of them lying in a plane of $$(x,y)$$ (we may move in $$xy$$ plane around x and see how $$f$$ changes.(imagine you're a 2d guy walking in xy plane and watching to the top).

That amount of change is defined by L. So if you take a route directed by any of $$e$$'s chosen @ $$x_0$$, you'll transform that chosen $$e$$ with $$L$$, get $$Le$$, and that $$Le$$ will lay in some plane $$P'$$! as well as any of $$e$$'s you would have chosen, as they would have been transformed with $$L$$, and that transofmed "circle" of vectors would lay in the same plane $$P'$$.

That's why no matter which direction you're moving (and you're allowed to move ONLY in domain of L, it's important), the rate of change will always lay within a plane.

If a derivative exists, of course.

I have the same doubts as you. I don't know what kind of books to get the experience of its development.Intuitively, how to judge a tangent has only one intersection point with the function. Then how to judge whether the plane is also applicable. If the surface is regarded as the deformation of the tangent plane from a certain point, it can be confirmed that there is only one point in contact with the surface.In other words, there is only one intersection point between any straight line at this point on the plane and the curve in a certain direction of the surface.Can I state that my minimum acceptance is a tangent plane (a plane)?

I know that the definition of directional derivative exists in the total differential of a multivariate function, but the total differential is like a tangent plane.But the question is why the total differential can use a tangent plane to express small changes in all directions.I can't answer your doubts, I defaulted to the tangent plane as an approximation.

The total differential of a multivariate function$$dz=f_x\cdot dx+f_y\cdot dy$$,I parameterize the function$$f[x(t),y(t)]$$,Where $$\vec{u}=,|\vec{u}|=1;x(t)=x_0+t \vec{u_1},y(t)=y_0+t \vec{u_2}$$

# $$\Delta z=f_x\cdot x'(t) \Delta t+f_y\cdot y'(t) \Delta t$$$$lim_{\Delta t \to 0}=\frac{f_x\cdot x'(t) \Delta t+f_y\cdot y'(t) \Delta t}{\Delta t}=f_x\cdot x'(t) +f_y\cdot y'(t)$$ Note that $$x'(t)=\vec{u_1},y'(t)=\vec{u_2}$$

Sorry, I don’t know how to zoom in the formula. It looks crowded