Suppose I have a quadratic form of
qf = a x^2 + b y^2 + c z^2 + 2 d x y + 2 e x z + 2 f y z
How can I easily to get the symmetric matrix A, such that $X^TAX=qf$? where $X^T=(x,y,z)$.
I hope that the method will work for general quadratic form (i.e., for 2nd-homogenous polynomial of variable x,y,z,w,...)
I have tried the function
CoefficientRules, but it seem there needs a step to transform the order of each term into the "position" of matrix.