I'm using the inverse matrix function inv()
in Python.
Im calculating the inverse of a 3x3 matrix, but when I multiply the result with the original matrix, I don't get the unity matrix, why?
Example:
AA = [[1,6,5],[2,3,1],[1,1,7]]
>>> inv(AA)
array([[-0.31746032, 0.58730159, 0.14285714],
[ 0.20634921, -0.03174603, -0.14285714],
[ 0.01587302, -0.07936508, 0.14285714]])
>>> inv(AA) * AA
array([[-0.31746032, 3.52380952, 0.71428571],
[ 0.41269841, -0.0952381 , -0.14285714],
[ 0.01587302, -0.07936508, 1. ]])
>>> inv(AA) * AA
array([[-0.31746032, 3.52380952, 0.71428571],
[ 0.41269841, -0.0952381 , -0.14285714],
[ 0.01587302, -0.07936508, 1. ]])
...which is not the unity matrix I. What am I missing?