Tangent Planes & Hyperplanes

1322 words
7 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Tangent Planes & Hyperplanes ## ๐ŸŽฏ Learning Objectives After this topic you will be able to: - Find the equation of the tangent plane to $z = f(x,y)$ at a point - Find the tangent hyperplane for $f: \mathbb{R}^n \to \mathbb{R}$ - Use the tangent plane for linear approximation - Derive the tangent plane from the gr...

Tangent Planes & Hyperplanes

๐ŸŽฏ Learning Objectives

After this topic you will be able to:
  • Find the equation of the tangent plane to z=f(x,y)z = f(x,y) at a point
  • Find the tangent hyperplane for f:Rnโ†’Rf: \mathbb{R}^n \to \mathbb{R}
  • Use the tangent plane for linear approximation
  • Derive the tangent plane from the gradient

๐Ÿ“‹ Prerequisites

  • Gradient (Week 9) โ€” provides the normal vector
  • Partial Derivatives (Week 9) โ€” components of the gradient

1. Intuition: The Best Flat Approximation

A tangent plane is the best linear approximation to a surface at a point. It's the multivariable version of the tangent line from single-variable calculus. Just as L(x)=f(a)+fโ€ฒ(a)(xโˆ’a)L(x) = f(a) + f'(a)(x-a) approximates f(x)f(x) near aa, the tangent plane approximates f(x,y)f(x,y) near (a,b)(a,b):
L(x,y)=f(a,b)+fx(a,b)(xโˆ’a)+fy(a,b)(yโˆ’b)L(x,y) = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)

2. Tangent Plane to z=f(x,y)z = f(x,y)

2.1 Formula

Definition (Tangent Plane). For z=f(x,y)z = f(x,y), the tangent plane at (a,b,f(a,b))(a,b,f(a,b)) is:
>zโˆ’z0=fx(a,b)(xโˆ’a)+fy(a,b)(yโˆ’b)>> z - z_0 = f_x(a,b)(x-a) + f_y(a,b)(y-b) >
Or equivalently: z=f(a,b)+fx(a,b)(xโˆ’a)+fy(a,b)(yโˆ’b)z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b). Example 1: Tangent plane
f(x,y)=x2+y2f(x,y) = x^2 + y^2 at (1,2)(1,2).
f(1,2)=5f(1,2) = 5, fx=2xf_x = 2x, fx(1,2)=2f_x(1,2) = 2, fy=2yf_y = 2y, fy(1,2)=4f_y(1,2) = 4.
Tangent plane: zโˆ’5=2(xโˆ’1)+4(yโˆ’2)z - 5 = 2(x-1) + 4(y-2), or z=2x+4yโˆ’5z = 2x + 4y - 5.

2.2 Using the Gradient

For z=f(x,y)z = f(x,y), define F(x,y,z)=zโˆ’f(x,y)F(x,y,z) = z - f(x,y). Then โˆ‡F=(โˆ’fx,โˆ’fy,1)\nabla F = (-f_x, -f_y, 1) is normal to the tangent plane:
โˆ‡Fโ‹…(xโˆ’a,yโˆ’b,zโˆ’f(a,b))=0\nabla F \cdot (x-a, y-b, z-f(a,b)) = 0

3. Tangent Hyperplane

For f:Rnโ†’Rf: \mathbb{R}^n \to \mathbb{R}, the tangent hyperplane at a\mathbf{a} is:
f(x)โ‰ˆf(a)+โˆ‡f(a)โ‹…(xโˆ’a)f(\mathbf{x}) \approx f(\mathbf{a}) + \nabla f(\mathbf{a}) \cdot (\mathbf{x} - \mathbf{a})
Example 2: Tangent hyperplane in โ„ยณ
f(x,y,z)=x2+y2+z2f(x,y,z) = x^2 + y^2 + z^2 at (1,1,1)(1,1,1).
โˆ‡f=(2x,2y,2z)\nabla f = (2x, 2y, 2z), โˆ‡f(1,1,1)=(2,2,2)\nabla f(1,1,1) = (2,2,2). f(1,1,1)=3f(1,1,1) = 3.
Tangent hyperplane: wโˆ’3=2(xโˆ’1)+2(yโˆ’1)+2(zโˆ’1)w - 3 = 2(x-1) + 2(y-1) + 2(z-1). Or w=2x+2y+2zโˆ’3w = 2x + 2y + 2z - 3.

