import numpy as np rot_matrix = 0.5*np.asarray ([[1, 1.,1, 1], [ 1., 1, -1,-1], [ np.sqrt(2), -np.sqrt(2), 0,0], [0,0,np.sqrt(2),-np.sqrt(2)]]) # 判断矩阵是否正交 print(rot_matrix @ rot_matrix.T) # 方法1
判断矩阵是否正交?