Skip to content

PSriVarshan/INVERSE-OF-A-MATRIX

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

INVERSE-OF-A-MATRIX

Aim:

To write a python program to find the inverse of a matrix

Equipment’s required:

  1. Hardware – PCs
  2. Anaconda – Python 3.7 Installation / Moodle-Code Runner

Algorithm:

Step 1:

Import the numpy module to use built-in functions for calculations

Step 2:

Prepare the list from matrix's each row and assign in np.array()

Step 3:

Using the np.linalg.inv(), we can find the Inverse of the given matrix.

Step 4:

End the program

Program:

#Program to find the inverse of a matrix.
#Developed by: P.Sri Varshan
#RegisterNumber: 22008051
import numpy as np
A = np.array([[2,1,1],[1,1,1],[1,-1,2]])
B = np.linalg.inv(A)
print(B)

Output:

Result:

Thus the inverse of given matrix is successfully solved using python program

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published