M2160-1 7^{th} Homework Assignment Due Apr. 26, 2006. |
---|
Write a program that uses Gaussian Elimination to find the inverse of a matrix. The program should ask the user for the size of the matix, n , and then ask to enter the n × n matrix A . Then it should print the inverse matrix A^{-1} if the matrix is invertible, or report that the matix is singular.
One way to do the program is to create an n × 2n augmented matrix by adjoining an identity matrix, (A,I) and then do Gauss-Jordan elimination with partial pivoting to row-reduce to the matrix (I,B) . Then the inverse is given by A^{-1} = B .
E-mail your solutions to treiberg@math.utah.edu.