3

Let the quadratic form $F(x,y,z)$ be given as below

$F(x,y,z)=2x^2+3y^2+5z^2-xy-xz-yz$

Find the transitional matrix that would transform this form to a diagonal form.

I got the symmetric coefficient matrix to be:

$\begin{pmatrix}2 & -\frac{1}{2} & -\frac{1}{2} \\-\frac{1}{2} & 3 & -\frac{1}{2} \\-\frac{1}{2} & -\frac{1}{2} & 5\end{pmatrix}$

i then got the characteristic polynomial :

$λ^3-10λ^2+\frac{121}{4}λ-30$

is it even possible to solve for λ?

user135520
  • 2,137
Charlene
  • 687
  • Should that be a $2x^2$ instead of $2x^3$? – Tucker Aug 07 '15 at 21:43
  • @Tucker yes 2x^2 – Charlene Aug 07 '15 at 21:45
  • Have you written the a symmetric coefficient matrix? I don't know the exact details but I'm confident that knowing the eigenvalues and eigenvectors would be important for this problem. – Tucker Aug 07 '15 at 21:46
  • @Tucker i think i found out how to do the symmetric coefficient matrix, i'm still unsure about exactly what the end of this problem is supposed to look like, maybe like a diagonal matrix and be able to somehow put it back into an equation? – Charlene Aug 07 '15 at 21:57

2 Answers2

4

Completing the square gives $2x^2+3y^2+5z^2-xy-xz-yz$

$=2\big(x^2-\frac{1}{2}(y+z)x+\frac{1}{16}(y+z)^2\big)+3y^2+5z^2-yz-\frac{1}{8}y^2-\frac{1}{8}z^2-\frac{1}{4}yz$

$=2\big(x-\frac{1}{4}(y+z)\big)^2+\frac{23}{8}y^2-\frac{5}{4}yz+\frac{39}{8}z^2$

$=2(x-\frac{1}{4}y-\frac{1}{4}z)^2+\frac{23}{8}\big(y^2-\frac{10}{23}yz+\frac{25}{23^2}z^2\big)+\frac{109}{23}z^2$

$=2(x-\frac{1}{4}y-\frac{1}{4}z)^2+\frac{23}{8}(y-\frac{5}{23}z)^2+\frac{109}{23}z^2$,

so letting $x^{\prime}=x-\frac{1}{4}y-\frac{1}{4}x, \;\;y^{\prime}=y-\frac{5}{23}z, \;\;z^{\prime}=z$

gives the transitional matrix

$\begin{pmatrix}1&-\frac{1}{4}&-\frac{1}{4}\\0&1&-\frac{5}{23}\\0&0&1\end{pmatrix}^{-1}=\begin{pmatrix}1&\frac{1}{4}&\frac{7}{23}\\0&1&\frac{5}{23}\\0&0&1\end{pmatrix}$


As shown in Will Jagy's answer, the transitional matrix can also be found by matrix reduction:

$\begin{pmatrix}2&-\frac{1}{2}&-\frac{1}{2}\\-\frac{1}{2}&3&-\frac{1}{2}\\-\frac{1}{2}&-\frac{1}{2}&5\end{pmatrix}\overset{\frac{1}{4}r_1+r_2}{\underset{\frac{1}{4}c_1+c_2}{\longrightarrow}}\begin{pmatrix}2&0&-\frac{1}{2}\\0&\frac{23}{8}&-\frac{5}{8}\\-\frac{1}{2}&-\frac{5}{8}&5\end{pmatrix}\overset{\frac{1}{4}r_1+r_3}{\underset{\frac{1}{4}c_1+c_3}{\longrightarrow}}\begin{pmatrix}2&0&0\\0&\frac{23}{8}&-\frac{5}{8}\\0&-\frac{5}{8}&\frac{39}{8}\end{pmatrix}\overset{\frac{5}{23}r_2+r_3}{\underset{\frac{5}{23}c_2+c_3}{\longrightarrow}}\begin{pmatrix}2&0&0\\0&\frac{23}{8}&0\\0&0&\frac{109}{23}\end{pmatrix}$

Performing the same row operations on the identity matrix gives

$\begin{pmatrix}1&0&0\\0&1&0\\0&0&1\end{pmatrix}\longrightarrow\begin{pmatrix}1&0&0\\\frac{1}{4}&1&0\\0&0&1\end{pmatrix}\longrightarrow\begin{pmatrix}1&0&0\\\frac{1}{4}&1&0\\\frac{1}{4}&0&1\end{pmatrix}\longrightarrow \begin{pmatrix}1&0&0\\\frac{1}{4}&1&0\\\frac{7}{23}&\frac{5}{23}&1\end{pmatrix}=S$,

so the transitional matrix is given by $S^{T}=\begin{pmatrix}1&\frac{1}{4}&\frac{7}{23}\\0&1&\frac{5}{23}\\0&0&1\end{pmatrix}$

