Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Zoom in until it’s flat
Zoom far enough into any smooth hill and it looks like a flat tilted plane. That plane is the derivative: the best straight-line description of how things change nearby. So far you’ve done this for functions of numbers. But what if the “input” is a whole curve, a matrix, or the millions of weights of a neural network?
The same idea still works. You need a way to say “a small change” and a way to say “approximately linear”. Two versions exist:
- the Gâteaux derivative measures the slope one direction at a time;
- the Fréchet derivative demands one flat plane that works in every direction at once.
A drone’s orientation is a rotation matrix, not a number. Its estimator needs the derivative of “rotate by this matrix” with respect to small rotations. A neural network’s loss depends on weight matrices. Fréchet derivatives are how you differentiate both correctly, and the naïve “it’s like x²” guess is often wrong.
- 1. Zooming far into a smooth surface, it looks…
- 2. The Gâteaux derivative looks at…
- 3. Can we differentiate with respect to a matrix?
Level 1: Beginner
★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.Two definitions
Let map between normed spaces, such as , matrices, or functions.
- Gâteaux derivative at in direction : . This is the directional derivative.
- Fréchet derivative: a bounded linear map with
If is Fréchet differentiable, then for every . The converse can fail.
Examples:
- on : .
- on : , so . The gradient is , a function (the Riesz representation, A3.5-5).
- on matrices: , so . That’s not , because matrices don’t commute.
- 1. D(X²)[H] = ?
- 2. The L² gradient of J[f] = ∫f² is…
- 3. Fréchet's remainder must satisfy…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.Rules you can now use anywhere
- Chain rule: . That’s composition of linear maps: backprop (A3.3) in infinite dimensions.
- Product rule: , keeping the order.
- Matrix inverse: differentiate to get , so .
- Determinant (Jacobi): , and therefore (A3.3-3).
- Matrix exponential: . It reduces to only when and commute.
Derivative vs gradient
The Fréchet derivative is a linear functional, fixed by alone. A gradient is the vector with , so it depends on the chosen inner product.
- With the inner product, has gradient . That’s the Euler–Lagrange expression (A3.5-9).
- With the Sobolev inner product, the gradient becomes applied to it. That’s a smoother, far better-conditioned descent direction (Exercise 2).
- 1. D(X⁻¹)[H] = ?
- 2. D log det(X)[H] = ?
- 3. The gradient depends on…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Fréchet ⇒ Gâteaux, but not conversely
Fréchet ⇒ Gâteaux. Put in the definition: . The last term has norm . ∎
A counterexample to the converse. Let with . Along any line, , so every directional derivative is 0 and the Gâteaux derivative is the zero linear map. But along , . So is not even continuous at 0, and can’t be Fréchet differentiable (Practice Code 4, and the demo). The lesson: checking directions one at a time can miss curved approaches.
A sufficient condition. If all partial (or Gâteaux) derivatives exist near and depend continuously on the point, then is Fréchet differentiable there.
Deriving D(X⁻¹)
. The Neumann series (A3.5-6) gives . So . ∎
The chain rule, proved
Write and . Then . Both and are , since . So . ∎
Exercise 3.1: Compute d/dt det(I + tA) at t = 0
By the chain rule and Jacobi’s formula at : . For example, a matrix with trace 7 gives 7. This is why volume change under a flow is governed by (A3.4-1).
- 1. Fréchet differentiable ⇒ Gâteaux differentiable?
- 2. f = x³y/(x⁶ + y²) along y = x³ equals…
- 3. d/dt det(I + tA) at t = 0 = ?
Level 4: Expert
★★★★★ Expert⏱ 45 minResearchers: original papers and open problems.Choosing the inner product is choosing the algorithm
Gradient descent depends on which gradient you use. For an energy with a term, the gradient has a stability limit that shrinks as the grid refines. The Sobolev gradient solves . It’s mesh-independent and, here, an exact preconditioner (Neuberger, 1997). That’s the same idea as:
- natural gradient descent, which uses the Fisher-information inner product so steps are invariant to how a model is parametrized (Amari, 1998; A3.3-4);
- K-FAC and Shampoo, which approximate it for deep networks;
- mirror descent, for non-Euclidean geometries.
Fréchet derivatives in robotics, control and learning
- Lie groups. Orientation estimation and pose-graph SLAM differentiate maps on and . Perturbations are applied as , and the needed Jacobians come from (Practice Code 5). Used in IMU preintegration (Forster et al., 2017) and Lie-group EKFs. See Solà, Deray and Atchuthan (2018) for a practical guide.
- Shape and topology optimization. “Shape derivatives” of drag or compliance with respect to a boundary deformation are Fréchet derivatives on spaces of shapes. Combined with adjoint solves (A3.4-3), they design wings, brackets and heat sinks.
- Implicit layers. For an equilibrium , the implicit function theorem gives , a Fréchet-derivative statement in Banach spaces. It underlies deep equilibrium models and differentiable optimization layers (Bai et al., 2019; Amos and Kolter, 2017).
- Infinite-width theory. NTK analysis linearizes a network around initialization in function space, a first-order Fréchet expansion of the parameter-to-function map (Jacot et al., 2018).
References
- D. Luenberger (1969). Optimization by Vector Space Methods. Wiley.
- E. Zeidler (1995). Applied Functional Analysis: Main Principles and Their Applications. Springer.
- J. W. Neuberger (1997). Sobolev Gradients and Differential Equations. Springer.
- S. Amari (1998). “Natural gradient works efficiently in learning.” Neural Computation, 10(2).
- N. Higham (2008). Functions of Matrices: Theory and Computation. SIAM. (Fréchet derivative of exp.)
- J. Solà, J. Deray, D. Atchuthan (2018). “A micro Lie theory for state estimation in robotics.” arXiv:1812.01537.
- C. Forster, L. Carlone, F. Dellaert, D. Scaramuzza (2017). “On-manifold preintegration for real-time visual–inertial odometry.” IEEE Transactions on Robotics, 33(1).
- S. Bai, J. Z. Kolter, V. Koltun (2019). “Deep equilibrium models.” NeurIPS.
- B. Amos, J. Z. Kolter (2017). “OptNet: differentiable optimization as a layer in neural networks.” ICML.
- G. Allaire (2007). Conception optimale de structures. Springer. (Shape derivatives.)