# linear algebra - Compute matrix associated to quadratic form.

We have a form: $Q: R^3\to R$, $Q(x) = 3x_1^2 + 3x_2^2 - 2x_1x_2 + 4x_1x_3 + 4 x_2x_3$, where $x = (x_1, x_2, x_3)$ is an arbitrary vector from $R^3$.

The problem is to compute canonical form using Jacobi's Method.

The only problem I've faced is in figuring out how to compute matrix associated to quadratic form $Q$.

Thank you for any advice.

I also know that the base for this form is: $B = \{e_1= (1, 0, 0), e_2 = (0, 1, 0), e_3 = (0, 0, 1) \}$. And that this matrix has the form: $\begin{bmatrix}a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33}\end{bmatrix}$.

Where $a_{ij} = Q(e_i, e_j)$.

$a_{ij}$ corresponds to the $x_{i}x_{j}$ term in your polynomial. In particular, $a_{ij}$ is one half of the coefficient of $x_{i}x_{j}$ if $i\neq j$ and is precisely equal to the coefficient of $x_{i}x_{j}$ if $i=j$. That is, $a_{ii}$ is the coefficient of $x_{i}^{2}$.
• Aha, got it, thank you. The case where $i \neq j$ was clear for me, the other one was problematic. – Andrei Glingeanu Feb 9 '15 at 20:34