Section 4.2

The Determinant of a Square Matrix

> with(linalg):

```Warning, the protected names norm and trace have been redefined and unprotected
```

>

Definition

The notion of "determinants" is related to the solution of linear systems.

We will define determinants of a square (n x n) matrix A in terms of determinants of (n-1 x n-1) matrices.

Case 1 (1 x 1)

A = a, det(A) = a. A is singular if and only if det(A) = 0.

Case 2 (2 x 2)

>

> A := matrix(2,2,[a,b,c,d]);

Case A.) Assume a is not zero.

A is non-singular as long as the diagonal elements are not zero, i.e.

> simplify(A[1,1]*A[2,2]) <> 0;

>

Case B.) Assume a is zero.

> A := matrix(2,2,[0,b,c,d]);

> A := swaprow(A,1,2);

> simplify(A[1,1]*A[2,2]) <> 0;

>

det(A) = ad - bc A is singular if and only if det(A) = 0.

********************************************************************

The determinant of a 2x2 matrix is equal to the difference between the products of the

diagonal and the off diagonal elements.

********************************************************************

Case 3 (n x n)

The process is a bit cumbersome and tedious for matrices of larger sizes. One method for

obtaining the determinant of a large matrix is referred to as the " Cofactor Expansion " :

1. Select a row (column) where the expansion will occur.

2. Find the minor of each entry in the row (column) chosen in (1). The minor of the

element is the matrix obtained by deleting the i-th row and the j-th column:

> A:=matrix([[a11,a12,a13],[a21,a22,a23],[a31,a32,a33]]);

>

The minors of entries are respectively given by

> M11:=minor(A,1,1);
M12:=minor(A,1,2);
M13:=minor(A,1,3);

>

3. Compute the cofactor of each entry in the row (column) chosen in (1).

The cofactor of the entry is *det( );

> C11:=(-1)^2*det(M11);
C12:=(-1)^3*det(M12);
C13:=(-1)^4*det(M13);

>

Finally,

4. Compute the determinant as the sum of the product of each entry and its cofactor for

each entry of the row chosen in (1)

> `det(A)` = a11*C11 +a12*C12+a13*C13;

>

> simplify(a11*C11 +a12*C12+a13*C13);

>

This is exactly the value we would get if we execute the Maple function det(A) .

> det(A);

>

********************************************************************

The determinant of a 1 x 1 matrix is its sole entry; it is a first order determinant. Let n > 1,

and assume that determinants of order less than n have been defined. Let A=[ ] be an

n x n matrix. The cofactor of in A is = *det( ) where the minor of the

element is the matrix obtained by deleting the i-th row and the j-th column of A. The

determinant of A is

(Arcoss row i)

det(A) = + . . . +

(Down Column j)

det(A) = + . . . +

********************************************************************

Determinants and singular matrix.

>

> A:=matrix([[a11,a12,a13],[a21,a22,a23],[a31,a32,a33]]);

> simplify(A3[1,1]*A3[2,2]*A3[3,3]);

> det(A);

>

Example 1:

>

> A := matrix([[2,5,7],[6,4,2],[8,4,1]]);

>

The minors of entries are respectively given by

> M11:=minor(A,1,1);
M12:=minor(A,1,2);
M13:=minor(A,1,3);

The cofactor of the entry is *det( );

> C11:=(-1)^2*det(M11);
C12:=(-1)^3*det(M12);
C13:=(-1)^4*det(M13);

Determinant of A

> `det(A)` = A[1,1]*C11 +A[1,2]*C12+A[1,3]*C13;

>

> A := matrix([[2,5,7],[6,4,2],[8,4,1]]);

The minors of entries are respectively given by

> M12:=minor(A,1,2);
M22:=minor(A,2,2);
M32:=minor(A,3,2);

The cofactor of the entry is *det( );

> C12:=(-1)^3*det(M12);
C22:=(-1)^4*det(M22);
C32:=(-1)^5*det(M32);

Determinant of A

> `det(A)` = A[1,2]*C12 +A[2,2]*C22+A[3,2]*C32;

