Question
The inverse of a square matrix A is the unique matrix B that satisfies A x B = I where I is the identity matrix.
The inverse of a square matrix A is the unique matrix B that satisfies A x B = I where I is the identity matrix.
A common method (Gauss-Jordan) to find the inverse of a matrix A is to concatenate the identity matrix I to the right-side of the original matrix (A| I) and apply the series of elementary row operations (multiplying by a scalar and adding it to another row) that converts the original matrix into the identity matrix. Then, the concatenated part which initially starts as the identity matrix becomes B, the inverse of the original matrix ( I | B).
Write a function matinv(a) that takes a square matrix (list of lists) of float variables as input and returns the inverse of a. Do not import any external libraries for full credit.
python- not use numpy
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started