Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is there a way to find the symbolic matrix associated to an expended quadratic form?

Suppose I have a complex quadratic form

$Q(p_x,p_y)=p_y^2 y^2 \alpha^2 - 2 p_x p_y x y \alpha\beta + p_x^2 x^2 \beta^2 - p_y^2 y^2 \alpha -p_x^2 x^2 \beta$

Of course all parameters has been declared as variables, that is

var('p_x p_y x y \alpha \beta')

(I use unicode $\alpha$ and $\beta$)

Is there a way to find the matrix $\boldsymbol{A}$ such that

$Q(\boldsymbol{p})= \boldsymbol{p}^\top \boldsymbol{A}\boldsymbol{p}$ ?