Quiz 2

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:RnRf: \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)(xa)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)(xa)+fy(a,b)(yb)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:
>zz0=fx(a,b)(xa)+fy(a,b)(yb)>> z - z_0 = f_x(a,b)(x-a) + f_y(a,b)(y-b) >
Or equivalently: z=f(a,b)+fx(a,b)(xa)+fy(a,b)(yb)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: z5=2(x1)+4(y2)z - 5 = 2(x-1) + 4(y-2), or z=2x+4y5z = 2x + 4y - 5.

2.2 Using the Gradient

For z=f(x,y)z = f(x,y), define F(x,y,z)=zf(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(xa,yb,zf(a,b))=0\nabla F \cdot (x-a, y-b, z-f(a,b)) = 0

3. Tangent Hyperplane

For f:RnRf: \mathbb{R}^n \to \mathbb{R}, the tangent hyperplane at a\mathbf{a} is:
f(x)f(a)+f(a)(xa)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: w3=2(x1)+2(y1)+2(z1)w - 3 = 2(x-1) + 2(y-1) + 2(z-1). Or w=2x+2y+2z3w = 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)(xa)>> 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 xa\|\mathbf{x} - \mathbf{a}\| as xa\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.255.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)(xa)+fy(a,b)(yb)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) )zz0=fx(a,b)(xa)+fy(a,b)(yb)z - z_0 = f_x(a,b)(x-a) + f_y(a,b)(y-b)
Tangent hyperplanef(x)f(a)+f(a)(xa)f(\mathbf{x}) \approx f(\mathbf{a}) + \nabla f(\mathbf{a})\cdot(\mathbf{x}-\mathbf{a})
LinearisationL(x)=f(a)+f(a)(xa)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)=1cos(π/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: z1=0(xπ/2)+0(y1)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)=excosyf(x,y) = e^x\cos y at (0,0)(0,0).
Solution: f(0,0)=1f(0,0)=1, fx=excosyf_x = e^x\cos y, fx(0,0)=1f_x(0,0)=1, fy=exsinyf_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.980071.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=x2y2z = x^2 - y^2 at (2,1,3)(2,1,3) using gradient method.
Solution: F(x,y,z)=zx2+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)(x2,y1,z3)=0(-4,2,1)\cdot(x-2, y-1, z-3) = 04(x2)+2(y1)+(z3)=0-4(x-2) + 2(y-1) + (z-3) = 04x+8+2y2+z3=0-4x+8+2y-2+z-3=0z=4x2y3z = 4x - 2y - 3. Check: f(2,1)=3=4(2)2(1)3=823=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(x3)+45(y4)+0(z0)=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. ΔVVrΔ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+z214F(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(x1)+4(y2)+6(z3)=02(x-1) + 4(y-2) + 6(z-3) = 0x+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(x1)+4(y2)=2x+4y5L(x,y) = 5 + 2(x-1) + 4(y-2) = 2x + 4y - 5. Error: f(x,y)L(x,y)=(x2+y2)(2x+4y5)=(x22x+1)+(y24y+4)=(x1)2+(y2)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((x1,y2)2)O(\|(x-1,y-2)\|^2), which goes to 0 faster than (x1,y2)\|(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: z0=0(x0)+0(y0)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 ΔzfxΔ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: ΔffxΔ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)(xa,yb)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
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.