Differentiability in higher dimensions
Review of differentiability in one-variable calculus
You learned in one-variable calculus that a function may or may not be differentiable. In fact, a function may be differentiable at some places but not in others.
Consider the function that gives the output rate of a neuron as a function of its input . A neuron communicates to other neurons by sending output pulses to other neurons. In this simple model, we represent only the rate of these output pulses by the function . Since a negative rate isn’t meaningful, we know that .
For this idealized neuron model, the neuron is completely silent when it has very little input, i.e., when the input is small then the rate . Only when the input exceeds some threshold does the neuron begins emitting output pulses. The output rates increases as increases, as illustrated in this graph of . (The curve levels off for high values of because there is a limit on how fast the neuron can emit output pulses. For example, the limit might be 200 pulses per second.)

The function is differentiable everywhere except at the point where . By differentiable, we mean that we can fit the graph of with a tangent line. Given any level of input, say , we can find a line that closely approximates around , as long as .

The function is not differentiable at because there is no tangent line at . The graph of has a kink there, so no matter what line we chose, it will fail to match the graph on either the left or the right side of .
We can compute the equation of the tangent line at the point where . It is simply
where is the derivative of at the point where . We see that , so meets when . Since is differentiable, we know that and are close to each other when is near . The fact that is differentiable means that it is nearly linear around . In fact, we call the tangent line the linear approximation to .
If we felt like it, we could use the tangent line to define the derivative of . We could say that the derivative of at the point where is the number for which the line
is tangent to the graph of . The number is the slope of the tangent line. (By comparing equations (1) and (2), you’ll see that, of course, must be equal to .) This is, in effect, how we will define the derivative in higher dimensions.
Differentiability in two dimensions
Why did I go through that long-winded review of one-variable differentiability? To recast the derivative into the language we will use for multivariable differentiability.
To illustrate, let’s modify our neuron example. In turns out many neurons have “receptors” built right into them that respond to nicotine. For these neurons, the presence of nicotine alters their behavior. (Needless to say, many in the medical community are interested in the nicotine receptors as nicotine is a common drug of addiction.) We can model the effects of nicotine by defining a new function that gives the neural response as a function of both input and nicotine level . (I chose for “smoke.”)
Let’s pretend that the effect of nicotine is to shift the threshold to smaller values and flatten out a neuron’s response to input. We write the response of a neuron to input and nicotine as . If we look at the case when , we have the original curve of neural output rate to input. If we add nicotine so some level, say (in some arbitrary units), then the curve becomes , a shifted and flattened version of the original curve. Increasing nicotine further to gives the further shifted and flattened curve .

To get a complete picture, we can plot the full function . Here is a CVT of , which you can rotate to view better.
One of the first things you may notice is that the surface is smooth except for a fold or crease along a line where becomes nonzero. This fold is analogous to the kink at that we saw in the original curve, above.
We want to define a notion of differentiability for our multivariable function . As in the one-variable case, the function may be differentiable at some points and not at others. In fact, our definition of differentiability should distinguish the fold in the surface from the smooth parts of the surface. To be consistent with the one-variable case, the function should fail to be differentiable along the fold.
Given some point , the function is differentiable at the point where if has a tangent plane at . The definition of a tangent plane is analogous to the definition of a tangent line. At points near , the function is nearly identical to the tangent plane.
For example, the below graph shows that is differentiable at the point (shown by the green dot). By rotating the graph, you can see how the tangent plane touches the surface at the point . On the other hand, if we tried to fit a plane at a point where the surface folds (e.g., the point shown by the red dot), we would never succeed. The plane will fail to match the graph on one side of the fold or the other. Hence the function is not differentiable at any point along the fold.
Let’s write down the form of the equation for the tangent plane. Since this reading is getting long, I’m just going to assert that we can write the equation for the tangent plane going through the point where as
The numbers and are the “slopes” of the plane in the and directions, respectively. Equation (3) is analogue of equation (2) for a function of two variables.
It turns out that this slopes and are the partial derivatives of at :
so we can write the equation of the tangent plane as
Although it looks messier, I hope you can see that equation (4) is the analogue of equation (1) for a function of two variables.vector).
We’ll group the partial derivatives into a row matrix, called the matrix of partial derivatives of at , and denoted by
IF the tangent plane of exists at , then is the derivative of at . (The “IF” is important, and you can read more about some of the subtleties of differentiability in higher dimensions.)
In summary, if the function has a tangent plane at the point , then it is differentiable at . The slopes of the tangent plane are the partial derivatives of . The matrix of partial derivatives is the derivative of the function at the point . Equation (4) is the equation for the tangent plane. Just like in the one-variable case, the tangent plane is called the linear approximation to . The fact that is differentiable means that it is close to its linear approximation around .
If you made it this far, your neurons have probably been working overtime. You better let them relax for awhile. Given our current knowledge about nicotine, I can’t suggest using that to relax. Maybe going to some place warm would be in order.
Want to see some examples?