 ### 34.8 Functional calculus      Key points

• The directional derivative (34.283) becomes the Gateaux derivative (34.285) in an function space.
• The gradient (34.287) becomes the Fréchet derivative (34.293) in an function space, and the Hessian (34.299) becomes the second-order Fréchet derivative (34.303).

In multivariate calculus, discussed in Section 32.1, we start from a function  (32.22) that takes as input a vector with entries f:g∈R¯ȷ↦f(g)∈R. (34.277)

Consider a perturbation vector of size defined by the standard Euclidean inner product (31.122) ∥δg∥22≡∑¯ȷj=1(δgj)2≤η2, (34.278)

with small. The purpose of calculus is to study the effect of the perturbation (34.278) on the function (34.277) when applied to a generic vector f(g+δg)≈f(g)+⋯. (34.279)

Here we generalize calculus, which operates on , to functional analysis, which operates on a space of functions, such as the square-integrable functions (34.83), as in Table 34.1.

To this purpose, let us interpret a vector as a function (34.38). Then, the notion of multivariate function (34.277) generalizes to that of functional, which maps a function to a complex number F:g∈L2μ(T)↦F[g]∈C. (34.280)

Consider a perturbation vector of size defined by the inner product (34.82) ∥δg∥2≡∫T¯¯¯¯¯¯¯¯¯¯¯¯δg(t)δg(t)dμ(t)≤η2, (34.281)

with small. The purpose of functional calculus is to study the effect of the perturbation (34.281) on the functional (34.280) when applied to a generic function F[g+δg]≈F[g]+⋯. (34.282)  Example 34.42. Sample mean
In Example 22.27 we consider the sample mean (22.151). We demonstrate that it is in fact a functional (34.280) of the historical distribution with flexible probabilities (22.155).

#### 34.8.1 Gateaux derivative The Gateaux derivative is the functional analysis generalization of the directional derivative.

In multivariate calculus we compute the directional derivative (32.42) of a function (34.277) in the direction of the vector as follows Dhf(g)≡limϵ→01ϵ(f(g+ϵh)−f(g)). (34.283)

Then the partial derivative (32.23) is the special case of a directional derivative (32.43) in the direction of the canonical basis vector (31.21) ∂jf(g)≡limϵ→01ϵ(f(g+ϵδ(j))−f(g)). (34.284)

The Gateaux derivative [W] of a functional (34.280) in the direction of the function (34.83) is defined similarly, as follows DhF[g]≡limϵ→01ϵ(F[g+ϵh]−F[g]). (34.285)

In particular, we denote the Gateaux derivative in the direction of the Dirac delta (34.96) as follows ∂tF[g]≡limϵ→01ϵ(F[g+ϵδ(t)]−F[g]). (34.286)  Example 34.43. Influence function of the sample mean
In Example 22.28 we compute the influence function (22.156) of the sample mean  (22.151), which is the Gateaux derivative of the functional (22.155).

#### 34.8.2 Fréchet derivative The Fréchet derivative is the functional analysis generalization of the gradient.

In multivariate calculus, for a differentiable function we can stack the partial derivatives (34.284) into the gradient (32.29) ∇f(g)≡(∂1f(g),…,∂¯ȷf(g))', (34.287)

or equivalently [∇f(g)]j≡∂jf(g), (34.288)

for all . Hence, we can interpret the gradient (34.287) as a map from the vector space into itself ∇f:g∈R¯ȷ↦∇f(g)∈R¯ȷ. (34.289)

The gradient (34.287) is in fact the unique vector-valued function (34.289) that recovers the directional derivative (34.283) as in (32.44) Dhf(g)=⟨h,∇f(g)⟩2, (34.290)

for all vectors , where is the standard Euclidean dot product (31.122) ⟨h,∇f(g)⟩2=∑¯ȷj=1hj∂jf(g). (34.291)

Note that this is in the form of the Riesz representation (31.160), where the directional derivative is linear in for fixed .

With the gradient (34.287) we can perform a first order Taylor expansion (32.126) of a function (34.277), which we rewrite in compact form as f(g+δg)−f(g)=⟨δg,∇f(g)⟩2+o(∥δg∥2), (34.292)

