Can you read a partial derivative and apply the freeze rule to simple terms?
Recall Solution 1.1
Freeze y to find ∂f/∂x. The term 5x has slope 5 in x; the term 7y has no x, so its x-slope is 0.
∂x∂f=5,∂y∂f=7
Each variable's coefficient is just its own slope — a flat plane tilts by a fixed amount in each direction.
Recall Solution 1.2
Differentiate x2 normally (→2x); y3 has no x so vanishes.
∂x∂f=2x,∂y∂f=3y2
Notice the two answers are completely decoupled — no cross terms exist, so each depends on only its own variable.
Products, powers, and the chain rule where one variable is a constant multiplier.
Recall Solution 2.1
∂f/∂x: freeze y, so y2 is a constant multiplier. dxd(x3)=3x2, carried along by y2:
∂x∂f=3x2y2∂f/∂y: freeze x, so x3 is a constant multiplier. dyd(y2)=2y:
∂y∂f=2x3y
Recall Solution 2.2
∂f/∂x:y is a frozen multiplier on sinx, and dxdsinx=cosx; the lone x gives 1:
∂x∂f=ycos(x)+1∂f/∂y: freeze x, so sinx is a constant multiplier on y, giving sinx; the term x has no y so vanishes:
∂y∂f=sin(x)
Recall Solution 2.3
Let the inside be u=x2y. Outer: dudeu=eu. Then multiply by the inner partial.
∂u/∂x=2xy (freeze y), so
∂x∂f=2xyex2y∂u/∂y=x2 (freeze x), so
∂y∂f=x2ex2y
The exponential never disappears — it's always ×eu; only the inner factor changes with which variable you moved.
Interpret partials geometrically and evaluate at a point.
The figure below plots f(x,y)=x2+y2 as contour rings (each ring is one fixed height; the numbers are the values 1,4,9,16,25). The yellow dot is the point (2,−1) from Exercise 3.1. Watch the two coloured arrows leaving it: the blue arrow points east and shows the x-slope +4 (uphill, crossing to higher rings), the pink arrow points north and shows the y-slope −2 (downhill, toward a lower ring). The dashed yellow arrow is −∇f=(−4,+2), the steepest way down — always perpendicular to the ring it starts on.
Recall Solution 3.1
∂f/∂x=2x and ∂f/∂y=2y. At (2,−1):
∂x∂f(2,−1)=2(2)=4,∂y∂f(2,−1)=2(−1)=−2Reading the signs (blue and pink arrows in the figure above):+4 means stepping east uphill (surface rises), and it is steep. −2 means stepping north goes downhill, less steeply. So from (2,−1) the fastest way down the bowl is to move west and slightly north — exactly the dashed direction −∇f=(−4,+2).
Recall Solution 3.2
∂f/∂x=y and ∂f/∂y=x.
At (0,0): both are 0 — the surface is momentarily flat in both axis directions (a saddle passing through here).
At (0,3): ∂f/∂x=3 (uphill east), ∂f/∂y=0 (flat north).
Why the difference: the x-slope of xy is the height of y — the more north you already are, the steeper the east–west tilt. This is the hallmark of a coupled function: one variable's slope depends on the other's value.
Recall Solution 3.3
∂x∂f=0,∂y∂f=0everywhere.
Nothing depends on any input, so nudging any variable changes nothing. The gradient is the zero vector ∇f=(0,0) — a critical point at every location. This is the limiting "totally flat" case that anchors your intuition: no slope, no direction to descend.
Assemble partials into a gradient and connect to the ML loss.
Recall Solution 4.1
Differentiate once per variable, freezing the other two each time:
∂f/∂x=2xy(only x2y has an x)
∂f/∂y=x2+z2(x2y→x2; yz2→z2; 4z has no y)
∂f/∂z=2yz+4(yz2→2yz; 4z→4)∇f=(2xy,x2+z2,2yz+4)
Stacking these three slopes into a vector gives the direction of steepest ascent — recall the gradient definition ∇f=(∂x1∂f,…,∂xn∂f) from the parent note. See 1.2.04-Gradient-and-directional-derivatives.
Recall Solution 4.2
Let the residual r=wx+b−t. Chain rule: ∂L/∂∙=2r⋅(∂r/∂∙), with ∂r/∂w=x and ∂r/∂b=1.
∂w∂L=2(wx+b−t)x,∂b∂L=2(wx+b−t)Evaluate: residual r=2⋅3+1−10=−3.
∂w∂L=2(−3)(3)=−18,∂b∂L=2(−3)=−6
Both negative ⇒ raising w or b would lower the loss right now (residual is −3, prediction too small). This is exactly the update signal Linear-regression uses.
Do the whole loop: gradient, evaluate, take a gradient-descent step, prove from first principles.
The figure below shows this journey on the same contour rings of f=x2+y2. The yellow dots are the successive points p0,p1,p2,…; each blue arrow is one update −η∇f, always pointing inward (perpendicular to the ring) toward the pink star at the minimum (0,0). Notice the steps shrink as the slope flattens near the bottom.
Recall Solution 5.1
Gradient: ∇f=(2x,2y). At p0=(3,4): ∇f=(6,8).
Step (subtract η× gradient because we descend — 1.3.01-Gradient-descent):
x1=3−0.1(6)=2.4,y1=4−0.1(8)=3.2
so p1=(2.4,3.2).
Confirm loss dropped:f(3,4)=9+16=25,f(2.4,3.2)=5.76+10.24=1616<25 ✅. The point slid toward the bowl's bottom (0,0) — this is the first blue arrow in the figure above.
Recall Solution 5.2
Here we nudge y, so y→y+h while x stays put:
∂y∂f=limh→0hx2(y+h)−x2yWhy this step: the definition perturbs only y; x2 is untouched.
=limh→0hx2y+x2h−x2y=limh→0hx2h=limh→0x2=x2Why this step: the x2y terms cancel, h factors out and cancels, then h→0 leaves x2.
Shortcut check: treat x2 as a constant multiplier on y; dyd(x2y)=x2. ✅ Match.
Recall Solution 5.3
Residual r=w1x1+w2x2+b−t=1(1)+1(2)+0−5=−2.
Each partial is 2r times the inner factor (∂r/∂w1=x1, ∂r/∂w2=x2, ∂r/∂b=1):
∂w1∂L=2(−2)(1)=−4,∂w2∂L=2(−2)(2)=−8,∂b∂L=2(−2)=−4∇L=(−4,−8,−4)
Feature x2 is twice as large, so its weight's gradient is twice as strong — the model's slope in that direction is amplified by its input. This is the multivariable pattern that scales up to real networks via 1.2.05-Chain-rule-multivariable.