Write the matrix of the quadratic form