Comment Comment by SoerenL But how do you compute the derivative of x'Ax in Mathematica (x being a vector and A being a matrix)? What you have pointed out is only scalar derivatives, if I am not mistaken here. parent SoerenL 8 years ago