mul=np.array([[ 2.79358336e-03, -4.33801272e-03, 1.49405606e-01, -1.49494674e-01],
[-4.33801272e-03, 6.73628032e-03, -2.32004399e-01, 2.32142708e-01],
[ 1.49405606e-01, -2.32004399e-01, 7.99047014e+00, -7.99523365e+00],
[-1.49494674e-01, 2.32142708e-01, -7.99523365e+00 , 8.00000000e+00]])
我算出来的逆矩阵是:
ni=[[1.15688790e+09 8.31687162e+08 6.45472327e+08 6.42572567e+08]
[8.31687176e+08 2.31447075e+09 1.72043424e+09 1.66778988e+09]
[6.45472390e+08 1.72043428e+09 5.47332438e+09 5.43220196e+09]
[6.42572630e+08 1.66778992e+09 5.43220196e+09 5.39257748e+09]]
然后,print(np.dot(mul,ni)) 结果是:
[[ 0.9793222 -0.3413915 -0.14888251 -0.32711732]
[ 0.0321095 1.53012961 0.23119211 0.5079639 ]
[ -1.10588455 -18.25820923 -6.96250153 -17.49479675]
[ 1.10654449 18.26909256 7.96724701 18.50522614]]
这个根本不是单位阵啊。怎么回事呢?
但是,我用print(np.dot(mul,np.linalg.inv(mul))),能得到单位阵:
[[ 1.00000000e+00 0.00000000e+00 0.00000000e+00 -1.19209290e-07]
[-2.98023224e-08 1.00000006e+00 -2.38418579e-07 0.00000000e+00]
[ 9.53674316e-07 -1.90734863e-06 1.00000000e+00 7.62939453e-06]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]]
--
FROM 120.242.253.*