Mathcad Example 7

Determinant of a Square Matrix

Recall that there is a real number associated with every square matrix called its determinant. This number is very important because it tells us whether or not the square matrix has an inverse. The following is a Mathcad implementation of the determinant of a matrix.

First we define a square matrix.



Now we define two functions. Recall that in the definition of the determinant of a square matrix, we are called upon to remove a row and column from the original matrix. The following two functions will accomplish this.





Recall that the definition of the determinant of a square matrix is a recursive definition. The following function will implement the definition.



Now we apply the function to a.