where is the norm induced by the dot product (34.291), and denotes terms smaller than [W].

In the context of functional analysis, the Fréchet derivative [W] is a map, similar to the gradient (34.289), from the function space (34.83) into itself ∇F:g∈L2μ(T)↦∇F[g]∈L2μ(T). (34.293)

The Fréchet derivative is the unique linear functional that recovers the Gateaux derivative (34.285) of the function in a generic direction DhF[g]=⟨h,∇F[g]⟩, (34.294)

where is the inner product (34.82) ⟨h,∇F[g]⟩=∫T¯¯¯¯¯¯¯¯¯¯h(t)∇F[g](t)dμ(t). (34.295)

This is analogous to the fact that the gradient is the unique vector that recovers the directional derivative (34.290) in the finite dimensional case. Notice that the Riesz representation theorem (34.100) then tells us that is the Riesz representation of , viewed as a linear functional of .

Unlike in the finite dimensional case, there may be occurrences where the Gateaux derivatives (34.286) are well defined and yet the Fréchet derivative (34.297) is not well-defined [W], though such occurrences are beyond the scope of the present discussion.

When both derivatives are defined, there is a simple connection between the two: by considering in the inner product representation of the Fréchet derivative (34.294), and using the sifting property (34.95) of the Dirac delta we obtain that the Fréchet derivative (34.294) at any point is the Gateaux derivative in the direction of the Dirac delta (34.286) at that point ∇F[g](t)=∂tF[g], (34.296)

for all points , similar to how the entry of the gradient is the partial derivative (34.288) in the finite dimensional case.

Similar to (34.292), for a given functional , the Fréchet derivative provides us with the first order Taylor expansion of the functional F[g+δg]−F[g]≡⟨δg,∇F[g]⟩+o(∥δg∥), (34.297)

where is the norm induced by the inner product (34.295).

#### 34.8.3 Second order derivative The second order Fréchet derivative is the functional analysis generalization of the Hessian.

In multivariate calculus, it is convenient to arrange the second-order derivatives in matrix form in the Hessian (32.50). We can interpret the Hessian as a map from the vector space into a matrix, which means a linear application from the vector space in itself ∇2f:g∈R¯ȷ↦∇2f(g)∈L(R¯ȷ), (34.298)

where . The Hessian (34.298) operates on an arbitrary vector via the matrix-vector multiplication (31.71) [∇2f(g)[h]]j≡∑¯ȷj'=1∂2j,j'f(g)hj'. (34.299)

With the Hessian (34.298) we can perform a second-order Taylor expansion (32.127) of a function (34.277), which we rewrite in compact form as f(g+δg)−f(g)−⟨δg,∇f(g)⟩2=12⟨δg,∇2f(g)[δg]⟩2+o(∥δg∥22). (34.300)

The left hand side in (34.300) are the terms of the first order Taylor expansion (34.297). The calculation of the inner product on the right hand side follows from the linear action (34.299) and the dot product (31.122) ⟨δg,∇2f(g)[δg]⟩2=∑¯ȷj,j'=1∂2j,j'f(g)δgjδgj'. (34.301)

In the context of functional analysis, the second order Fréchet derivative [ W] is a map from the function space (34.83) into a kernel, which means a linear operator from the function space into itself ∇2F:g∈L2μ(T)↦∇2F[g]∈L(L2μ(T)). (34.302)

The second order Fréchet derivative (34.302) operates on an arbitrary vector via kernel-function integration (34.66) (∇2F[g][h])(t)≡∫T∇2F[g](t,u)h(u)dμ(u). (34.303)

With the second order Fréchet derivative (34.302) we can perform a second-order Taylor expansion of a functional (34.300) F[g+δg]−F[g]−⟨δg,∇F[g]⟩=12⟨δg,∇2F[g][δg]⟩+o(∥δg∥2). (34.304)

The left hand side in (34.304) are the terms of the first order Taylor expansion (34.297). The calculation of the inner product on the right hand side follows from the linear action (34.303) and the inner product (34.82) ⟨δg,∇2F[g][δg]⟩=∫T(∫T∇2F[g](t,u)δg(t)δg(u)dμ(t))dμ(u). (34.305)