## Matrix Determinant And Inverse

### May 23, 2017

Today’s exercise is preliminary to the exercise we will have later this week. You are to write programs that calculate the determinant and inverse of a matrix. I won’t go into the math involved behind the matrix arithmetic, as there are many sources on the internet that know far more about the process than I. Google for “matrix determinant” or “matrix inverse”; I used YouTube for my instruction.

Your task is to write programs that calculate the determinant and inverse of a matrix. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.

Advertisements

Pages: 1 2

No worse than

addend, summand, subtrahend, minuend, multiplicand.In Python, the determinant part.

I’ve found these two links with explanations and code. It’s quite a hassle for larger dimensions….

Inverse of a matrix: http://www.geeksforgeeks.org/adjoint-inverse-matrix/

Determinant of a matrix: http://www.geeksforgeeks.org/determinant-of-a-matrix/

Though, I haven’t tried their code yet.

Here in Python an implementation of an LU decomposition. Once the matrix is decomposed, the determinant and inverse are straightforward.

Klong (for determinant)