Differentiability in higher dimensions
Review of differentiability in one-variable calculus
You learned in one-variable calculus that a function f : R → R may or may not be differentiable. In fact, a function may be differentiable at some places but not in others.
Consider the function r(i) that gives the output rate r of a neuron as a function of its input i. 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 r(i). Since a negative rate isn’t meaningful, we know that r(i) ≥ 0.
For this idealized neuron model, the neuron is completely silent when it has very little input, i.e., when the input i is small then the rate r(i) = 0. Only when the input exceeds some threshold I0 does the neuron begins emitting output pulses. The output rates increases as i increases, as illustrated in this graph of r(i). (The curve levels off for high values of i 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 i = I0. By differentiable, we mean that we can fit the graph of r(i) with a tangent line. Given any level of input, say i = a, we can find a line that closely approximates r(i) around a, as long as a≠I0.

The function r(i) is not differentiable at i = I0 because there is no tangent line at i = I0. The graph of r 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 I0.
We can compute the equation of the tangent line at the point where i = a. It is simply
| f(i) = r(a) + r'(a)(i - a), | (1) |
If we felt like it, we could use the tangent line to define the derivative of r(i). We could say that the derivative of r(i) at the point where i = a is the number m for which the line
| f(i) = r(a) + m(i - a), | (2) |
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 r : R2 → R that gives the neural response as a function of both input i and nicotine level s. (I chose s for “smoke.”)
Let’s pretend that the effect of nicotine is to shift the threshold I0 to smaller values and flatten out a neuron’s response to input. We write the response of a neuron to input i and nicotine s as r(i,s). If we look at the case when s = 0, we have the original curve r(i, 0) of neural output rate to input. If we add nicotine so some level, say s = 2 (in some arbitrary units), then the curve becomes r(i, 2), a shifted and flattened version of the original curve. Increasing nicotine further to s = 4 gives the further shifted and flattened curve r(i, 4).

To get a complete picture, we can plot the full function r(i,s). Here is a CVT of r(i,s), which you can rotate to view better.
One of the first things you may notice is that the surface r(i,s) is smooth except for a fold or crease along a line where r(i,s) becomes nonzero. This fold is analogous to the kink at I0 that we saw in the original curve, above.
We want to define a notion of differentiability for our multivariable function r(i,s). As in the one-variable case, the function r(i,s) 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 r(i,s) should fail to be differentiable along the fold.
Given some point a = (a1,a2), the function r(i,s) is differentiable at the point where (i,s) = a if has a tangent plane at a. The definition of a tangent plane is analogous to the definition of a tangent line. At points (i,s) near a, the function r(i,s) is nearly identical to the tangent plane.
For example, the below graph shows that r(i,s) is differentiable at the point (i,s) = (3, 3) (shown by the green dot). By rotating the graph, you can see how the tangent plane touches the surface at the point (3, 3). 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 r(i,s) 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 (i,s) = a where a = (a1,a2) as
| f(i,s) = r(a1,a2) + m(i - a1) + n(s - a2). | (3) |
It turns out that this slopes m and n are the partial derivatives of r at a:
m = (a1,a2) | ||
n = (a1,a2) |
f(i,s) = r(a1,a2) + (i - a1) + (s - a2). | (4) |
We’ll group the partial derivatives into a row matrix, called the matrix of partial derivatives of r at a = (a1,a2), and denoted by
Dr(a1,a2) = . |
In summary, if the function r(i,s) has a tangent plane at the point (i,s) = a, then it is differentiable at a. The slopes of the tangent plane are the partial derivatives of r. The matrix of partial derivatives Dr(a1,a2) is the derivative of the function r(i,s) at the point a. Equation (4) is the equation for the tangent plane. Just like in the one-variable case, the tangent plane f(i,s) is called the linear approximation to r(i,s). The fact that r(i,s) is differentiable means that it is close to its linear approximation around (i,s) = a.
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?
(
(
(
(![[ ]
∂r- ∂r-
∂i (a1,a2)∂s (a1, a2)](diffability7x.png)