So, I've been working on this problem for a few hours today and have come up with this procedure (below) but need advice on how to change it so that it works for a square matrix only and then finally how to form the inverse matrix to finish the question. Any ideas welcome...
# LU decomposition...
[b]1. I am asked to write a procedure that will inverse square matices using LU factorization with partial pivoting.
[b]2. I am also told that the procedure should return the inverse matrix and report an error if it cannot do so.
[b]3. So far I've come up with the code below but...