A=
0 0 0 4
0 0 1 4
0 1 0 1
4 4 1 0
(A;E)=
0 0 0 4
0 0 1 4
0 1 0 1
4 4 1 0
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
r4+r3(作相应的列变换c4+c3)
0 0 0 4
0 0 1 5
0 1 0 1
4 5 1 2
1 0 0 0
0 1 0 0
0 0 1 1
0 0 0 1
r2-r1-r3,r1-2r4,r3-(1/2)r4
-8 0 -2 0
0 -2 1 0
-2 1 -1/2 0
0 0 0 2
1 -1 0 0
0 1 0 0
-2 -1 1/2 1
-2 0 -1/2 1
r3-(1/4)r1
-8 0 0 0
0 -2 1 0
0 1 0 0
0 0 0 2
1 -1 -1/4 0
0 1 0 0
-2 -1 1 1
-2 0 0 1
r3+(1/2)r2
-8 0 0 0
0 -2 0 0
0 0 1/2 0
0 0 0 2
1 -1 -3/4 0
0 1 1/2 0
-2 -1 1/2 1
-2 0 0 1
令 C =
1 -1 -3/4 0
0 1 1/2 0
-2 -1 1/2 1
-2 0 0 1
则 C^TAC =
-8 0 0 0
0 -2 0 0
0 0 1/2 0
0 0 0 2
令 X=CY 则 f = -8y1^2 -2y2^2 + 1/2y3^2 + 2y4^2.