Let n≥1 be a natural number, let R be the real numbers, and let U be an open subset of Euclidean space Rn. Write z⋅z′ for the dot product of points of Rn and Av for the matrix-vector product.
Let f:U→R be of class C1 on U (via clause 3 there), and write ∂if for its partial derivative with respect to the ith variable.
Let p=(p1,…,pn) and h=(h1,…,hn) be points of Rn, and for t∈R write p+th for the point of Rn whose kth coordinate is pk+thk for k∈{1,…,n}. Let J⊆R be an interval with p+th∈U for every t∈J, and let g:J→R be the slice given by
g(t)=f(p+th).
Let t0 be an interior point of J and write x0=p+t0h. Derivatives of real functions are those of the one-dimensional derivative at an interior point, well defined by Uniqueness of the Derivative at an Interior Point.
Then the following hold.
1. (First derivative) g is differentiable at t0 and, with the gradient Df(x0),
g′(t0)=i=1∑n∂if(x0)hi=h⋅Df(x0).
2. (Second derivative) Suppose in addition that f is of class C2 on U, and let g1:J→R be given by
g1(t)=i=1∑n∂if(p+th)hi,
so that by claim 1 the value g1(t) is g′(t) at every interior point t of J. Then g1 is differentiable at t0 and, with the Hessian matrix D2f(x0),
g1′(t0)=h⋅(D2f(x0)h).