3 -1 4 | 1 0 0
A|I = 1 0 0 | 0 1 0
2 1 -5 | 0 0 1
--> 交换行1,2
1 0 0 | 0 1 0
3 -1 4 | 1 0 0
2 1 -5 | 0 0 1
--> 行2 = 行2 - 行1 * 3,
行3 = 行3 - 行1 * 2
1 0 0 | 0 1 0
0 -1 4 | 1 -3 0
0 1 -5 | 0 -2 1
--> 行3 = 行3 + 行2
1 0 0 | 0 1 0
0 -1 4 | 1 -3 0
0 0 -1 | 1 -5 1
--> 行3 = 行3 * (-1)
1 0 0 | 0 1 0
0 -1 4 | 1 -3 0
0 0 1 | -1 5 -1
--> 行2 = 行2 * (-1)
1 0 0 | 0 1 0
0 1 -4 | -1 3 0
0 0 1 | -1 5 -1
--> 行2 = 行2 + 4 * 行3
1 0 0 | 0 1 0
0 1 0 | -5 23 -4
0 0 1 | -1 5 -1
故逆矩阵为:
0 1 0
-5 23 -4
-1 5 -1
3 6 1 | 1 0 0
B|I = 3 -3 2 | 0 1 0
6 9 2 | 0 0 1
-->行2 = 行2 - 行1,行3 = 行3 - 2 * 行1
3 6 1 | 1 0 0
0 -9 1 | -1 1 0
0 -3 0 | -2 0 1
-->行3 = 行3 * (-1)
3 6 1 | 1 0 0
0 -9 1 | -1 1 0
0 3 0 | 2 0 -1
-->交换 行3,行2
3 6 1 | 1 0 0
0 3 0 | 2 0 -1
0 -9 1 | -1 1 0
-->行1 = 行1 - 2 * 行2,行3 = 行3 + 3 * 行2
3 0 1 | -3 0 2
0 3 0 | 2 0 -1
0 0 1 | 5 1 -3
-->行1 = 行1 - 行3
3 0 0 | -8 -1 5
0 3 0 | 2 0 -1
0 0 1 | 5 1 -3
-->行1 = 行1 * 1/3,行2 = 行2 * 1/3
1 0 0 | -8/3 -1/3 5/3
0 1 0 | 2/3 0 -1/3
0 0 1 | 5 1 -3
逆矩阵为
-8/3 -1/3 5/3
2/3 0 -1/3
5 1 -3