Frechet and Gateaux Derivatives
Gateaux differentiates along each straight direction; Frechet demands one linear map that works uniformly in all directions at once. Uniformity is what the chain rule needs.
Why Does This Exist?
Optimizing over functions (neural operators, variational problems, PDE-constrained design) needs calculus beyond . Directional slopes are easy to define anywhere, but backpropagation, implicit differentiation and Newton steps need a single linear map approximating the function uniformly. Confusing the two produces chain rules that fail and gradients that mislead.
This page separates Gateaux (directional) from Frechet (uniform) and checks both on one bowl. Single-variable rates are in derivatives and partial derivatives; the finite-dimensional uniform map is the total derivative.
The one idea you need first
A directional derivative fixes a direction and differentiates at . A bounded linear map satisfies with . Frechet asks one such to fit all directions uniformly.
Think of It Like This
Surveying a hill versus paving it flat
Gateaux walks straight lines through your position and reports each trail's slope: north trail 4, east trail 6, diagonal trail 10. Useful, but trails can disagree wildly (one cliff, one meadow) with no single plane fitting them.
Frechet lays one tangent plane touching the hill uniformly: every direction's slope reads off the same plane, with errors shrinking faster than distance in all directions at once. Where it stops: Gateaux-linearity in each direction separately never builds the plane. Uniformity across directions is the extra purchase.
How It Actually Works
is Gateaux differentiable at when every directional limit exists:
In plain words: freeze a direction , walk it, read the slope. It is Frechet differentiable when one bounded linear satisfies:
uniformly over directions: the remainder vanishes faster than no matter which way points. Frechet implies Gateaux with , continuous Gateaux on a neighborhood implies Frechet, but bare Gateaux alone never chains or optimizes safely.
Worked example
at along . Gateaux: , so . Directional slope .
Frechet candidate (the gradient). Remainder: . With : uniformly (one direction shown; the quadratic bound holds for all). Frechet holds with the same map every direction shares.
Code
Directional slope by finite differences matches the gradient dot direction, with quadratic remainder decay.
import numpy as np
def gateaux(f: object, x: np.ndarray, h: np.ndarray, t: float = 1e-6) -> float: return float((f(x + t * h) - f(x - t * h)) / (2 * t)) # central difference
f = lambda v: v[0] ** 2 + 3 * v[1] ** 2x = np.array([2.0, 1.0])h = np.array([1.0, 1.0])print(round(gateaux(f, x, h), 3)) # -> 10.0print(round(float(f(x + 0.01 * h) - f(x) - 10 * 0.01), 6)) # -> 0.0004Slope ; remainder at is : quadratic, exactly as derived.
Watch Out For
Chaining Gateaux derivatives like Frechet ones
Symptom: backprop through a merely Gateaux map silently produces wrong gradients on some directions. Fix: verify Frechet (uniform remainder) before any chain rule; Gateaux linearity per direction is never enough.
Assuming partials imply differentiability
Symptom: existing partial derivatives quoted as a total derivative at a discontinuity (classic -style traps). Fix: require continuous partials in a neighborhood, or prove the remainder directly.
The Quick Version
- Gateaux differentiates along each line through the point; Frechet fits one uniform linear map.
- at has directional slope along with remainder .
- Frechet implies Gateaux; continuous Gateaux implies Frechet; bare Gateaux implies neither chain rule nor continuity.
- Only Frechet derivatives chain, backpropagate and drive Newton steps safely.
- Partial derivatives alone never certify differentiability.