>

Properties of Determinants

**************************************************

Property 1 : det(A) = det( ).

**************************************************

Example 2:

>

> A := matrix([[2,5,7],[6,4,2],[8,4,1]]);

> `det(A)` = det(A);

> `A^T` = transpose(A);

> `det(A^T)` = det(transpose(A));

>

*******************************************************

Property 2 : If two different rows of a square matrix A are interchanged,

the determinant of the resulting matrix is -det(A).

*******************************************************

Example 3:

>

> A := matrix([[2,5,7],[6,4,2],[8,4,1]]);

> `det(A)` = det(A);

> A1 := swaprow(A,1,2);

> `det(A1)` = det(A1);

>

*******************************************************

Property 3 : If two rows of a square matrix A are equal, then det(A) = 0.

*******************************************************

Example 4:

>

> A := matrix([[2,5,7],[6,4,2],[6,4,2]]);

> `det(A)` = det(evalm(A));

>

*******************************************************

Property 4 : If a single row of a square matrix A is multiplied by a scalar r,

the determinant of the resulting matrix is r* det(A).

*******************************************************

Example 5:

>

> A := matrix([[2,5,7],[6,4,2],[8,4,1]]);

> `det(A)` = det(A);

> A1 := mulrow(A,1,2);

> `det(A1)` = det(A1);

>

*******************************************************

Property 5 : If the product of one row of a square matrix A by a scalar is

added to a different row of A, the determinant of the resulting

matrix is the same as the det(A).

*******************************************************

Example 6:

>

> A := matrix([[2,5,7],[6,4,2],[8,4,1]]);

> `det(A)` = det(evalm(A));

> `det(A1)` = det(A1);

>

*******************************************************

Property 6 : A square matrix A is invertible if and only if .

Equivalently, A is singular if and only if .

*******************************************************

Example 7:

>

> A := matrix([[2,5,7],[6,4,2],[8,4,1]]);

> `det(A)` = det(A);

> inverse(A);

>

> A := matrix([[1,-3,1,-2],[2,-5,-1,-2],[0,-4,5,1],[-3,10,-6,8]]);

> `det(A)` = det(A);

> inverse(A);

```Error, (in inverse) singular matrix
```

>

*******************************************************

Property 7 : If A and B are n x n matrices then det(AB) = det(A)det(B).

*******************************************************

Example 8:

>

> A:=matrix([[2,5,7],[6,4,2],[8,4,1]]); B:=matrix([[3,7,7],[9,6,2],[11,4,15]]);

> `det(A)` = det(A);

> `det(B)` = det(B);

> `det(A)*det(B)` = det(A)*det(B);

> AB:=multiply(A,B);

> `det(AB)` = det(AB);

>

******************************************************

Property 8 : In general, det( A + B) is not equal to det(A) + det(B).

******************************************************

Example 9:

>

> A:=matrix([[2,5,7],[6,4,2],[8,4,1]]); B:=matrix([[3,7,7],[9,6,2],[11,4,15]]);

> `det(A)` = det(A);

> `det(B)` = det(B);

> `det(A) + det(B)` = det(A) + det(B);

> `A+B` := evalm(A &+ B);

> `det(A+B)` = det(evalm(A &+ B));

>

*****************************************************************************

Property 9 : The determinant of a triangular matrix is equal to the product of its diagonal elements.

*****************************************************************************

Example 10:

>

> U:=matrix([[3,5,6,7,8],[0,3,2,0,5],[0,0,2,5,0],
[0,0,0,4,7],[0,0,0,0,2]]);

> L:=transpose(U);

> `det(U)` = det(U);

> `det(L)` = det(L);

>

Summary

An nxn matrix A is nonsingular ( invertible)

if and only if

A is row equivalent to the identity matrix

if and only if

the determinant of the matrix A is not zero

if and only if

the homogeneous system associated with A has the trivial solution

if and only if

the nonhomogeneous system associated with A has a unique solution

*********************************************************************

Exercises

1, 5, 7, 10, 11, 13, 15-25, 27 ,29-31.