解:
1 -1 2 1 0 0
(A,E)= -1 1 0 0 1 0
2 1 2 0 0 1
1 -1 2 1 0 0
r2+r1得 0 0 2 1 1 0
2 1 2 0 0 1
1 -1 2 1 0 0
r3-2r1得 0 0 2 1 1 0
0 3 -2 -2 0 1
1 -1 2 1 0 0
r2<->r3得 0 3 -2 -2 0 1
0 0 2 1 1 0
1 -1 2 1 0 0
1/3·r2 0 1 -2/3 -2/3 0 1/3
1/2·r3得 0 0 1 1/2 1/2 0
1 0 4/3 1/3 0 1/3
r1+r2得 0 1 -2/3 -2/3 0 1/3
0 0 1 1/2 1/2 0
1 0 0 -1/3 -2/3 1/3
r1-4/3·r3得 0 1 -2/3 -2/3 0 1/3
0 0 1 1/2 1/2 0
1 0 0 -1/3 -2/3 1/3
r2+2/3·r3得 0 1 0 -1/3 1/3 1/3
0 0 1 1/2 1/2 0
-1/3 -2/3 1/3
所以逆矩阵为:-1/3 1/3 1/3
1/2 1/2 0