This post is from the summer when the innovation lab is not open so the 3d object is a cucumber from my garden rather than a 3d printed object!
There are many reasons we might be interested in the tangent line to a graph. One of them is to find critical points of that graph. Critical points are points where the tangent line is vertical or horizontal and these are points where we can find local (or global) maximum and minimum values. A tangent line is horizontal if the derivative is zero and it is vertical if the derivative is not defined. (There are other options too!)
These same kind of ideas apply to functions of 2 variables (or more) but now we have tangent planes rather than tangent lines. If \(f(x,y)\) is a function of two variables then $$f_x(a,b)=\lim_{h\to 0}\frac{f(a+h,b)-f(a,b)}{h}$$ is the partial derivative of \(f\) with respect to \(x\). The partial derivative of \(f\) with respect to \(y\) is just a little different $$f_y(a,b)=\lim_{h\to 0}\frac{f(a,b+h)-f(a,b)}{h}$$
To find the equation for the tangent plane remember that the equation for a plane is $$A(x−x_0)+B(y−y_0)+C(z−z_0)=0.$$ We know that the point \((a,b,f(a,b))\) is on the tangent plane so our plane has the form $$A(x−a)+B(y−b)+C(z−f(a,b))=0$$ or $$z=f(a,b)-\frac{A}{C}(x-a)-\frac{B}{C}(y-b).$$ When \(y=b\) the tangent plane should look like the tangent line and so \(\frac{A}{C}=f_x(a,b)\). Similarly, when \(x=a\) the tangent plane should look like the tangent line and so \(\frac{A}{C}=f_y(a,b).\) Then the equation of the tangent plane is $$z=f(a,b)-f_x(a,b)(x-a)-f_y(a,b)(y-b)$$ and one of the places we look for critical points of \(f(x,y)\) is points where the plane is horizontal.
It would be harder to do this for the function $$z=4-2(x^2-y^2),$$ since the critical point at \((0,0,4)\) is not a local maximum or a local minimum. So I was very happy to have an example where I could clearly see the tangent plane.
So the tangent plane for this function \(f(x,)\) is horizontal when \(-4a=0\) and \(-4b=0\). This happens when both \(a\) and \(b\) are zero. Since the function is decreasing as we move away from the point \(0,0\) this is a global maximum. (An this agrees with our experience of cucumbers.)
The main ideas
For functions of a single variable the tangent line is the line that is the "closest linear approximation" to the function. For a function \(f(x)\) the tangent to the function at the point \(a,f(a)\) is the line through that point with slope \(f'(a)\). So if we use point slope form the tangent line has the equation $$(y-f(a))=f'(a)(x-a)$$ or in standard form $$y=f'(a)x+(f(a)-f'(a)a).$$There are many reasons we might be interested in the tangent line to a graph. One of them is to find critical points of that graph. Critical points are points where the tangent line is vertical or horizontal and these are points where we can find local (or global) maximum and minimum values. A tangent line is horizontal if the derivative is zero and it is vertical if the derivative is not defined. (There are other options too!)
These same kind of ideas apply to functions of 2 variables (or more) but now we have tangent planes rather than tangent lines. If \(f(x,y)\) is a function of two variables then $$f_x(a,b)=\lim_{h\to 0}\frac{f(a+h,b)-f(a,b)}{h}$$ is the partial derivative of \(f\) with respect to \(x\). The partial derivative of \(f\) with respect to \(y\) is just a little different $$f_y(a,b)=\lim_{h\to 0}\frac{f(a,b+h)-f(a,b)}{h}$$
To find the equation for the tangent plane remember that the equation for a plane is $$A(x−x_0)+B(y−y_0)+C(z−z_0)=0.$$ We know that the point \((a,b,f(a,b))\) is on the tangent plane so our plane has the form $$A(x−a)+B(y−b)+C(z−f(a,b))=0$$ or $$z=f(a,b)-\frac{A}{C}(x-a)-\frac{B}{C}(y-b).$$ When \(y=b\) the tangent plane should look like the tangent line and so \(\frac{A}{C}=f_x(a,b)\). Similarly, when \(x=a\) the tangent plane should look like the tangent line and so \(\frac{A}{C}=f_y(a,b).\) Then the equation of the tangent plane is $$z=f(a,b)-f_x(a,b)(x-a)-f_y(a,b)(y-b)$$ and one of the places we look for critical points of \(f(x,y)\) is points where the plane is horizontal.
Looking at an example
It isn't exactly true, but the end of a cucumber is almost the graph of the paraboliod $$z=4-2(x^2+y^2)$$ This is a nice example to think about because we can clearly see a critical point - it is at the top and this is a global maximum for the cucumber. There are many other examples where we can see places where the tangent plane is horizontal, for example the graph of $$z=4-2(x^2-y^2),$$ but another nice thing about the cucumber is we can see the tangent plane at the critical point. In fact, balancing an envelope on the top of the cucumber is the tangent plane at that critical point. (Try to imagine that the envelope is perfectly straight!) It might seem a little strange but at the top of the cucumber, the envelope is the plane that most closely approximates the cucumber. If we moved the envelope down the side of the cucumber we would need to change the angle of the envelope.It would be harder to do this for the function $$z=4-2(x^2-y^2),$$ since the critical point at \((0,0,4)\) is not a local maximum or a local minimum. So I was very happy to have an example where I could clearly see the tangent plane.
The math for this example
In this example \(f(x,y)=4-2(x^2-y^2)\) so $$\begin{aligned}f_x(a,b)&=\lim_{h\to 0}\frac{4-2((a+h)^2+b^2)-4+2(a^2+b^2)}{h}\\ &=\lim_{h\to 0}\frac{4-2(a+h)^2-2b^2-4+2a^2+2b^2}{h}\\ &=\lim_{h\to 0}\frac{2(-(a+h)^2+a^2)}{h}\\ &=\lim_{h\to 0}\frac{2(-a^2-2ah-h^2+a^2)}{h}\\ &=\lim_{h\to 0}\frac{2(-2ah-h^2)}{h}\\ &=\lim_{h\to 0}2(-2a-h)=-4a\\ \end{aligned}$$ The computation for \(f_y\) is similiar so \(f_y(a,b)=-4b\).So the tangent plane for this function \(f(x,)\) is horizontal when \(-4a=0\) and \(-4b=0\). This happens when both \(a\) and \(b\) are zero. Since the function is decreasing as we move away from the point \(0,0\) this is a global maximum. (An this agrees with our experience of cucumbers.)