A = ((1,2),(2,3))
print(np.linalg.det(A))
X = np.arange(8)
Y = X + 0.5
C = 1.0 / np.subtract.outer(X, Y)
print(X)
print(Y)
print("====C====")
print(C)
print(np.linalg.det(C))
-1.0
[0 1 2 3 4 5 6 7]
[ 0.5 1.5 2.5 3.5 4.5 5.5 6.5 7.5]
====C====
[[-2. -0.66666667 -0.4 -0.28571429 -0.22222222 -0.18181818
-0.15384615 -0.13333333]
[ 2. -2. -0.66666667 -0.4 -0.28571429 -0.22222222
-0.18181818 -0.15384615]
[ 0.66666667 2. -2. -0.66666667 -0.4 -0.28571429
-0.22222222 -0.18181818]
[ 0.4 0.66666667 2. -2. -0.66666667 -0.4
-0.28571429 -0.22222222]
[ 0.28571429 0.4 0.66666667 2. -2. -0.66666667
-0.4 -0.28571429]
[ 0.22222222 0.28571429 0.4 0.66666667 2. -2.
-0.66666667 -0.4 ]
[ 0.18181818 0.22222222 0.28571429 0.4 0.66666667 2. -2.
-0.66666667]
[ 0.15384615 0.18181818 0.22222222 0.28571429 0.4 0.66666667
2. -2. ]]
3638.16363712
- By the way, I can't understand the meaning of the determinant of Cauchy matrix, so please teach me about that.