How does 5x_1^2-6x_1x_2+5x_2^2+4x_1+4x_2 become (1/2) x^T [[10 -6][-6 10]]x + [4 4]x?

Hot_Ices

New member
Joined
Oct 27, 2018
Messages
1
\(\displaystyle \mbox{1st line: }\, F(x)\, =\, 5x_1^2\, -\, 6x_1 x_2\, +\, 5x_2^2\, +\, 4x_1\, +\, 4x_2\)

\(\displaystyle \mbox{2nd line: }\, F(x)\, =\, \dfrac{1}{2}\, x^{T}\, \left[\begin{array}{rr}10&-6\\-6&10\end{array}\right]\, x\, +\, \left[\begin{array}{rr}4&4\end{array}\right]\, x\)

I understand how to go from 2nd line to first line but not how to derive the 2nd line from the first line. How to derive those matrix?
Any helpful video regarding this derivation will be appreciated. Thank you very much
 

Attachments

  • IMG_20181027_211918.jpg
    IMG_20181027_211918.jpg
    75.3 KB · Views: 2
Last edited by a moderator:
\(\displaystyle \mbox{1st line: }\, F(x)\, =\, 5x_1^2\, -\, 6x_1 x_2\, +\, 5x_2^2\, +\, 4x_1\, +\, 4x_2\)

\(\displaystyle \mbox{2nd line: }\, F(x)\, =\, \dfrac{1}{2}\, x^{T}\, \left[\begin{array}{rr}10&-6\\-6&10\end{array}\right]\, x\, +\, \left[\begin{array}{rr}4&4\end{array}\right]\, x\)

I understand how to go from 2nd line to first line but not how to derive the 2nd line from the first line. How to derive those matrix?
I will guess that you are working with matrices and transformations. Also, I will guess that the following is true:

. . . . .\(\displaystyle x\, =\, \left[\begin{array}{c}x_1\\x_2\end{array}\right]\)

The conversion of the end of the first line is fairly obvious:

. . . . .\(\displaystyle 4x_1\, +\, 4x_2\, =\, \left[\begin{array}{rr}4&4\end{array}\right]\, \left[\begin{array}{c}x_1\\x_2\end{array}\right]\)

To do the rest of the conversion, we note that the variables are multiplied by themselves and each other, so more than one copy of "x" will be necessary, in some manner. We can get squaring with:

. . . . .\(\displaystyle x^T\, x\, =\, \left[\begin{array}{rr}x_1&x_2\end{array}\right]\, \left[\begin{array}{c}x_1\\x_2\end{array}\right]\, =\, \left[\begin{array}{c}x_1^2\, +\, x_2^2\end{array}\right]\)

This gets us closer, but we need more terms and the correct coefficients. Any matrix immediately following the transposed vector will have to have two rows; any matrix immediately preceding the terminal vector will have to have two columns. So let's plug a 2-by-2 matrix in between:

. . . . .\(\displaystyle x^T\, A\, x\, =\, \left[\begin{array}{rr}x_1&x_2\end{array}\right]\, \left[\begin{array}{rr}a&b\\c&d\end{array}\right]\, \left[\begin{array}{c}x_1\\x_2\end{array}\right]\)

Multiply this out, and solve for the values of the entries in A. You should get that the a1,1 and a2,2 entries should be 5, and that a1,2 + a2,1 should equal -6.

(I don't know why they threw the "1/2" in there, and I don't think it matters how you get the -6. I checked, using a1,2 = 0 and a2,1 = -6, and the result came out fine.)
 
Last edited by a moderator:
Top