# Thread: Converting A Function to Matrix...?

1. ## Converting A Function to Matrix...?

Hey guys,

Iv been given the function:

V(x,y) = kx^2 + k[(y-x)^2] + ky^2

They say :

Write down a symetric matrix A such that V = (X^T)AX where X = (x,y)^T

T: Transpose of matrix.

Whaaaat the helll???

Thanks.

2. Originally Posted by outspired
Hey guys,

Iv been given the function:

V(x,y) = kx^2 + k[(y-x)^2] + ky^2

They say :

Write down a symetric matrix A such that V = (X^T)AX where X = (x,y)^T

T: Transpose of matrix.

Whaaaat the helll???

Thanks.
The want you to find a $2\times2$ symmetric matrix such that:

$\left[\begin{array}{cc}x&y\end{array}\right]\left[\begin{array}{cc}a&b\\c&d\end{array}\right]\left[\begin{array}{c}x\\y\end{array}\right]=kx^2+k(y-x)^2+ky^2=2kx^2-2kxy+2ky^2$

Multiplying out that matrix product gives you $ax^2+bxy+cxy+dy^2$. So what do $a,b,c,d$ need to be in order to make the equation hold? Remember that $A$ has to be symmetric.

3. Thanks man, i did something like that but it didnt come out like that. You just need to take the co-effients of the equation and match it with the equation determined by the multiplication....by the way, how did you know they were looking for a 2x2?

a = 2k

b+c = -2k => b=c=-k

d = 2k

4. Originally Posted by outspired
Thanks man, i did something like that but it didnt come out like that. You just need to take the co-effients of the equation and match it with the equation determined by the multiplication....by the way, how did you know they were looking for a 2x2?

a = 2k

b+c = -2k => b=c=-k

d = 2k
Because of the rules governing matrix multiplication. We were multiplying

$[1\times2]\cdot[m\times n]\cdot[2\times1]$

To multiply the first two, $m$ must be $2$. To multiply the second pair, $n$ must be $2$.

5. Wow...i never saw it that way.

Thanks alot man...you've just given me 3 minutes of extra sleep...JOY.