1

hey Guys i want to reduce this Quadratic Formula using Gaussian reduction:

$$q(x)=x^2_{1}+2 x_{1}x_{2}-x_{1}x_{3}-2x^2_{2}+x²_{3}$$

Now, if there is a Method like say an Algorithm please show it to me thanks in advance

  • Is there a difference between $x_2^2$ and $x²_2$? – Mundron Schmidt Jul 04 '17 at 11:16
  • Sorry no it was just a typing mistake – Mohamed.Lalioui Jul 04 '17 at 11:16
  • Are you referring to Lagrange's reduction which uses the idea of completing the square? – StubbornAtom Jul 04 '17 at 11:22
  • If you view this as a quadric, there are quite a few algorithms given here: https://math.stackexchange.com/questions/146204/finding-the-transformation-to-a-canonical-form-for-a-quadric-surface – Dirk Jul 04 '17 at 11:22
  • Sorry i don't know the exact nomenclature used in Anglo-saxonic system but we call it ( La réduction de Gauss) so i figured it would be Gaussian Reduction but then again i remembered that it might be misunderstood for Gaussian elimination However I have never heard of Lagrange's Method ?perhaps it has something to do with this ? – Mohamed.Lalioui Jul 04 '17 at 11:26
  • If you want to reduce the quadratic form to its canonical form, it is equivalent to diagonalising the matrix of the quadratic form. The Lagrange algorithm is shown in this paper. – StubbornAtom Jul 04 '17 at 11:39
  • https://math.stackexchange.com/questions/1271406/reduction-of-quadratic-forms – Raffaele Jul 04 '17 at 11:41

2 Answers2

1

Here is the algorithm I asked about at http://math.stackexchange.com/questions/1388421/reference-for-linear-algebra-books-that-teach-reverse-hermite-method-for-symmetr

when all is said and done, it gives your quadratic form as $$ \left(x + y - \frac{z}{2}\right)^2 - 3 \left( y - \frac{z}{6}\right)^2 + \frac{5}{6} z^2$$

==============================================================

PARI/GP is free software, covered by the GNU General Public License, and comes WITHOUT ANY WARRANTY WHATSOEVER.

Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.

parisize = 4000000, primelimit = 500509
? g = [ 1,1,-1/2; 1,-2,0; -1/2,0,1]
%1 = 
[1 1 -1/2]

[1 -2 0]

[-1/2 0 1]

? gt = mattranspose(g)
%2 = 
[1 1 -1/2]

[1 -2 0]

[-1/2 0 1]

? g - gt
%3 = 
[0 0 0]

[0 0 0]

[0 0 0]

? v = [ x;y;z]
%4 = 
[x]

[y]

[z]

? vt = mattranspose(v)
%5 = 
[x y z]

? vt * v
%6 = 
[x^2 + (y^2 + z^2)]

? vt * g * v
%7 = 
[x^2 + (2*y - z)*x + (-2*y^2 + z^2)]

? g
%8 = 
[1 1 -1/2]

[1 -2 0]

[-1/2 0 1]

? p1 =  [ 1,-1,1/2; 0,1,0; 0,0,1]
%9 = 
[1 -1 1/2]

[0 1 0]

[0 0 1]

? p1t = mattranspose(p1)
%10 = 
[1 0 0]

[-1 1 0]

[1/2 0 1]

? g1 = p1t * g * p1
%11 = 
[1 0 0]

[0 -3 1/2]

[0 1/2 3/4]

? p2 =  [ 1,0,0; 0,1,1/6; 0,0,1]
%12 = 
[1 0 0]

[0 1 1/6]

[0 0 1]

? p2t = mattranspose(p2)
%13 = 
[1 0 0]

[0 1 0]

[0 1/6 1]

? g2 = p2t * g1 * p2
%14 = 
[1 0 0]

[0 -3 0]

[0 0 5/6]

? d = g2
%15 = 
[1 0 0]

[0 -3 0]

[0 0 5/6]

? p = p1 * p2
%16 = 
[1 -1 1/3]

[0 1 1/6]

[0 0 1]

? pt = mattranspose(p)
%17 = 
[1 0 0]

[-1 1 0]

[1/3 1/6 1]

? pt * g * p
%18 = 
[1 0 0]

[0 -3 0]

[0 0 5/6]

? d
%19 = 
[1 0 0]

[0 -3 0]

[0 0 5/6]

? matdet(p)
%20 = 1
? q = matadjoint(p)
%21 = 
[1 1 -1/2]

[0 1 -1/6]

[0 0 1]

? qt = mattranspose(q)
%22 = 
[1 0 0]

[1 1 0]

[-1/2 -1/6 1]

? qt * d * q
%23 = 
[1 1 -1/2]

[1 -2 0]

[-1/2 0 1]

? g
%24 = 
[1 1 -1/2]

[1 -2 0]

[-1/2 0 1]

? qt * d * q - g
%25 = 
[0 0 0]

[0 0 0]

[0 0 0]

? 

============================================================

Will Jagy
  • 139,541
0

I got $$\left(\frac{\sqrt{3} x}{2}+\frac{2 y}{\sqrt{3}}\right)^2+\left(\frac{x}{2}-z\right)^2-\left(\sqrt{\frac{10}{3}} y\right)^2$$ First I wrote $$(h y+j x)^2-k y^2+\left(\frac{x}{2}-z\right)^2$$ which once expanded becomes $$\left(j^2+\frac{1}{4}\right) x^2+2 h j x y+h^2 y^2-k y^2-x z+z^2$$ hence $j^2+\dfrac{1}{4}=1$ and $j=\dfrac{\sqrt 3}{2}$

so the expression becomes $$h^2 y^2+h\sqrt{3} x y-k y^2+x^2-x z+z^2$$ This gives $h\sqrt{3}=2$ and then $h=\dfrac{2}{\sqrt 3}$ and again the expression becomes $$x^2+2 x y-x z+\frac{4 y^2}{3}-k y^2+z^2$$ this means that $\dfrac{4}{3}-k=-2$ that is $k=\sqrt{\dfrac{10}{3}}$

And the expression is equal to the given $$x^2+2 x y-x z-2 y^2+z^2$$

hope this helps

Raffaele
  • 26,371
  • well thanks a lot but my Professor Got another saying in the matter he got : $$ Q(x)= (x+y-\frac 12z)^2-3(y-\frac 16 z)^2+ \frac 56 z^2 $$ – Mohamed.Lalioui Jul 04 '17 at 12:16
  • So i guess the writing or the reduction of Quadratic Forms is not unique ? – Mohamed.Lalioui Jul 04 '17 at 12:19
  • @Mohamed.Lalioui not unique. Here is a method that begins with a symmetric matrix (the Hessian of quadratic form, or half the Hessian if you prefer), call that matrix $G,$ and solves $P^T G P = D$ diagonal, with $\det P = 1.$ http://math.stackexchange.com/questions/1388421/reference-for-linear-algebra-books-that-teach-reverse-hermite-method-for-symmetr If you then take $Q = P^{-1},$ you have $Q^T DQ = G,$ as in your professor's answer. Oh, if the entries of $G$ are integers or rational, the entries of $D,P,Q$ are also rational. – Will Jagy Jul 04 '17 at 19:10