matrix Inverse in maths and python

Inverse of the matrix in Python.
suppose we have a (2, 2) matrix.

 >>> A = np.array([[2, 1], [3, 3]])      
 >>> A.I                                 
 matrix([[ 1.        , -0.33333333],     
             [-1.        ,  0.66666667]])


Lets dive in

 steps behind inverse. First of all               1                [2,  1]
                                    (A[1,1]*A[2,2] - A[1,2]*A[2,1])[3,  3]   ,

put the values e.g :-   A[1, 1] = 2 

    1      =  1 [3   -1]            

2*3 - 1*3     3 [-3   2] 


#cross exchange the values of A[1, 1] and A[2, 2]
#and put the (-) sign on A[1, 2] and A[2, 1]

then divide          ⇧⇧⇧           the matrix elements by 1/3 

out[1]:  matrix([[ 1.        , -0.33333333],     
                 [-1.        ,  0.66666667]])    

Comments