To write a python program to find the inverse of a matrix
- Hardware – PCs
- Anaconda – Python 3.7 Installation / Moodle-Code Runner
#Program to find the inverse of a matrix.
#Developed by:Sriram V
#RegisterNumber:23013561
import numpy as np
matrix = np.array([[6, 2, 3],
[3, 1, 1],
[10, 3, 4]])
try:
inverse = np.linalg.inv(matrix)
print(inverse)
except np.linalg.LinAlgError:
print("The matrix is singular and does not have an inverse:")
Thus the inverse of given matrix is successfully solved using python program