-1

How can matrix A be converted into a reverse matrix without using numpy?

from numpy import array
from numpy.linalg import det
import numpy as np 
A = array([[-4,1,0,1,0,0,0,0,0], 
         [1,-4,1,0,1,0,0,0,0], 
         [0,2,-4.67,0,0,1,0,0,0], 
         [1,0,0,-4,1,0,1,0,0], 
         [0,1,0,1,-4,1,0,1,0], 
         [0,0,1,0,2,-4.67,0,0,1], 
         [0,0,0,2,0,0,-4.67,1,0], 
         [0,0,0,0,2,0,1,-4.67,1], 
         [0,0,0,0,0,1,0,1,-2.67]]) 
inv_A = np.linalg.inv(A) 
print("Inverse matrix =", inv_A)
Avinash
  • 852
  • 5
  • 18
rrr b
  • 9
  • 1
  • Why would you want to complicate this procedure? Is it because of a school assignment? – Josip Juros Jun 02 '22 at 13:27
  • 3
    Does this answer your question? [Matrix inversion without Numpy](https://stackoverflow.com/questions/32114054/matrix-inversion-without-numpy) – Josip Juros Jun 02 '22 at 13:28

0 Answers0