Python Matrix Inversion


The scripts on this page require the utility module

* * *

Python Scripts

A script for calculating the inverse of a square matrix is given at:

The script uses the function: from numpy import linalg

Here is a script which calculates the pseudo inverse of a singular matrix:

* * *

Fortran Program

Here is a Fortran program which performs matrix inversion using the LU decomposition method: INVERSE_MATRIX.F

It is compiled via:

gfortran -o INVERSE_MATRIX INVERSE_MATRIX.F -llapack -lblas

The program uses the subroutines: DGETRF & DGETRI

It compiles & runs under both Ubuntu & Cygwin.

* * *

See also:

Tom Irvine

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s