user84413
  • 27,211
  • This may be a stupid question, but what part of the transitional matrix tells me what the eigenvalues are? for the second part of the question i need to know the number of positive, negative and zero eigenvalues. – Charlene Aug 08 '15 at 00:20
  • 1
    This is a good question, actually -- this method doesn't give the eigenvalues, but you can use Sylvester's law of inertia to conclude that all 3 eigenvalues are positive (since the quadratic form obtained by completing the square has all 3 coefficients positive). – user84413 Aug 08 '15 at 17:19
  • 2
    user84413, you seem one of the few who are immediately comfortable using repeated completing of squares to do this. Could you please take a look at my question http://math.stackexchange.com/questions/1388421/reference-for-linear-algebra-books-that-teach-reverse-hermite-method-for-symmetr which is about the method depicted in http://math.stackexchange.com/questions/1382288/finding-p-such-that-ptap-is-a-diagonal-matrix which is, at least cosmetically, backwards of your method (usually associated with Hermite in my quadratic forms books). In fact, maybe I should answer here, show the contrast. – Will Jagy Aug 09 '15 at 18:43
  • @WillJagy Thanks for your comment, and I think it would be good if you answered this question, too. (I was actually planning to give an alternate answer using matrix reduction when I got a chance; I think this is a little simpler than the method I used.) – user84413 Aug 09 '15 at 18:49
  • Thank you, I will put it in directly as code from gp-pari, just finished now. Maybe later I will have the energy to typeset, but it should be clear what was done, at least for you – Will Jagy Aug 09 '15 at 19:01
2

this is code from gp-pari, free software I was able to download to my home computer. There is a rather compact depiction of this way of writing things at the question Finding $P$ such that $P^TAP$ is a diagonal matrix From what I can see, the only "advantage" of this is a rather cookbook description, and the fact there is no need to ever explicitly invert a matrix. I am interested, though, never seen this "matrix reduction" way of writing the thing. Probably in some books from 100 years ago or so, time of Hermite and Minkowski.

This may help, the example of a two by two symmetric matrix, the easy case where both diagonal entries are nonzero: $$ A = \left( \begin{array}{cc} C & T \\ T & W \end{array} \right) $$ where we want to change $T$ to zero. We take an elementary matrix, upper triangular in the easy cases,
$$ E = \left( \begin{array}{cc} 1 & \lambda \\ 0 & 1 \end{array} \right), $$ where we are going to choose $\lambda$ so that $E^T A E$ is diagonal. Well,

$$ \color{red}{\left( \begin{array}{cc} 1 & 0 \\ \lambda & 1 \end{array} \right) \left( \begin{array}{cc} C & T \\ T & W \end{array} \right) \left( \begin{array}{cc} 1 & \lambda \\ 0 & 1 \end{array} \right)= \left( \begin{array}{cc} C & T + C \lambda \\ T + C \lambda & W + 2 T \lambda + C \lambda^2 \end{array} \right).} $$ We want $T + C \lambda = 0,$ so we choose $ \lambda = -T /C.$ If the matrix is actually 3 by 3, sometimes the number $\lambda$ is in position 12, or position 13, or position 23. When there are premature zeroes on the diagonal, sometimes $\lambda$ needs to be below the diagonal; not for this problem, though.

parisize = 4000000, primelimit = 500509
? a = [ 2, -1/2, -1/2; -1/2, 3, -1/2; -1/2, -1/2, 5]
%1 = 
[2 -1/2 -1/2]

[-1/2 3 -1/2]

[-1/2 -1/2 5]

? e1 = [ 1, 1/4 , 0; 0,1,0; 0,0,1]
%2 = 
[1 1/4 0]

[0 1 0]

[0 0 1]

?  a1 = mattranspose(e1) * a * e1 
%3 = 
[2 0 -1/2]

[0 23/8 -5/8]

[-1/2 -5/8 5]

? p1 = e1
%4 = 
[1 1/4 0]

[0 1 0]

[0 0 1]

? =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

? e2 = [ 1, 0 , 1/4; 0,1,0; 0,0,1]
%5 = 
[1 0 1/4]

[0 1 0]

[0 0 1]

?  a2 = mattranspose(e2) * a1 * e2 
%6 = 
[2 0 0]

[0 23/8 -5/8]

[0 -5/8 39/8]

? p2 = e1 * e2
%8 = 
[1 1/4 1/4]

[0 1 0]

[0 0 1]

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

? e3 = [ 1, 0 , 0; 0,1,5/23; 0,0,1]
%9 = 
[1 0 0]

[0 1 5/23]

[0 0 1]

?  a3 = mattranspose(e3) * a2 * e3 
%10 = 
[2 0 0]

[0 23/8 0]

[0 0 109/23]

? p3 = p2 * e3
%11 = 
[1 1/4 7/23]

[0 1 5/23]

[0 0 1]

? =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

? p = p3
%12 = 
[1 1/4 7/23]

[0 1 5/23]

[0 0 1]

? a
%13 = 
[2 -1/2 -1/2]

[-1/2 3 -1/2]

[-1/2 -1/2 5]

?  d = mattranspose(p) * a * p 
%14 = 
[2 0 0]

[0 23/8 0]

[0 0 109/23]

? 

 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Will Jagy
  • 139,541