4. Linear Approximation

The tangent plane gives the linearisation of ff near a point:
Definition (Linearisation). The linearisation of ff at a\mathbf{a} is:
>L(x)=f(a)+โˆ‡f(a)โ‹…(xโˆ’a)>> L(\mathbf{x}) = f(\mathbf{a}) + \nabla f(\mathbf{a}) \cdot (\mathbf{x} - \mathbf{a}) >
The error โˆฅf(x)โˆ’L(x)โˆฅ\|f(\mathbf{x}) - L(\mathbf{x})\| goes to 0 faster than โˆฅxโˆ’aโˆฅ\|\mathbf{x} - \mathbf{a}\| as xโ†’a\mathbf{x} \to \mathbf{a}.
Example 3: Linear approximation
Approximate (3.1)2+(4.2)2\sqrt{(3.1)^2 + (4.2)^2} using f(x,y)=x2+y2f(x,y) = \sqrt{x^2 + y^2} at (3,4)(3,4).
f(3,4)=5f(3,4) = 5. fx=xx2+y2f_x = \frac{x}{\sqrt{x^2+y^2}}, fx(3,4)=35f_x(3,4) = \frac{3}{5}. fy=yx2+y2f_y = \frac{y}{\sqrt{x^2+y^2}}, fy(3,4)=45f_y(3,4) = \frac{4}{5}.
L(3.1,4.2)=5+35(0.1)+45(0.2)=5+0.06+0.16=5.22L(3.1, 4.2) = 5 + \frac{3}{5}(0.1) + \frac{4}{5}(0.2) = 5 + 0.06 + 0.16 = 5.22.
Actual: 9.61+17.64=27.25โ‰ˆ5.2199\sqrt{9.61 + 17.64} = \sqrt{27.25} \approx 5.2199. Spot on!

5. Edge Cases & Gotchas

SituationWhat Happens
** ff not differentiable**Tangent plane doesn't exist
** โˆ‡f=0\nabla f = \mathbf{0} **Tangent plane is horizontal
** f(x,y)f(x,y) **Tangent plane is 2D; hyperplane for n>2n > 2

6. Common Pitfalls

โŒ Pitfall 1: Forgetting the constant term

The tangent plane equation is z=f(a,b)+fx(a,b)(xโˆ’a)+fy(a,b)(yโˆ’b)z = f(a,b) + f_x(a,b)(x-a) + f_y(a,b)(y-b). The constant f(a,b)f(a,b) is crucial.

โŒ Pitfall 2: Using unnormalised gradient for the plane equation

For z=f(x,y)z = f(x,y), the normal is (fx,fy,โˆ’1)(f_x, f_y, -1) or (โˆ’fx,โˆ’fy,1)(-f_x, -f_y, 1), not (fx,fy,0)(f_x, f_y, 0).

7. Formula Summary Table

ConceptFormula
Tangent plane ( z=f(x,y)z=f(x,y) )zโˆ’z0=fx(a,b)(xโˆ’a)+fy(a,b)(yโˆ’b)z - z_0 = f_x(a,b)(x-a) + f_y(a,b)(y-b)
Tangent hyperplanef(x)โ‰ˆf(a)+โˆ‡f(a)โ‹…(xโˆ’a)f(\mathbf{x}) \approx f(\mathbf{a}) + \nabla f(\mathbf{a})\cdot(\mathbf{x}-\mathbf{a})
LinearisationL(x)=f(a)+โˆ‡f(a)โ‹…(xโˆ’a)L(\mathbf{x}) = f(\mathbf{a}) + \nabla f(\mathbf{a})\cdot(\mathbf{x}-\mathbf{a})
Normal vectorn=(โˆ’fx,โˆ’fy,1)\mathbf{n} = (-f_x, -f_y, 1) or (fx,fy,โˆ’1)(f_x, f_y, -1)

8. ๐Ÿ“ Practice Questions

