Hessian of biquadratic function - is it right?

Hi there, I've got a problem with this one:

In a book I found the formula for computing hessian of biquadratic function

,

(where are real symmetric matrices, and is constant column vector),

which says, that the Hessian matrix of is the matrix

.

First of all, I'm not sure if I should believe this, because if the product exists, then it should be computable in more ways then directly

begin the multiplication on the left side and end on the right side (associative multiplication for matrices), so I should be able to start with

computing , where the dimensions don't match.

On the other side, if I first compute , I'll get a real number and then I can just multiply matrix by this number, and I'll get a result which fits the dimensions of other matrices. So could that formula be correct? I really don't know what to think about it.

I was also trying to compute it myself to make sure that formula is right, but I was not sure how to do it exactly.

I computed gradient of the function in the form , it looks to be right.

Now, do I get Hessian matrix of F by computing the Jakobi matrix of first partial derivatives of ? Or it's not a good way?

Thanks for any answers