Operations on Matrices

import numpy as npA = np.array([[4,1,7],[2,1,8],[3 ,7,1]])B = np.array([[6,1,1],[2,1,5],[2,3,1]])C=A.dot(B)print(“Values of First 2D Matrixn”,A)print(“Values of Second 2D Matrixn”,B)print(“———————————————“)print(“Multiplication of Matricesn”,C)print(“n”)Ainv=np.linalg.inv(A)Binv=np.linalg.inv(B)print(“Inverse of First Matrixn”,Ainv)print(“Inverse of Second Matrixn”,Binv)print(“n”)AI=Ainv.dot(A)BI=Binv.dot(B)print(“Multiplication of First Matrix and their Inversen”,AI)print(“Multiplication of Second Matrix and their Inversen”,BI)AD=np.linalg.det(A)BD=np.linalg.det(B)print(“n”)print(“Determinant of First Matricx:”,AD)print(“Determinant