#math/calculus For a one-variable function, there is only one input direction to vary. A surface can change differently along each coordinate, so a `partial derivative` isolates one coordinate while holding the others fixed. For $z=f(x,y)$, $ f_x(x,y)=\lim_{h\to0}\frac{f(x+h,y)-f(x,y)}h, \qquad f_y(x,y)=\lim_{h\to0}\frac{f(x,y+h)-f(x,y)}h. $ Geometrically, $f_x$ is the slope of the surface along the slice $y=\text{constant}$; $f_y$ is the slope along $x=\text{constant}$. ![[calculus3-figure-15-1-1-partial-paths.png]] *Book Figure 15.1.1: $f_x$ and $f_y$ follow horizontal and vertical input paths.* ## Example: Measuring Temperature Change Suppose we are measuring temperature near Dawson Creek by $ T(x,y)=-(0.0003)x^2y+(0.9307)y, $ where $x$ is latitude and $y$ is longitude. Traveling directly north changes $x$ while holding $y$ fixed, so the relevant rate is the partial derivative $ T_x(x,y)=-(0.0003)(2xy). $ At Dawson Creek, $(x,y)=(55.7,120.2)$, this gives $ T_x(55.7,120.2)\approx-4.017. $ The negative sign says the temperature decreases as one moves north, at an instantaneous rate of about $4.017^\circ\mathrm C$ per degree of latitude. This is exactly what a partial derivative does: it measures change along one coordinate direction while the other coordinate remains fixed. The same rule applies in more variables: to compute $f_{x_i}$, treat every other coordinate as constant and use ordinary one-variable calculus. Partials are local rates, not merely symbols. If $T(x,y)$ is temperature, $T_x(a,b)$ is the instantaneous temperature change per unit motion in the positive $x$ direction at $(a,b)$. Arbitrary directions will be handled by [[16A2 - Directional Derivatives and Steepest Ascent|directional derivatives]]. > [!ML/AI] > Consider the loss function $L:\mathbb R^2\to\mathbb R$ given by $L(w,b)=(wx+b-y)^2$. Here $w$ is the weight, $b$ is the bias, $x$ is the input feature, and $y$ is the target value. Its partials are given by $ > \frac{\partial L}{\partial w}=2x(wx+b-y) > $ and $\frac{\partial L}{\partial b} =2(wx+b-y).$ Each partial isolates one parameter's contribution; together they give the update direction used by gradient descent.