The determinant of a square matrix can be easily computed with the help of procedure Gauss. We require three facts about determinants. First, the determinant of a triangular matrix is the product of the elements on its diagonal. Second, if a multiple of one row is added to another row, the determinant of the matrix does not change. Third, if two rows in a matrix are interchanged, the determinant changes sign. Procedure Gauss can be interpreted as a procedure for reducing a matrix to upper triangular form by interchanging rows and adding multiples of one row to another. Write a function det(n, (ai j )) that computes the determinant of an n ×n matrix. It will call procedure Gauss and utilize the arrays (ai j ) and (li ) that result from that call. Numerically verify function det by using the following test matrices with several values of n:
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.