Practical Methods of Optimization

Introduction - Home
Exercises: 1 - 2 - 3 - 4 - 5 - 6

Exercise. Obtain expressions for the gradient vector and Hessian matrix for the functions of n variables:

(i)aTx: a constant;
(ii)xTAx: A unsymmetric and constant;
(iii)1 2xTAx + bTx: A symmetric, A, b constant;
(iv)fTf: f is an m-vector depending on x and fT is denoted by A which is not constant.

Solution.

(i)

(aTx) = iaixi x1 iaixi xn = a1 a n = a

((aTx))T = (aT) = a1 x1 an x1 a1 xn an xn = 0

(ii)

(xTAx) = i jxiAijxj x1 i jxiAijxj xn = jA1jxj + ixiAi1 jAnjxj + ixiAin = (A+AT)x

The Hessian matrix is then:

((xTAx)) = ((A+AT)x)T = jA1jxj+ ixiAi1 x1 jAnjxj+ ixiAin x1 jA1jxj+ ixiAi1 xn jAnjxj+ ixiAin xn = A+AT

(iii) This is similar to the case above. We have that:

(1 2xTAx + bTx) = 1 2(A + AT) x + b

((1 2xTAx + bTx))T = 1 2(A + AT)

Since A is symmetric, then A = AT, hence,

(1 2xTAx + bTx) = Ax + b

((1 2xTAx + bTx))T = A

(iv) We have that:

fTf = kfk(x)2

(fTf) = kfk2(x) x1 kfk2(x) xm = 2 kfkfk

Since

A = f1 x1 fm x1 f1 xm fm xm

then

(fTf) = 2Af

For the Hessian:

H = ((fTf))T = 2(Af)T