Q1: Tangent plane
Find tangent plane to z=sinโก(xy)z = \sin(xy) at (ฯ€/2,1,1)(\pi/2, 1, 1).
Solution: fx=ycosโก(xy)f_x = y\cos(xy), fx(ฯ€/2,1)=1โ‹…cosโก(ฯ€/2)=0f_x(\pi/2,1) = 1\cdot\cos(\pi/2) = 0. fy=xcosโก(xy)f_y = x\cos(xy), fy(ฯ€/2,1)=(ฯ€/2)cosโก(ฯ€/2)=0f_y(\pi/2,1) = (\pi/2)\cos(\pi/2) = 0. Tangent plane: zโˆ’1=0(xโˆ’ฯ€/2)+0(yโˆ’1)z - 1 = 0(x-\pi/2) + 0(y-1) โ‡’ z=1z = 1 (horizontal plane). Q2: Linear approximation
Approximate e0.1cosโก(0.2)e^{0.1}\cos(0.2) using f(x,y)=excosโกyf(x,y) = e^x\cos y at (0,0)(0,0).
Solution: f(0,0)=1f(0,0)=1, fx=excosโกyf_x = e^x\cos y, fx(0,0)=1f_x(0,0)=1, fy=โˆ’exsinโกyf_y = -e^x\sin y, fy(0,0)=0f_y(0,0)=0. L(0.1,0.2)=1+1(0.1)+0(0.2)=1.1L(0.1,0.2) = 1 + 1(0.1) + 0(0.2) = 1.1. Actual: e0.1cosโก(0.2)โ‰ˆ1.10517ร—0.98007โ‰ˆ1.083e^{0.1}\cos(0.2) \approx 1.10517 \times 0.98007 \approx 1.083. Not great โ€” error due to second-order terms. Q3: Tangent plane from gradient
Find tangent plane to z=x2โˆ’y2z = x^2 - y^2 at (2,1,3)(2,1,3) using gradient method.
Solution: F(x,y,z)=zโˆ’x2+y2=0F(x,y,z) = z - x^2 + y^2 = 0. โˆ‡F=(โˆ’2x,2y,1)\nabla F = (-2x, 2y, 1), โˆ‡F(2,1,3)=(โˆ’4,2,1)\nabla F(2,1,3) = (-4, 2, 1). Plane: (โˆ’4,2,1)โ‹…(xโˆ’2,yโˆ’1,zโˆ’3)=0(-4,2,1)\cdot(x-2, y-1, z-3) = 0 โ‡’ โˆ’4(xโˆ’2)+2(yโˆ’1)+(zโˆ’3)=0-4(x-2) + 2(y-1) + (z-3) = 0 โ‡’ โˆ’4x+8+2yโˆ’2+zโˆ’3=0-4x+8+2y-2+z-3=0 โ‡’ z=4xโˆ’2yโˆ’3z = 4x - 2y - 3. Check: f(2,1)=3=4(2)โˆ’2(1)โˆ’3=8โˆ’2โˆ’3=3f(2,1) = 3 = 4(2) - 2(1) - 3 = 8-2-3 = 3 โœ“. Q4: Multivariable linearisation
Linearise f(x,y,z)=x2+y2+z2f(x,y,z) = \sqrt{x^2 + y^2 + z^2} at (3,4,0)(3,4,0).
Solution: f(3,4,0)=5f(3,4,0) = 5. โˆ‡f=(xx2+y2+z2,yโ€ฆ,zโ€ฆ)\nabla f = \left(\frac{x}{\sqrt{x^2+y^2+z^2}}, \frac{y}{\sqrt{\dots}}, \frac{z}{\sqrt{\dots}}\right). โˆ‡f(3,4,0)=(35,45,0)\nabla f(3,4,0) = \left(\frac{3}{5}, \frac{4}{5}, 0\right). L(x,y,z)=5+35(xโˆ’3)+45(yโˆ’4)+0(zโˆ’0)=35x+45yL(x,y,z) = 5 + \frac{3}{5}(x-3) + \frac{4}{5}(y-4) + 0(z-0) = \frac{3}{5}x + \frac{4}{5}y. Q5: Error estimation
The radius and height of a cylinder are measured with errors. Use linearisation: V=ฯ€r2hV = \pi r^2 h. If r=5r=5 (error 0.1), h=10h=10 (error 0.1), estimate max error in VV.
Solution: V(5,10)=250ฯ€V(5,10) = 250\pi. Vr=2ฯ€rhV_r = 2\pi rh, Vr(5,10)=100ฯ€V_r(5,10) = 100\pi. Vh=ฯ€r2V_h = \pi r^2, Vh(5,10)=25ฯ€V_h(5,10) = 25\pi. ฮ”Vโ‰ˆโˆฃVrโˆฃฮ”r+โˆฃVhโˆฃฮ”h=100ฯ€(0.1)+25ฯ€(0.1)=12.5ฯ€โ‰ˆ39.27\Delta V \approx |V_r|\Delta r + |V_h|\Delta h = 100\pi(0.1) + 25\pi(0.1) = 12.5\pi \approx 39.27. Max error: about 12.5ฯ€12.5\pi. Q6: Tangent plane to implicit surface
Find tangent plane to x2+y2+z2=14x^2 + y^2 + z^2 = 14 at (1,2,3)(1,2,3).
Solution: F(x,y,z)=x2+y2+z2โˆ’14F(x,y,z) = x^2 + y^2 + z^2 - 14, โˆ‡F=(2x,2y,2z)\nabla F = (2x, 2y, 2z), โˆ‡F(1,2,3)=(2,4,6)\nabla F(1,2,3) = (2,4,6). Tangent plane: 2(xโˆ’1)+4(yโˆ’2)+6(zโˆ’3)=02(x-1) + 4(y-2) + 6(z-3) = 0 โ‡’ x+2y+3z=14x + 2y + 3z = 14. Q7: Differentiability check
Show f(x,y)=x2+y2f(x,y) = x^2 + y^2 is differentiable at (1,2)(1,2) by finding its linearisation and verifying the error goes to 0.
Solution: L(x,y)=5+2(xโˆ’1)+4(yโˆ’2)=2x+4yโˆ’5L(x,y) = 5 + 2(x-1) + 4(y-2) = 2x + 4y - 5. Error: f(x,y)โˆ’L(x,y)=(x2+y2)โˆ’(2x+4yโˆ’5)=(x2โˆ’2x+1)+(y2โˆ’4y+4)=(xโˆ’1)2+(yโˆ’2)2f(x,y) - L(x,y) = (x^2+y^2) - (2x+4y-5) = (x^2-2x+1) + (y^2-4y+4) = (x-1)^2 + (y-2)^2. As (x,y)โ†’(1,2)(x,y)\to(1,2), the error is O(โˆฅ(xโˆ’1,yโˆ’2)โˆฅ2)O(\|(x-1,y-2)\|^2), which goes to 0 faster than โˆฅ(xโˆ’1,yโˆ’2)โˆฅ\|(x-1,y-2)\|. โœ“ Q8: Tangent plane for f(x,y)f(x,y) at critical point
f(x,y)=x2+y2f(x,y) = x^2 + y^2 at (0,0,0)(0,0,0). What's special about the tangent plane?
Solution: โˆ‡f(0,0)=(0,0)\nabla f(0,0) = (0,0). Tangent plane: zโˆ’0=0(xโˆ’0)+0(yโˆ’0)z - 0 = 0(x-0) + 0(y-0) โ‡’ z=0z = 0. At a critical point (โˆ‡f=0\nabla f = 0), the tangent plane is horizontal. Q9: Chain rule and tangent plane
If z=f(x,y)z = f(x,y) and x=g(t)x = g(t), y=h(t)y = h(t), how does the tangent plane relate to dzdt\frac{dz}{dt}?
Solution: The tangent plane gives ฮ”zโ‰ˆfxฮ”x+fyฮ”y\Delta z \approx f_x\Delta x + f_y\Delta y. Dividing by ฮ”t\Delta t and taking the limit gives dzdt=fxdxdt+fydydt\frac{dz}{dt} = f_x\frac{dx}{dt} + f_y\frac{dy}{dt} โ€” the chain rule. Q10: Total derivative
The total derivative dfdf is df=fxdx+fydydf = f_x dx + f_y dy. Show this corresponds to the linearisation.
Solution: The total derivative represents the linear part of the change in ff: ฮ”fโ‰ˆfxฮ”x+fyฮ”y=โˆ‡fโ‹…(ฮ”x,ฮ”y)\Delta f \approx f_x \Delta x + f_y \Delta y = \nabla f \cdot (\Delta x, \Delta y). This is exactly the linearisation L(x,y)โˆ’f(a,b)=โˆ‡f(a,b)โ‹…(xโˆ’a,yโˆ’b)L(x,y) - f(a,b) = \nabla f(a,b) \cdot (x-a, y-b).

๐Ÿ”— Cross-References

Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.