by mathusers
 Math Emeritus Sci Advisor Thanks PF Gold P: 39,293 The first one is a symmetric matrix because it IS symmetric! aij= aji. You get the quadratic form of an n by n matrix by multiplying the row vector [x1, x2, ..., xn] times the matrix times the column vector [x1, x2, ..., xn]T. You get the quadratic form by multiplying the matrices $$[x y]\left[\begin{array}{cc}1 & 3 \\ 3 & 1\end{array}\right]\left[\begin{array}{c}x \\ y\end{array}\right]= x^3+ 6xy+ y^2$$ Similarly, you get the quadratic form for a 3 by 3 matrix by multiplying $$[x y z]\left[\begin{array}{ccc}0 & 1 & 1 \\ 1 & 3 & 5 \\ 1& 5 & 0\end{array}\right]\left[\begin{array}{c}x \\ y \\ z\end{array}\right]= 2y^2+ 2xy + 2xz+ 10yz$$ Notice that given ANY matrix, doing that gives a quadratic form. Going the other way, there are many matrices corresponding to a given quadratic form- but only one symmetric matrix.
 Math Emeritus Sci Advisor Thanks PF Gold P: 39,293 Oh, now you are going the other way- from the quadratic form to the symmetric matrix! If we have, for example, $x^2- 4xy+ y^2+ 5xz+ 2yz+ z^2$, I would notice first the coefficients of $x^2$, $y^2$, $z^2$. They will be the diagonal elements. (In whatever order I choose to put x, y, and z in the vector- if it in that order, they would be top left, center, bottom right). To find the other numbers, look at the coefficient of xy: -4. Since x and y are the "first" and "second" in order (I just choose them that way) I would put that coefficient in the "first row, second column" and "second row, first column", dividing it equally, -2 in each, between them in order that the matrix be symmetric. The coefficient of xz (first and third variables in my order) is 5. Put 5/2 in the "first row, third column" and 5/2 in the "third row, first column". Finally, the coefficient of yz (second and third variables) is 2. Put 1 in the "second row, third column" and 1 in the "third row, second column". $$\left[\begin{array}{ccc} x & y & z\end{array}\right]\left[\begin{array}{ccc}1 & -2 & \frac{5}{2} \\ -2 & 1 & 1 \\\frac{5}{2} & 1 & 1\end{array}\right]\left[\begin{array}{ccc} x \\ y \\ z\end{array}\right]= x^2- 4xy+ y^2+ 5xz+ 2yz+ z^2$$