4
$\begingroup$

This question already has an answer here:

For example i have this quadratic form $q(x_1,x_2)=8{x_1}^2-4x_1x_2+5{x_2}^2$ , here it's a simple factoring:

$q\begin{bmatrix}x_1 \\x_2 \\x_3\\\end{bmatrix}=\begin{bmatrix}x_1 \\x_2 \\x_3\\\end{bmatrix} \cdot \begin{bmatrix}8x_1 &-2x_2\\-2x_1&5x_2\end{bmatrix}=\vec{x}^{T}A\vec{x} ,A=\begin{bmatrix}8 &-2\\-2&5\end{bmatrix}$.

But this is not always the case where one can simply see how the matrix is going to be ,so is there a certain method of finding this matrix?

$\endgroup$

marked as duplicate by Dietrich Burde, Lord Shark the Unknown, José Carlos Santos, Daniel W. Farlow, Namaste linear-algebra Jul 22 '17 at 20:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4
$\begingroup$

The matrix of the quadratic form $q(x_1,x_2)=a{x_1}^2+bx_1x_2+c{x_2}^2$ is always$$\begin{pmatrix}a&\frac b2\\\frac b2&c\end{pmatrix}.$$

$\endgroup$
  • $\begingroup$ This works for any $\vec{x}\in{\mathbb{R}^{n}} ,q\vec{x}$? $\endgroup$ – user3133165 Jul 22 '17 at 11:17
  • $\begingroup$ Let's say i have $q(x_1,x_2,x_3)=x_1^2+x_1x_2-x_1x_3$ how will this work here? $\endgroup$ – user3133165 Jul 22 '17 at 11:21
  • $\begingroup$ @user3133165 Sure: $\begin{pmatrix}1&1/2&-1/2\\1/2&0&0\\-1/2&0&0\end{pmatrix}$. $\endgroup$ – José Carlos Santos Jul 22 '17 at 11:38
2
$\begingroup$

The general method is to write the coefficients of the quadratic terms on the diagonal. And for the $a_{ij}x_ix_j$ terms write $a_{ij}/2$ into the i.th row and j.th column and also into the j.th row and the i.th column.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.