There exists an inverse matrix of A when detA=ad-bc0, and it is
There exists an inverse matrix of A when
0, and it is
then there exists an inverse matrix of A, and it is
From the analogy of the above formulae, the computation time of inverse matrix of NxN matrix will be O(N3N!). Computing inverse matrix with Gauss-Jordan method, the method using LU decomposition, and the method using SVD, will take a computation time of O(N3) (not confident). I will recommend not to use the formula for calculating inverse matrix of NxN matrix which N >= 4.