Part 0 · The Toolkit — Chapter 0.6
Multivariable Calculus
One equation from Chapter 0.1, with a vector in it. Everything else is consequences.
This entire chapter is one substitution. Take the equation that Chapter 0.1 built the book on,
and let be a vector and a linear map (Chapter 0.4). That is it. That is the whole idea.
Partial derivatives, the gradient, the chain rule as a product of matrices, the Hessian, Lagrange multipliers and the Jacobian determinant are all consequences of that one move. This chapter derives them in that order.
This is the promised payoff for a decision made on the first page. Chapter 0.1 insisted, at some cost in apparent pedantry, that the derivative is the coefficient of the best linear approximation and not a slope. Had we defined it as a slope, we would now be stuck. There is no such thing as "the slope" of a function of three variables. There are infinitely many of them, one per direction, and nothing to choose between them. There is exactly one best linear approximation. The general definition costs us nothing extra here, and the special one would have cost us the chapter.
One section, §4, is more important than it looks. It observes that the gradient is not really a vector, and that turning it into one requires an inner product you did not notice yourself using. That quiet step stops being invisible the moment you leave Cartesian coordinates. You will meet your first covector there, and Chapters 2.4, 3.2 and 3.3 are built on it.
Tools you'll need — Chapter 0.1: the derivative as a linear approximation, the bookkeeping, the chain rule as composition. Chapter 0.3: Taylor's theorem with remainder, used once in §6. Chapter 0.4: linear maps, their matrices in a basis, composition as matrix multiplication, and the determinant as a signed volume scaling factor. Chapter 0.5: inner products, Cauchy–Schwarz with its equality condition, orthogonal projection, and the spectral theorem for symmetric matrices. Chapters 0.4 and 0.5 are not decoration here. Sections 3, 6 and 7 each cash a specific theorem from them.
1 · Partial derivatives, and the trap
Let's start with the move everybody makes first. When a function has several inputs, freeze all but one of them and differentiate in the survivor. Let and let be the standard basis. The partial derivative of with respect to at is
Nothing new is happening here. Restricted to the line , the function is a function of the single variable , and (0.6.1) is Chapter 0.1's definition applied to it. Every rule you already have applies verbatim: product, quotient, chain. The reason is that during the computation the other variables are literally constants. So and , and there is no technique to learn.
The trap is that this feels like it ought to be the whole story, and it is not. Partial derivatives are a genuinely weaker notion than differentiability, and the gap between the two is not subtle. Here is the example that shows how wide it is.
Define
Both partial derivatives exist at the origin, and both are zero. But is not continuous at the origin. It does not even have a limit there.
Check the partials first. Along the -axis, for every , so the function is identically zero and its derivative at is . Hence , and by the symmetry also . Both partials exist, are finite, and are perfectly well behaved.
Now let's do the thing the partial derivatives never do, which is to approach the origin along some other direction. Take the diagonal . For ,
a constant. So along the diagonal and along the axes. Two different limits mean there is no limit at all, so is not continuous at the origin. And a function that is not continuous at a point certainly does not have a good linear approximation there.
It is worth seeing why the function is so badly behaved, because the reason is geometrical rather than algebraic. We want the distance from the origin and the direction of approach to appear as separate quantities, so switch to polar coordinates. Write and . Then
Let's look at what that line is actually saying. The radius has cancelled completely, so depends only on the direction of approach and never on the distance. Every value in is attained arbitrarily close to the origin, on some ray or other.
Now notice where the two coordinate axes sit in that picture. They happen to be rays on which vanishes. The partial derivatives look along exactly those two rays, and so they see nothing wrong. They are two samples from a circle's worth of behaviour.
That is the honest indictment. Partial derivatives probe lines through a point. A function has infinitely many directions available to it, and it can misbehave in all the ones you didn't check.
So we need a definition that constrains the function's behaviour in every direction at once, and constrains it uniformly. Chapter 0.1 already wrote that definition down. We only have to let the displacement be a vector.
Freezing every input but one and differentiating in the survivor is the obvious opening move, and it behaves exactly as it did with a single variable, since the frozen inputs are literally constants while the calculation is going on. No new technique is required. There is a trap, though, and it is not a subtle one.
Such derivatives look along the coordinate axes and nowhere else. A point in a plane has a whole circle of directions leading away from it, and a function is at liberty to behave one way along the two axes you inspected and quite differently along everything between them. The standard example has a value depending only on the direction of approach and not at all on the distance travelled, so that it is zero along both axes, a different constant along the diagonal, and every intermediate value on some ray or other. It has no limit at the origin and is not continuous there, and its two axis derivatives exist, are finite, and report nothing amiss.
The moral concerns what a definition must achieve rather than what your daily calculations look like. Sampling finitely many lines cannot control a function, so the honest definition has to constrain every direction at once and constrain them uniformly. That definition was written down in the first chapter, and it needs exactly one alteration.
2 · The total derivative
Here is the definition the rest of the chapter runs on. Let .
is differentiable at if there exists a linear map such that
where, exactly as in Chapter 0.1, "" means a remainder with as . The map is the total derivative, or the differential, of at .
Compare it with the one-variable equation letter by letter. The point became , and the displacement became . The number became the linear map , and "multiply by " became "apply the linear map". Multiplication by a number is exactly what a linear map does, so the old definition is the case of the new one rather than an analogy to it.
Notice how much stronger this is than §1. The limit is over with no restriction on direction, so the approximation has to hold uniformly as approaches zero any way at all. That includes along spirals, and along the diagonal that broke the counterexample.
One consequence is immediate. Differentiability at forces continuity at : as the right-hand side of (0.6.4) tends to , because a linear map sends to and is continuous.
2.1 · There is only one such map
The definition says "there exists". It is worth two lines to check that it cannot exist twice, because otherwise "the derivative" would be an abuse of language.
Suppose and both satisfy (0.6.4). Subtracting the two statements, the function values cancel and we are left with . Our goal is to show that the map kills every vector. So fix any direction with , put for small , and see what the statement becomes. By linearity , so
The left side must tend to as . The right side does not depend on at all. A constant that tends to zero is zero, so for every , and therefore . The derivative, when it exists, is unique.
Note the mechanism, because we will reuse it. The linearity did all the work, by letting us pull the small parameter out in front and cancel it.
2.2 · Its matrix is the Jacobian
is a linear map, so by Chapter 0.4 it has a matrix once we fix bases. The recipe for that matrix is worth restating: the -th column is the image of the -th basis vector. So our goal is to find out what the map does to each , and the way to find out is to feed basis vectors into the definition. Put in (0.6.4):
where we used by linearity. We want the column on its own, so rearrange and divide by :
Look at the left-hand side. Componentwise, it is exactly the definition (0.6.1) of the partial derivative with respect to . So the -th column of the matrix of is the column of partials . Collecting the columns side by side gives the matrix a name, the Jacobian:
Read the shape off it. There are rows, one per output component, and columns, one per input direction. A map therefore has a Jacobian. There is never any doubt about which way round it goes, because a matrix acting on a column vector in must have columns.
So the partials do reconstruct the derivative, once you know the derivative exists. That qualifier is the entire content of §1. The logic runs one way only:
and the converse is false, by (0.6.3). What rescues the converse is one extra hypothesis. This is the one theorem in the chapter we will quote in the main text rather than prove there:
If all the partial derivatives exist in a neighbourhood of and are continuous at , then is differentiable at , and is the Jacobian (0.6.8).
Here is why it is safe to lean on that theorem. Every function you will differentiate in this book is built from polynomials, exponentials, logarithms and trigonometric functions by arithmetic and composition. The partials of such a thing are again of the same type, and they are continuous wherever they are defined. So in practice you compute the partials, observe that they are continuous, and conclude that the Jacobian really is the derivative.
That tells you how to read the counterexample of §1. It is not a warning about your daily calculations. It is a warning about what the definition has to be if the theorems are going to come out true. As for the proof, we have put it below rather than here because it needs the mean value theorem from Chapter 0.2 and adds nothing to the picture. It is written out in full, because this book does not say "it can be shown".
Grind box — the boundedness lemma, and continuous partials ⇒ differentiable
Lemma (linear maps are bounded). For any linear there is a constant with for all .
Proof. Write , so . By the triangle inequality and then Cauchy–Schwarz (Chapter 0.5) applied to the two lists of numbers and ,
with , a number depending only on . ∎
This innocuous fact is used constantly and silently. It is what lets us say , meaning that a linear map does not turn a negligible displacement into a non-negligible one. It is also where finite-dimensionality enters. In infinite dimensions (Chapter 4.4) linear maps can be unbounded, being the standard offender, and a great deal of quantum mechanics' technical difficulty descends from exactly that.
Theorem. If the partials of exist near and are continuous at , then is differentiable at .
Proof for , . The general case is the same argument with more terms. Write and . We want to reach a one-variable situation, where the mean value theorem is available, so split the total change into two moves, one along each axis, by adding and subtracting the corner value:
Each bracket changes only one variable, so each is a one-variable increment and the mean value theorem of Chapter 0.2 applies to it. There exist with
Now use continuity of the partials at : both evaluation points converge to as , so we may write and with . Then
and since and ,
That is exactly (0.6.4) with the Jacobian as the linear map. ∎
Now let's see where the counterexample of §1 fails this test. Its partials do exist away from the origin. But a short computation from (0.6.3) shows that they blow up like as you approach it, so they are nowhere near continuous at the origin. The hypothesis is not decorative.
The symbol hides a choice, and the notation gives you no warning that it has done so. In one variable there is nothing to hold fixed, so is unambiguous. In several variables the phrase "differentiate with respect to " is incomplete until you say along which direction. That is the same as saying what is being held constant, and the symbol does not say it.
Here is the cleanest possible demonstration, with no physics in it. Take the function on the plane, and describe the plane in two ways: by coordinates , and by coordinates where . Both are legitimate coordinate systems, and both contain a coordinate called . Now differentiate with respect to that in each of them:
Same function, same symbol , answers and . Nothing has gone wrong here. The two derivatives are taken along different directions. One runs along the line and the other along the line , and there is no reason for them to agree. The subscript is not fussiness. Without it the expression is not defined.
This is why thermodynamics is written the way it is. From the first law , holding fixed gives . But for an ideal gas the internal energy depends only on temperature, which is what Joule's free-expansion experiment showed, so . For air at atmospheric pressure the first is about and the second is exactly zero. Two genuinely different numbers wear the same-looking symbol, and generations of students have lost marks to the difference.
Now notice what the total derivative does to this problem. It dissolves it. is a single object that eats all displacement vectors at once and returns the corresponding first-order change. It does not privilege any direction, so there is nothing to hold fixed and nothing to suppress.
The ambiguity was never in the mathematics. It was in the decision to decompose a directionless object along a basis and then forget which basis. That is a second argument for treating rather than the partials as the fundamental object, independent of the first one in §1. The partials are its components, and components always presuppose a basis.
Here a decision taken on the first page pays for itself, and the debt is worth naming as it is settled. The derivative was defined as the coefficient of the best straight-line stand-in for a function rather than as the slope of a graph, at some cost in apparent fussiness. There is no such thing as the slope of a function of three inputs: there are infinitely many, one per direction, and no principle for preferring any. There is exactly one best linear stand-in. Let the displacement be a vector and the coefficient a linear map, and the definition transfers unchanged.
Everything downstream is a consequence of that substitution. The map, where it exists, is unique, and its array is the table of partial derivatives arranged with one row for each output and one column for each input direction. So the partial derivatives do rebuild the whole derivative, but only once its existence is known by some other route, which is what the trap was there to establish.
A second dividend is easy to overlook. The symbol for a partial derivative conceals which quantity was held fixed, and different choices give genuinely different numbers, as anyone who has lost marks in thermodynamics can attest. The total derivative accepts every displacement at once, so it has nothing to hold fixed and the ambiguity never arises.
3 · The gradient
Now let's specialise to a scalar-valued function, meaning . This is the case physics uses most: a temperature field, a potential, an action, a log-likelihood. Here is a linear map into the reals, which is called a linear functional. In Chapter 0.4's terms it is a linear map whose target happens to be one-dimensional. Its matrix is therefore a single row, .
A row of numbers looks like a vector lying on its side, and the temptation to stand it up is irresistible. Give in to it. But notice the step as you take it, because §4 is about what it costs. Standing the row up means pairing it with a column, and pairing needs a dot product, so use the standard inner product of Chapter 0.5 to define the gradient as the unique vector satisfying
That says what does, and now we want its components. They follow by feeding in basis vectors, exactly as in §2.2. Taking gives , and the left side of that is the -th component of . So
3.1 · Steepest ascent, derived from Cauchy–Schwarz
Let's ask the natural question. In which direction does increase fastest? To answer it we first have to say what "rate of increase in a direction" means. For a unit vector , the directional derivative is the rate of change of along ,
The middle equality there is (0.6.4) with , divided by , in the limit. It is the same computation as (0.6.7), with an arbitrary direction in place of a basis vector.
So the question has become a question about a dot product: over all unit , which one maximises ? That is precisely the question Cauchy–Schwarz answers, and we proved it in Chapter 0.5. For any two vectors,
We want a bound on , so apply that with and , remembering that makes the right-hand side collapse:
A bound is only useful if something reaches it, and the equality clause says both of these are reached. The upper bound is attained at , where . The lower bound is attained at . So, with nothing assumed and nothing waved at:
The direction of fastest increase of at is , and the rate of increase in that direction is . The direction of fastest decrease is the opposite one, with rate . So the gradient does not merely point uphill. Its length is the steepness.
This is the cleanest single payoff for having proved Cauchy–Schwarz. Now look at the other extreme of the same inequality. If then does not change at all, to first order, along . Those directions are worth a name, and they have a geometric meaning.
3.2 · The gradient is perpendicular to level sets
A level set of is a set . Think of an isotherm, an equipotential, or a contour line on a map. Let be any differentiable curve that lies inside one of them, so that for all . Our plan is to differentiate that identity, since a constant has derivative zero and that will hand us a statement about .
We can do the differentiation straight from the definition, which has the side benefit of proving the special case of the chain rule we will need repeatedly. Expand to first order as , and feed the result into (0.6.4):
The boundedness lemma of §2 was used there to absorb into . Now compare that last line with the one-variable definition of a derivative in . The coefficient of is the derivative, so we can read it straight off:
That holds for any curve at all. Now impose the extra condition that our curve lies in a level set. Then is the constant , so the left side is , and we are left with
The velocity of such a curve is exactly what we mean by a vector tangent to the level set. So is orthogonal to every tangent direction of the level set through . The gradient is perpendicular to the level surface, and points across it in the direction of increase.
The two facts fit together into one picture. Contours are the lines along which nothing changes. The gradient is perpendicular to them. And it is longest where the contours are closest together, because that is where a small step changes the most. The figure below is that picture, with the arithmetic exposed so you can check it rather than believe it.
For a function returning a single number the linear stand-in is a row rather than a square, and a row of numbers is very hard not to stand upright and call a vector. Do so, then ask which direction increases the function fastest, and the question becomes the one the overlap inequality of the previous chapter answers exactly. An overlap with a direction of unit length is largest when the two are parallel, and its size is then the length of the other. So the steepest direction is the gradient's own, and the rate of increase along it is the gradient's length. The arrow does not merely point uphill; how long it is is how steep the hill is.
The complementary statement comes out of the same computation. Travel along a curve on which the function never changes, and its rate of change along that curve is zero, which says the gradient has no overlap with any direction tangent to such a curve. The gradient is therefore perpendicular to the contours and crosses them by the shortest route available.
The two facts assemble into one picture a walker would recognise. Contours are the lines along which nothing happens, the arrow cuts squarely across them, and it is longest precisely where they crowd together, since crowded contours are where a short step buys the largest change.
4 · The gradient is really a one-form — and why you must care
Go back to (0.6.10) and look at what was actually done there. We had a perfectly good object, the linear map , which eats a displacement vector and returns a number. We converted it into a vector, , by demanding that dotting with that vector reproduce the map. The conversion required a dot product. It could not have been done without one.
So let's separate the two objects and take them one at a time. First the one that came for free. It deserves its usual name, so write
with a sum over . The object is a one-form, also called a covector. It is a linear machine that eats a vector and returns a number. In Chapter 0.4's language it is nothing but a linear map whose target happens to be one-dimensional. Such maps can be added and scaled, and the result is another one, so they form a vector space in their own right. That space is called the dual space , and Chapter 2.4 will treat it properly.
What matters here is that is defined by alone. No inner product, no notion of length and no notion of angle went into (0.6.18). All that went in was the pairing of a displacement with a rate of change, which is exactly what a physical derivative is. This is also the honest definition of the you have been cancelling since school, and Chapter 0.1's warning callout promised you it would get one here.
The gradient, by contrast, is defined by two things: and an inner product. Look at the index positions, which are about to earn their keep. In (0.6.18) the components of a vector carry an upper index. The components of the one-form carry a lower one. And the two are summed against each other to make a number.
Now let's make the inner product explicit, so that we can see it appear in the formula for instead of hiding in it. Given a basis, bilinearity determines an inner product completely by what it does to basis vectors. Write and and expand:
The array is called the metric in that basis. It is symmetric because the inner product is. It is also invertible, because the inner product is non-degenerate: if some had for all , then would be orthogonal to everything, including itself, and so . Both index positions are down, which matches the fact that the metric eats two vectors.
We now have everything we need to see the cost of the gradient. Our goal is to solve (0.6.10) for the components of , so write that defining relation out in these components:
Both sides are sums over , and the statement holds for every , so the coefficients of each must agree: . That is a linear system for , so solve it by multiplying through by the inverse matrix , which exists because the inner product is non-degenerate:
There it is, in the open. Converting the one-form into the vector is exactly the act of contracting with the inverse metric. It is called raising an index, and it is not free.
In Cartesian coordinates on Euclidean space , so and (0.6.21) reads . The components are then numerically identical and the distinction is invisible. That invisibility is why the gradient is usually taught as a vector, and why the whole issue can seem like pedantry. It is not pedantry. Here are three places where it stops being invisible:
- Non-Cartesian coordinates, immediately. In plane polar coordinates the metric is , so and the gradient's angular component is rather than . If you have ever wondered where the stray in the polar gradient formula comes from, it comes from here. The grind box does the calculation.
- Relativity, permanently. The Minkowski metric has signature (Chapter 2.3), so raising a spatial index flips its sign: . No coordinate choice makes this go away, because no coordinate choice makes the metric the identity. From Chapter 2.4 onward, upper and lower indices are different objects, and mixing them is an error rather than a style preference.
- Curved space, structurally. On a manifold (Chapter 3.2) there is no inner product at all until you supply one, and supplying one is the gravitational field (Chapter 3.3). So on a manifold exists always, and exists only once gravity has been specified. That is a statement about physics rather than about notation.
You have just met your first covector, and it was hiding inside the most familiar object in vector calculus. The rule to carry forward is short. Differentiation naturally produces lower indices. Vectors naturally carry upper ones. The metric is what converts between them, and when the metric is the identity you cannot see the conversion happening. Chapter 2.4 makes this a formal convention, and Chapter 3.2 makes it unavoidable. Nothing more is needed here.
Grind box — the polar gradient, derived rather than memorised
In plane polar coordinates the squared length of a small displacement is, by Pythagoras on a radial step and a perpendicular arc ,
Inverting a diagonal matrix is easy: . So by (0.6.21) the gradient's components in the coordinate basis are
Those are components in the coordinate basis, and the formula in the textbooks is written in the unit basis, so one more step is needed. The coordinate basis vector is not a unit vector, because moving one unit of moves you a distance . Its normalised version is therefore , which we can rearrange to . Substituting that in,
That is the formula printed on the inside cover of every vector-calculus text, and you have just derived it. There are two morals. First, the notorious is not a quirk of polar coordinates. It is one factor of from raising the index and one factor of from normalising the basis vector. Second, and this is the part that matters later, the " scale factors" that vector-calculus books ask you to memorise for cylindrical and spherical coordinates are nothing but the diagonal entries of the metric. Chapter 3.3 replaces the table with the metric and never mentions scale factors again.
Two sanity checks. For we get , which is right: the fastest way to increase your distance from the origin is to move directly away from it, at unit rate. For we get , which correctly says that far from the origin you must travel a long way to change your bearing.
Look again at the step where the row was stood upright, because something was spent unnoticed. What differentiation naturally produces is a measuring device: it accepts a displacement and returns the resulting change, needing no notion of length or angle to do so. This is also the honest account of the symbols people have been cancelling since school. Turning it into an arrow required a rule for converting one into the other, and that rule is extra structure, assumed rather than derived. In square coordinates on flat space it is the identity, so device and arrow carry identical numbers and the conversion cannot be seen.
Step outside them and it becomes visible at once. In polar coordinates the conversion divides the angular part by the square of the radius, which is where the notorious reciprocal in the memorised polar formula comes from, one factor from the conversion and one from the angular basis direction not being of unit length. In relativity the conversion reverses the sign of every spatial part, and no coordinates remove it.
The rule to carry forward is short. Differentiation produces measuring devices, arrows are a different species, and the metric converts between them. On a curved space no such object exists until somebody supplies one, and supplying it is what specifying a gravitational field means. The measuring device is always there; the arrow is not.
5 · The chain rule in several variables
Chapter 0.1 derived the chain rule by composing two linear approximations and observing that linear maps compose by multiplication. In one dimension "multiplication" meant multiplying two numbers. Here it means composing two linear maps, which by Chapter 0.4 means multiplying two matrices. The derivation is word-for-word the same, so let's do it and watch the matrices appear.
Let be differentiable at and differentiable at . We want the derivative of the composition, so nudge the input by and follow the nudge through both maps in turn. First, moves its output by
That displacement is what arrives at the input of , so the next step is to feed it in there, using 's own linear approximation at and then substituting for :
Two small steps hide in that last line, and both are the boundedness lemma. First, applied to something is again . Second, for small by (0.6.22), so anything that is is also .
The last line now has the exact shape of the definition (0.6.4), with a linear map sitting where the derivative belongs. Uniqueness (§2.1) says that map has no choice but to be the derivative, so we can read the coefficient off:
In matrices that reads: an Jacobian times a Jacobian gives an Jacobian. The inner dimensions match automatically, because the output space of is the input space of , so the shapes cannot be wrong. This is one of the reasons to think of the derivative as a map rather than as a table of numbers. The bookkeeping is enforced by the structure.
5.1 · The case you will use every day
Let be a curve in and a scalar field. Then is a function of one variable, is the column , and is the row of partials, so (0.6.24) reduces to a row times a column:
which is (0.6.16), now obtained as a special case rather than from scratch. This is the workhorse of the chapter. It is how you compute the rate of change of a temperature felt by a moving thermometer, or of a potential felt by a moving charge, or of a Lagrangian along a trajectory. Chapter 1.2 opens with it.
5.2 · Changing coordinates, and a convention appearing on its own
Now the case that runs all of tensor analysis. Suppose the are themselves functions of new coordinates . Think of polar coordinates written in terms of Cartesian ones, or of one observer's coordinates written in terms of another's. We want to know how a rate of change looks in the new coordinates, so take (0.6.24) and write it out entry by entry:
Three things about that equation deserve to be noticed now rather than in Chapter 2.4.
It is a matrix product. The object is the Jacobian of the coordinate change, and (0.6.26) says: to convert the components of from one coordinate system to another, hit them with that Jacobian. That single sentence, promoted to a definition, is what a tensor is.
The summation happens by itself. The index appears twice on the right and is summed over. The index appears once on each side and is not summed. That pattern is not a coincidence of this particular formula. It is what always happens when you compose linear maps, because matrix multiplication sums over the shared index. Chapter 2.4 will therefore drop the entirely and adopt the Einstein summation convention, under which a repeated index is summed. The convention is possible because the pattern is universal, and the pattern is universal because everything in sight is a composition of linear maps.
The index heights are already right. Look at where the repeated index sits. It is upstairs in , in the numerator, and downstairs in , in the denominator. The rule of §4 was that differentiation lowers and coordinates raise, so one of the pair is up and the other is down. This is not luck. It is (0.6.21) and (0.6.18) telling you that the only combinations that can be summed to give a coordinate-independent number are one-up-one-down. In Chapter 2.4 that becomes a rule you can use to check your algebra. If you have written down a formula with two indices at the same height summed against each other, you have made a mistake.
Composing two functions near a point amounts to composing their linear stand-ins, and that sentence was already the entire chain rule when one variable was in play. All that changes with several is what composing linear maps means, which the linear algebra chapter settled: their arrays are multiplied. The derivation is the earlier one word for word. As a bonus the bookkeeping can no longer go astray: the output space of the inner function is the input space of the outer, so the shapes are forced into agreement.
Written out with indices for the case that governs everything later, in which the coordinates are themselves functions of new coordinates, the same formula says how the components of a rate of change convert from one coordinate system to another. Promoted to a definition, that single sentence is what a tensor is, and the concept holds nothing else.
Two habits appear here of their own accord rather than by decree. One index is always repeated and summed while the others are not, because that is what composing maps does, which is why the summation sign is eventually dropped as redundant. And the repeated index turns up once as a measuring device and once as an arrow — the only pairing yielding a number that survives a change of description, and later the quickest way to catch an error.
6 · Second derivatives, the Hessian, and what a critical point looks like
So far everything has been first order. Let's go one order further, because that is where the shape of a function near a point lives. Differentiate a partial derivative again and you get a second partial, written or . There are of them, and the first question to settle is whether the order of differentiation matters.
6.1 · Clairaut's theorem, with the hypothesis said out loud
If the second partial derivatives of exist in a neighbourhood of and are continuous at , then
The continuity hypothesis is real. The grind box below both proves the theorem and exhibits a function for which the two mixed partials at the origin come out as and . But for every function you will meet in this book the hypothesis holds, so second partials commute and the matrix of them is symmetric. That matrix is the one we will work with from here on, and it has a name:
It is the Hessian. Note what it is structurally. The gradient is a map , and is its Jacobian. So the second derivative of a scalar field is the derivative of a vector field.
Grind box — proof of Clairaut, and the counterexample when continuity fails
Proof. Work in the two relevant variables and call them . Consider the double difference across a small rectangle of sides :
It is symmetric under swapping the roles of the two variables, and we will evaluate it in the two possible orders. First group it as a difference in of the function , so . By the mean value theorem (Chapter 0.2) there is with , i.e.
We now want a second derivative out of that, so look at the bracket. It is a difference in of the function , so the mean value theorem applies to it as well, giving with
Now group the other way, as a difference in first. The identical argument gives with . Equate the two, divide by , and let . Both evaluation points converge to , and by the assumed continuity of the two second partials at both sides converge to their values there. Hence . ∎
The counterexample. Continuity was used in the very last step of that argument, so removing it ought to break the theorem, and it does. Take
This one is continuous, and differentiable, and has second partials everywhere. Compute in general and then restrict it to the -axis: a short calculation gives . Restricting to the -axis gives . Therefore
The mixed partials at the origin differ. What fails is precisely the hypothesis. Away from the origin the second mixed partial is a bounded but direction-dependent function of , which is the same pathology as §1's counterexample one derivative further up. So it has no limit at the origin and is not continuous there. The theorem is not true for free. It is true under a condition, and the condition is exactly what stops direction-dependence from surviving to the limit.
6.2 · Taylor to second order
We already have all the machinery for this, and the trick is to turn the several-variable problem into a one-variable one. Fix and and define the one-variable function , which traces along the straight line through in the direction . Our goal is 's first two derivatives, since Chapter 0.3's Taylor theorem will then do the rest. Differentiate it with the chain rule (0.6.25), noting that the "velocity" of the line is the constant vector :
That is the first derivative, and we want the second. Each in it is itself a scalar field evaluated along the same line, so apply the same chain rule to each of them in turn:
We have and both derivatives at , which is everything Taylor needs. So apply the one-variable Taylor theorem of Chapter 0.3 to about , and then evaluate the result at , which lands exactly on :
Look at what that boxed line contains. Three terms: a constant, a linear form, and a quadratic form. That is the general shape of a smooth function near a point. It is also why quadratic forms, which were Chapter 0.5's whole subject, are not an algebraic curiosity. They are the universal local model of everything.
6.3 · Critical points, classified by eigenvalues
A critical point is a point where , meaning that no direction changes to first order. Every maximum, minimum and saddle is one. The reason is that if you can increase by stepping along it and decrease by stepping the other way, so you are not at an extremum. Now put into (0.6.30). The linear term drops out, and what is left is
So the local behaviour is decided by the sign of the quadratic form . A quadratic form with cross terms in it is hard to read a sign off, so we want a basis in which the cross terms disappear. Clairaut has already given us one: is symmetric, which is exactly the hypothesis of the spectral theorem of Chapter 0.5. That theorem supplies an orthonormal basis of eigenvectors of , with real eigenvalues . Expand the displacement in that basis as , and the quadratic form collapses to a sum of squares:
All cross terms are gone. The classification now reads itself off:
- All : then with , so the quadratic term is positive and of order , while the remainder is and therefore eventually smaller. For small enough the difference in (0.6.31) is positive in every direction: a strict local minimum.
- All : the same argument with the signs reversed, giving a strict local maximum.
- Mixed signs: a saddle. Along an eigenvector with the function rises, and along one with it falls. It is a maximum and a minimum at the same point, depending on which way you look.
- Some : the test is silent. The quadratic term vanishes in that direction, so the remainder decides, and we have no control over it. You need higher order. Chapter 6.6's Higgs potential is exactly such a case at its minimum, where the potential is flat along the direction the vacuum is free to rotate in, and what happens in that flat direction is the entire physics. (At the symmetric point the Hessian is strictly negative, so that point is an ordinary maximum and the test is not silent there.)
The eigenvectors are not bystanders in this, and here is the calculation that shows what they mean. Take a displacement along one of them by setting in (0.6.31). Since , we get
Along the -th eigenvector, then, is a one-dimensional parabola whose second derivative is . The eigenvalues of the Hessian are the curvatures of along the principal directions, and the eigenvectors are those directions.
Near a minimum this makes the level sets ellipsoids. Setting gives semi-axes , so a small eigenvalue means a long axis, which is a shallow and extended valley in that direction. Hold onto the picture of a long thin valley. The next callout is about nothing else.
You already read Hessians for a living. When a model is fitted by maximum likelihood, the software finds where the gradient of the log-likelihood vanishes, and then reports standard errors. Those standard errors are §6.3, exactly.
At the maximum, has all eigenvalues , since that is what "maximum" means by §6.3. So is positive semi-definite, and it gets its own name: the observed Fisher information, . The estimated covariance matrix of the estimate is its inverse, and the reported standard errors are
Read that as geometry and it says something you can feel. The curvature of the log-likelihood surface at its peak is the precision of the estimate. A sharp peak means large curvature, so large and small , and that is a tight confidence interval. A flat peak is a wide one. The data's ability to distinguish parameter values is the steepness with which the likelihood falls away from the best fit.
The one-parameter case, checkable by hand. For exponentially distributed survival times with rate and no censoring, . Setting gives , and , so and
The familiar is the statement that doubling the sample doubles the curvature.
Observed versus expected, and the distinction is not cosmetic. The expected Fisher information is , an average of the curvature over all datasets the model could have produced. The observed information is evaluated on the dataset you actually have, at the estimate you actually got. They agree in expectation, and both are consistent. In the exponential example above they happen to be identically equal, because contains no data. In general they differ. Efron and Hinkley's argument, which has held up, is that the observed information is the better variance estimate for the sample in hand, because it conditions on what you actually saw rather than averaging over what you might have seen. Most software reports the observed version by default. It is worth knowing which one you are quoting.
The spectral reading, which is where Chapter 0.5 earns its place. Diagonalise . Then , and the variance of the linear combination is exactly . So the eigenvectors of the Hessian are the directions in parameter space along which the data constrain you best and worst, and the reciprocal eigenvalues are how badly.
Two collinear covariates make this concrete. Fit with Gaussian noise of known variance . Then is times a sum of squares, and . To see the effect at its starkest, suppose and the two columns are nearly identical, so that
The eigenvalues are , with eigenvector , and , with eigenvector . So the sum is pinned down with variance , while the difference is known only with variance , two hundred times worse. The normalisation matters here: the eigenvector is a unit vector, and it is the variance along it that is .
That is the long thin valley of §6.3, and it is what "the two predictors are collinear" means geometrically. The likelihood has a nearly flat direction. The reported standard errors are each, which is seven times larger than the naive you would get by inverting the diagonal instead of taking the diagonal of the inverse. That factor of seven is , where is the correlation between the two estimates. Here , and . Inverting first and taking the diagonal second is not a convention. It is the only way the off-diagonal curvature can reach the answer.
One order further in the approximation and every smooth function near a point becomes the same three things: a constant, a linear part, and a quadratic part built from the array of second derivatives. That array is symmetric whenever those derivatives are continuous, and symmetric is exactly the hypothesis the previous chapter spent its length on. So the quadratic part falls apart into independent pieces: along each of a set of mutually perpendicular directions the function is an ordinary parabola, and the numbers belonging to those directions are its curvatures.
The classification then reads itself off. Curving upward in every direction is a minimum, downward in every direction a maximum, and mixed signs a saddle, which is a maximum and a minimum at once, depending on where you stand. A curvature of zero leaves the matter unsettled and hands it to higher order, no idle case: it is where a mechanism for breaking a symmetry eventually lives.
Read curvature as information and it says something you can feel. A sharp peak means its location is well determined and a flat one means it is not, so the curvature of a likelihood surface at its maximum is the precision of an estimate, and the width of a confidence interval is the shallowness of a hill. A long shallow valley is what two nearly redundant predictors look like from the inside.
7 · Lagrange multipliers
Now the constrained problem. We want to extremise subject to . The recipe for doing that is famous, and it is usually handed over as a recipe. We are going to derive it instead, in three sentences of geometry, and then extract something from it that the recipe hides.
Let be a point on the constraint surface at which is extremal among points of , and assume . We need two facts, and both of them have already been proved.
Which directions are tangent to . If is a curve lying in then , so (0.6.16) gives . Every tangent vector to is therefore orthogonal to . The converse says that every vector orthogonal to is the velocity of some curve in , and that is the implicit function theorem, ⚑ which we quote. It is guaranteed by the assumption , which is what says the constraint really does cut down the dimension by one near . So the tangent space to at is exactly .
What extremality says. If is a curve in through , then has an extremum at that point, so its derivative vanishes and . Moving along the constraint surface cannot change to first order, because that is what being extremal on means. So is orthogonal to every tangent vector of .
Now let's put the two facts together. The plan is to show that has nothing left over once you remove its component along , and Chapter 0.5's orthogonal projection is the tool for separating those two pieces. Write and split into its component along and whatever remains:
The residual is orthogonal to by construction, since . So by the first fact, is a tangent vector to . But the second fact says is orthogonal to every tangent vector, and that includes itself. Dot the split with and see what happens:
A vector of zero length is the zero vector, so . Feeding that back into the split leaves with only its component along , which is the result we were after:
Notice that the argument even handed us the multiplier explicitly, as . That is worth remembering when you want to check a solution rather than find one.
The geometric statement is the one to carry away. At a constrained extremum the level set of is tangent to the constraint surface, since both have the same normal direction. Suppose instead that they crossed. Then you could slide along the constraint from one side of the -contour to the other and change , so you were not at an extremum after all. Press the button in the §3 figure and this is exactly what you are looking at.
The mechanical version everyone quotes follows immediately, and it comes from packaging the two conditions and as the critical-point equations of a single function. Define
and look for its unconstrained critical points. Setting gives . Setting gives back . So the constraint has been converted from a restriction on the search space into one more equation to solve, at the price of one more unknown.
That trade is worth pausing on. You may restrict the space, or you may enlarge it and add a multiplier. It is one of the deepest moves in theoretical physics. It returns in Chapter 1.2 as the way to handle a bead on a wire, and again, much later, as the way gauge symmetry is imposed.
7.1 · The multiplier means something
looks like a bookkeeping device you introduce and then discard. It is not, and here is how to see what it measures. Let be the constrained optimum as a function of the constraint level , and let be the optimal value. Assume varies differentiably with , which it does under the same non-degeneracy that made the multiplier exist. We want to know how the best achievable value responds to a change in , so differentiate using the chain rule (0.6.25):
where the second step used (0.6.36). That has left us needing the quantity , and the constraint itself will supply it. Differentiate with respect to , which is the same chain rule applied to an identity holding for all :
The awkward factor is exactly . So substitute (0.6.39) into (0.6.38), and everything on the right except the multiplier disappears:
So the multiplier is a sensitivity. It is the rate at which the best achievable value improves when you relax the constraint by one unit. Economists call it a shadow price. In mechanics it is the constraint force, and in thermodynamics, as Worked example 1 will show, it is the temperature. A large says the constraint is expensive and worth negotiating, and says the constraint is not binding at all.
Let's check that on a case small enough to do by hand, which is also the figure's setup. Minimise subject to . Then (0.6.36) reads , so and . Putting those into the constraint gives , hence and . The optimal value and its derivative are then
Take for a specific number. The optimum is , with and . That is the number printed in the figure when the constraint is showing.
Grind box — when Lagrange fails, and why the fine print is the interesting part
The derivation used twice: to know the tangent space is a genuine hyperplane, and to invoke the implicit function theorem. Drop it and the method can be wrong. Minimise subject to
The constraint set is the curve , a cusp at the origin, defined only for . The minimum of on it is at the origin. But there , while everywhere, and no satisfies . The method returns nothing, and the answer it failed to find was sitting at the origin all along.
The condition is called a constraint qualification. The moral is that the multiplier exists because the constraint surface is smooth and non-degenerate there, rather than because algebra says so. Where constraints are degenerate, the multiplier framework needs repair. That is not an exotic case. In gauge theories the constraints are degenerate by design, because a gauge symmetry means several different field configurations describe the same physics. Handling that properly is what Dirac's constrained-Hamiltonian machinery and the Faddeev–Popov procedure exist to do, and every one of those is a descendant of (0.6.36) plus an honest accounting of when it breaks.
Several constraints. With the argument is identical word for word, with replaced by the subspace and the one-line split (0.6.34) replaced by Chapter 0.5's orthogonal projection onto . Tangent vectors are those orthogonal to every . The residual is one of them, and extremality kills it exactly as before. What survives is
with the qualification now reading "the are linearly independent at ", which is Chapter 0.4's notion of independence doing real work. Worked example 1 uses two constraints and therefore two multipliers, one of which turns out to be the temperature.
The rule for optimising under a constraint is famous as a recipe and is not a recipe at all. Being extremal along a surface means that no motion within the surface changes the function to first order, which says the gradient has no component in any direction you are still permitted to move. What remains of it must point straight out of the surface, and pointing straight out of the surface is exactly what the constraint's own gradient does. So the two are parallel, and the number relating them is the multiplier. There is nowhere left to go, and the equation is that sentence written down.
Put geometrically it stops being clever and becomes obvious. At the answer, the contour of the function touches the constraint rather than crossing it. Anywhere the two cross you can slide along the constraint from one side of the contour to the other and change the function, so you were not yet at the answer.
The multiplier is not a device introduced and then discarded. It measures how much the best achievable value improves when the constraint is relaxed by one unit, which makes it a price. Economists call it a shadow price, mechanics the force the constraint exerts, and thermodynamics, in one celebrated instance, the temperature. A multiplier of zero says the constraint was never binding.
8 · Change of variables and the Jacobian determinant
Here is the last consequence, and it is the one that pays a debt from Chapter 0.2. Let be a differentiable, injective change of coordinates with . The question is: how does an integral transform under it?
That last condition earns a name, because two later chapters lean on it directly and it is worth having stated rather than assumed. If is invertible then itself is invertible on some neighbourhood of , with a differentiable inverse whose derivative there is . That is the inverse function theorem, and it says the obvious thing: near a point, the map is its linear part, and a linear part you can undo is an undoable map. ⚑ The proof is a contraction-mapping argument that belongs to a real analysis course, so it is quoted here. It is equivalent to the implicit function theorem quoted in §7, and Chapter 1.3 spends it twice — once to ask when velocities can be traded for momenta, and once to identify the Hessian that decides it.
The answer is forced by two things we already have, so let's set them side by side. First, from §2, near any point the map is a linear map, up to an error that dies faster than the displacement:
Second, from Chapter 0.4, a linear map takes a region of volume to a region of volume . That is what the determinant is: the signed factor by which a linear map scales volume. The absolute value is there because volume does not care about orientation.
Now put the two together. Chop into tiny cubes of side . The cube at is a set of displacements of size at most , so (0.6.42) says its image under is a parallelepiped, namely the image of the cube under the linear map , translated to , with a distortion that is small compared to . Apply the second fact to that parallelepiped and its volume is
That is the statement about one cell, and an integral is a sum over cells. So sum times that volume over all the cubes and let . Doing so turns the Riemann sums of Chapter 0.2 on one side into the Riemann sums on the other, and what comes out is
Check it against the one-dimensional case you already know. There , and the formula is the substitution rule of Chapter 0.2, with the absolute value doing the job that reversing the limits of integration does there. The factor is called the Jacobian determinant. It is the local volume-magnification of the coordinate change, and it is nothing more mysterious than that.
Grind box — what that argument does and doesn't establish
The chop-and-sum argument is the right picture and it is how every physicist thinks about the Jacobian, but it is not a proof, and it is worth being clear about where the gap is.
Two things were glossed. (i) Uniformity. The in (0.6.43) must shrink at a rate that does not depend on which cube you are looking at. Otherwise summing a large number of small errors need not give a small total. This is delivered by continuity of on a compact region, which is the usual hypothesis. (ii) The boundary. Cubes that straddle the edge of are only partly inside, and one must show their total contribution vanishes. It does, because the boundary of a reasonable region has -dimensional volume zero. But "reasonable" needs defining, and doing that properly is where measure theory enters and where the theorem is genuinely a theorem.
What the argument does establish, and what you should take from it, is the mechanism. The appears because differentiability means local linearity, and because determinants are what linear maps do to volume. Change either fact and the formula changes with it.
8.1 · Polar coordinates — paying Chapter 0.2's debt
In Chapter 0.2, deriving the Gaussian integral, we needed the polar area element and obtained it geometrically, by differencing two circular sectors. It was an honest argument, but it was special to the plane and to circles, and the chapter explicitly said that Chapter 0.6 would produce the same factor mechanically. Here is that promise kept.
The plan is to write down the map, take its Jacobian, and take the determinant of that. So take . Its Jacobian is a matrix of partials, computed by the rules of §1, which is to say by differentiating each output with respect to each input:
What we want from that matrix is the volume factor, which means its determinant. Take it by the rule of Chapter 0.4, and use at the end:
The general formula (0.6.44) asks for the absolute value of that, and makes the absolute value do nothing. So the area element in polar coordinates is
That is the factor Chapter 0.2 used on faith, now derived from the definition of the determinant. The debt is paid, and the derivation cost three lines instead of a picture.
Notice that it also explains the geometric argument rather than replacing it. The columns of (0.6.45) are the displacement produced by a unit change in , which has length and points radially, and the displacement produced by a unit change in , which has length and points tangentially. Those two are perpendicular, so the parallelogram they span has area . The determinant computed the area of the little polar cell, which is precisely what the sector argument computed by hand.
8.2 · Spherical coordinates
The same procedure works in three dimensions, and it is worth doing once because the answer is one you will use constantly. Take , and , with measured from the -axis as physics always does. Differentiating each output with respect to each input gives
We want that matrix's determinant, and we may expand along whichever row or column is cheapest. The bottom row has a zero in it, so expanding along it costs only two cofactors instead of three. Start with the entry, which multiplies
after using . The other surviving entry is , and with the alternating sign it multiplies . That is both cofactors, so add the two contributions to get the determinant:
using once more. Feed that determinant into (0.6.44) and the volume element in spherical coordinates is
This is positive for , so once again the absolute value takes care of itself. Problem 1 uses this to compute the volume of a sphere, which is the cheapest possible check that the factor is right.
8.3 · The same factor, in general relativity
One forward glance, because the connection is exact rather than analogical. In curved spacetime the invariant volume element is written , where is the determinant of the metric. It is negative because of the Lorentzian signature, which is why there is a minus sign under the root. That is (0.6.44) wearing different clothes.
You can see that without any relativity at all, using the flat-space metrics of §4 and comparing them with the two determinants we just computed. In plane polar coordinates , so
which is exactly the factor in (0.6.47). Now try the same thing one dimension up. In spherical coordinates the metric is , so , and its determinant gives
which is exactly (0.6.51). The agreement is not a coincidence of these two examples. The reason is structural, and Chapter 3.5 §6.2 will show it. Under a coordinate change the metric picks up two factors of the Jacobian matrix, so its determinant picks up and picks up . That is precisely what cancels the that acquires. The combination is therefore the same in every coordinate system, which is what "invariant volume element" means. The Einstein–Hilbert action of Chapter 3.6 carries that factor for this reason and no other.
The same turns up every time you change variables in a path integral (Chapter 5.7). There it is no longer a nuisance factor but the whole story. The Faddeev–Popov ghosts of non-abelian gauge theory are the Jacobian determinant of a change of variables, promoted to a field.
Near any point a differentiable map is a linear map, to within an error dying faster than the step you took; and a linear map multiplies every volume by its determinant. Those two facts settle the last question. Chop a region into cells small enough for the first to hold, apply the second to each cell, and the factor appearing in every change of variables is the size of that determinant, which is a local volume magnification and nothing more mysterious.
Two familiar weights thereby stop being items to memorise. The radial factor in plane polar coordinates and the more elaborate one in spherical coordinates both fall out of a short calculation, and the first repays a debt taken out several chapters ago, where it had to be got by cutting up a circle by hand. The same quantity returns in curved spacetime as the square root of the metric's determinant, which is why the volume element of general relativity looks as it does.
That closes the toolkit's account of change. A rate of change is a linear approximation; the description worth having is the one in which a problem separates into pieces that ignore each other; and changing description costs a determinant. What is missing is any account of accumulating a quantity across a region rather than at a point, and that is where the next chapters go.
9 · Worked examples
A system can be in states with energies . All you know is that the probabilities sum to one and that the mean energy is . What distribution should you assign?
The principle to use is due to Gibbs and was sharpened by Jaynes. Choose the distribution that maximises the entropy , which is the distribution that is maximally noncommittal about everything you were not told. That is a constrained maximisation, exactly what §7 handles. So maximise subject to
Two constraints, two multipliers. Form the Lagrangian of the grind box in §7, calling the multipliers and :
The variables are the numbers , so take partial derivatives. Using :
Look at the two factors separately. The first carries no , so it is the same for every state, which means normalisation alone will fix it. Imposing gives with
That is the Boltzmann distribution. The quantity arrived as nothing more grand than a normalisation constant, and it is the partition function, from which all of equilibrium thermodynamics is extracted by differentiation. For instance , which is the second constraint restated and is what implicitly determines .
Is it a maximum? §6 answers this without any extra work. The Hessian of with respect to the is , a diagonal matrix with all entries negative, so all its eigenvalues are negative and the critical point is a genuine maximum. Being diagonal, it leaves the spectral theorem with nothing to do, since the eigenvalues are the diagonal entries. It is still §6.3 doing the work.
What is. It arrived as a multiplier on the energy constraint. By (0.6.40), a multiplier is the sensitivity of the optimum to its constraint level, so here
That is the rate at which the maximum attainable entropy rises when you feed the system more energy. We now want to know what that rate is in physical terms, so compare it with the thermodynamic definition of temperature, . Thermodynamic entropy is times the information entropy used above, so , giving
This is the honest route to that identification. We did not define as and then justify the choice. It emerged as a Lagrange multiplier, and it is identified with inverse temperature because §7.1 says multipliers are sensitivities and thermodynamics says is one over the temperature. Temperature is a shadow price.
Two remarks are worth carrying away from this. First, that calculation is most of statistical mechanics. Everything else is evaluating for particular energy spectra and differentiating it.
Second, look at the shape of the answer. It is a probability proportional to , normalised by a sum over all possibilities. In Chapter 5.6 the path integral assigns to each history a weight , normalised by a sum over all histories. The structures are the same down to the last symbol, with in place of . And the substitution that converts one into the other is the reason a quantum field theory at finite temperature and a statistical mechanics problem in one extra dimension are the same computation.
Find and classify all critical points of .
Locate them. A critical point is where the gradient vanishes, so set both partials to zero and solve:
Substituting the first of those into the second gives , so , and over the reals that means or . Reading off the matching , the critical points are
with and .
The Hessian. To classify those three points we need the matrix of second derivatives, so differentiate the gradient again:
It is symmetric, as Clairaut promised. We may as well check that directly: and . ✓
At the origin. . Its eigenvalues solve , so . The eigenvectors can be found by inspection, since and . So
Mixed signs: a saddle. And (0.6.33) says exactly what it should look like. Check it against the function directly. Along the displacement ,
which falls for small . Along we get , which rises. The quadratic terms match the prediction as well. The displacement has component along the unit eigenvector, so (0.6.31) predicts , which is exactly the above. ✓ Likewise in the other direction.
At . . The eigenvectors are the same as before, because any matrix of the form with has eigenvectors and . Only the eigenvalues have changed:
Both are positive, so this is a local minimum. The principal curvatures are and , so the valley floor is twice as stiff across the diagonal as along it. The elliptical contours around the minimum therefore have semi-axis ratio , and the long axis runs along , which is the soft direction. By the symmetry the point is an identical minimum.
What you have just drawn. Two degenerate minima of equal depth, related by a symmetry, with a saddle sitting at the symmetric point between them. That is the double well, and it is the entire mechanism of spontaneous symmetry breaking. The potential respects the symmetry , but the system must sit in one minimum or the other, and so the system does not.
Now look once more at the soft direction along at the minimum, the one belonging to the small eigenvalue. It is the direction along which the system is easiest to excite. In Chapter 0.8 that becomes the lowest normal mode. In Chapter 6.6, where the symmetry is continuous rather than discrete and the soft direction becomes exactly flat, it becomes a massless Goldstone boson. The eigenvalues of a Hessian are, quite literally, masses squared.
10 · Your turn
Problem 1 — the spherical volume element, and a check
Verify the Jacobian determinant for spherical coordinates by expanding (0.6.48) along its first column instead of its last row (you should get the same answer). Then use (0.6.51) to compute the volume of a ball of radius , and the surface area of a sphere of radius .
Solution
The determinant. Expanding along the first column, with entries , , and signs :
The first two lines give , and the third gives . Adding them, . ✓ Same answer, as it must be, since the determinant does not know which row you expanded along.
Volume. Now integrate that element over the ball. The integrand factorises completely, so the triple integral is a product of three one-dimensional ones:
Those three factors are , then , and then . Multiplying them together,
Area. Fix ; the surface element is what remains after dropping and setting , namely , so . Note that , which is not a coincidence: growing the ball by adds a shell of area and thickness . That is the fundamental theorem of Chapter 0.2 in three dimensions, and Chapter 0.7 turns the observation into the divergence theorem.
The is doing something physical, incidentally. It says that a patch of near the pole covers less area than the same patch at the equator, because the circles of constant shrink to points there. Any map projection you have ever complained about is a fight with this factor.
Problem 2 — the Coulomb field as a gradient
Let where , defined for . (a) Compute . (b) Verify that it is perpendicular to the level sets of . (c) At the point , give the direction of steepest ascent of and the rate of increase in that direction. (d) Interpret .
Solution
(a) Since depends on the coordinates only through , the useful first step is . From , differentiate both sides with respect to to get , so , and likewise for and . Compactly, . That is reassuring: the direction of fastest increase of distance from the origin is straight outward, at unit rate. Now apply the chain rule of §5.1 with :
(b) The level sets are the spheres . A curve on such a sphere has constant, so differentiating gives , so tangent vectors to a sphere are perpendicular to the radius. And is parallel to the radius. Hence . ✓ That is (0.6.17) confirmed in a case where you can see both objects at once.
(c) Evaluate the gradient at the given point. At we have , so
By §3.1 the steepest-ascent direction is , which is a unit vector pointing directly at the origin, and the rate is . That makes sense in hindsight, since increases fastest when you head straight for the singularity.
(d) . That is an inverse-square field pointing radially outward. It is the electric field of a positive point charge, in units with , or minus the gravitational field of a point mass. The relation is the definition of the potential, and the minus sign is the statement that things fall down the gradient. Forces point in the direction of steepest descent of the potential energy, which by §3.1 is the direction . Chapter 0.7 takes this field and computes its flux, and Chapter 1.2 takes the same and derives the orbit.
Problem 3 — maximum entropy with nothing to go on
Repeat Worked example 1 with only the normalisation constraint : maximise over states. Show that the answer is the uniform distribution and find the maximum entropy. Then obtain the same result as a limit of the Boltzmann distribution, and say what physical situation that limit describes.
Solution
One constraint, one multiplier:
So , which is the same value for every , because the right-hand side carries no at all. That single observation is the whole result. Normalising gives , so
The Hessian is again , negative definite, so it is a maximum (§6.3). "Maximum entropy = uniform" is thus a one-line consequence of §7, not a separate principle.
As a limit. Boltzmann gives . As every exponential tends to and , so . Since , the limit is : at infinite temperature every state is equally likely, because the energy constraint has stopped costing anything. Consistently, (0.6.40) reads , and at the unconstrained maximum is stationary in , so . The two statements are the same statement.
Why this matters beyond the algebra. The result is the "equal a priori probabilities" postulate of the microcanonical ensemble. That assumption is usually placed at the very foundation of statistical mechanics and defended with hand-waving about ergodicity. Here it is a theorem: given only that the probabilities sum to one, the least presumptuous distribution is the flat one. And is Boltzmann's carved on his headstone, with the number of accessible states.
Problem 4 — mixed partials and a full classification
(a) Verify Clairaut's theorem explicitly for by computing and separately. (b) Find all critical points of and classify each one using the eigenvalues of its Hessian, stating the principal curvature directions.
Solution
(a) Treating as constant, . Now differentiate that in , using the product rule on both terms:
The other order: , and differentiating in ,
Identical. ✓ Both second partials are continuous everywhere (they are polynomials and exponentials), so Clairaut's hypothesis holds and the agreement was guaranteed in advance.
(b) Critical points. and give and . Substituting, , so and over the reals. The critical points are with , and with .
The Hessian. .
At : , characteristic equation , so . The eigenvector for is and for is (check: ✓). Mixed signs, so a saddle: curves upward along and downward along , each with curvature .
At : , eigenvalues , i.e. along and along . Both positive, so a local minimum, three times stiffer across the diagonal than along it. The contours near it are ellipses elongated by in the direction.
Sanity checks worth doing. The determinant of is , which is at the origin and at . Since (Chapter 0.5), a negative determinant in two dimensions immediately signals opposite signs and hence a saddle, with no eigenvector computation at all. That is the standard "second derivative test" for two variables: means saddle, and with means minimum. It is not a separate rule. It is §6.3 plus the fact that the determinant is the product of the eigenvalues. Notice too that it stops being usable in three dimensions, where a positive determinant is compatible with two negative eigenvalues. The eigenvalue formulation is the one that generalises.
Note also that is unbounded below (take , ), so the local minimum at is emphatically not global. §6 is a local theory: the Hessian is a statement about a neighbourhood and knows nothing about what happens far away.
You took one equation from Chapter 0.1 and let the displacement be a vector. Out of that came the total derivative , a unique linear map whose matrix is the Jacobian. With it came the recognition that partial derivatives are its components, and that they can exist without it.
You derived the steepest-ascent property of the gradient from Cauchy–Schwarz, and its perpendicularity to level sets from the chain rule. You saw that turning into requires a metric, and you met your first covector doing it.
The chain rule became a product of Jacobians and quietly produced the summation convention. The Hessian, symmetric by Clairaut and therefore diagonalisable by the spectral theorem, classified critical points by its eigenvalues and told you the principal curvatures. Lagrange multipliers came from a picture, that of a level set tangent to a constraint, and turned out to be sensitivities. And the Jacobian determinant converted local linearity plus the determinant-as-volume into every change-of-variables formula there is.
Where this gets spent.
- The total derivative → Chapter 1.2, where the same definition applied to a functional gives the Euler–Lagrange equations; Chapter 3.2, where becomes the pushforward between tangent spaces on a manifold.
- The gradient as a one-form → Chapter 2.4 (upper and lower indices, made a convention), Chapter 3.2 (the cotangent space), Chapter 3.3 (raising and lowering with ), Chapter 3.5 (where becomes the exterior derivative and starts doing work).
- The chain rule as a matrix product → Chapter 2.4, where (0.6.26), promoted from a computation to a definition, is what a tensor is; Chapter 3.2, where it is how you change charts on a manifold.
- Hessian + spectral theorem → Chapter 0.8 (normal modes: eigenvalues of the Hessian of the potential are the squared frequencies), Chapter 1.3 (stability of equilibria in phase space), Chapter 6.6 (the Higgs potential, where a zero eigenvalue is a massless particle).
- Lagrange multipliers → Chapters 1.2 and 1.3 (constraint forces are multipliers, and now you know why they have units of force: they are sensitivities of an energy to a displacement), and later the constrained-Hamiltonian treatment of gauge theories, where the multipliers enforce Gauss's law.
- The Jacobian determinant → Chapter 0.2's debt, now paid; Chapter 3.5's ; Chapter 5.7, where changing variables inside a path integral produces a determinant that is not a nuisance but a new field.
One thing to carry away above all others. Every result in this chapter came from replacing a number by a linear map. That is the only idea here. Chapter 0.7 replaces the linear map by something that varies from point to point, and asks what happens when you integrate it over a surface. The answer is Stokes' theorem, which is the fundamental theorem of calculus with the same substitution applied.