# Definition of the Determinant

The **determinant** is a unique number associated with a square matrix. In this section, we introduce notation for a determinant and we show how to compute the determinant for any square matrix.

**Notation for a Determinant**

There are atleast three ways to denote the determinant of a square matrix.

· Denote the determinant by vertical lines around the matrix name; thus, the determinant of matrix A would be indicated by |**A**|.

· Another approach is to enclose matrix elements within vertical straight lines, as shown below.

· And finally, some references refer to the determinant of **A** as det **A**. Thus, |**A**| = Det **A**. By the ways, here, we will use the first option; that is, we will refer to the determinant of **A** as |**A**|.

**How to Compute the Determinant of a 2 **×** 2 Matrix**

Suppose **A** is a 2 × 2 matrix with elements *a*_{ij}, as shown below.

We compute the determinant of **A** according to the following formula.

|**A**| = (a_{11} × a_{22}) – (a_{12} × a_{21})

**How to Compute the Determinant of an ***n* ×** ***n* Matrix

The formula for computing the determinant of a 2 × 2 matrix (shown above) is actually a special case of the general algorithm for computing the determinant of any square matrix.

|**A**| = Σ ( + ) *A*_{1q}*A*_{2r}*A*_{3s} . . . *A*_{nz}

This algorithm requires some explanation. Here are the key points:

· The determinant is the sum of product terms made up of elements from the matrix.

· Each product term consists of *n* elements from the matrix.

· Each product term includes one element from each row and one element from each column.

· The number of product terms is equal to *n*! (where *n*! refers to *n* factorial).

· By convention, the elements of each product term are arranged in ascending order of the left-hand (or row-designating) subscript.

· To find the sign of each product term, we count the number of inversions needed to put the right-hand (or column-designating) subscripts in numerical order. If the number of inversions is even, the sign is positive; if odd, the sign is negative.

The whole procedure can be understood using one example.

Suppose **A** is a 3 × 3 matrix with elements *A*_{ij}, as shown below:

To begin, let's list each product term. In constructing this list, we will arrange elements of each product term in ascending order of their row-designating subscript. Our list of product terms appears below:

|**A**| = Σ (±) *a*_{1q}*a*_{2r}*a*_{3s} . . . *a*_{nz}

|**A**| = ± *a*_{11}*a*_{22}*a*_{33} ± *a*_{12}*a*_{23}*a*_{31} ± *a*_{13}*a*_{21}*a*_{32} ± *a*_{13}*a*_{22}*a*_{31} ± *a*_{12}*a*_{21}*a*_{33} ± *a*_{11}*a*_{23}*a*_{32}

Note that we have 3! or 6 product terms, each consisting of one element from each row and one element from each column. The task remaining is to find the sign for each product term. To do this, we count the number of inversions needed to put elements in ascending order of their column-designating subscript.

To demonstrate how to count inversions, let's look at two of the product terms.

· Consider the second product term in the list: *a*_{12}*a*_{23}*a*_{31}. To put all of the column-designating subscripts in ascending order, we need to move *a*_{31} from the end of the term to the front of the term, which results in: *a*_{31}*a*_{12}*a*_{23}. This movement counts as two inversions, since we moved *a*_{31} two positions to the left. Since two is an even number, the sign of that product term should be positive.

· Consider the last product term in the list: *a*_{11}*a*_{23}*a*_{32}. To put all of the column-designating subscripts in ascending order, we need to interchange the second and third elements, which results in: *a*_{11}*a*_{32}*a*_{23}. This counts as one inversion, since we moved *a*_{32} one position to the left. Since one is an odd number, the sign of that product term should be negative.

If we repeat this process for each of the other product terms, we get the following formula for the determinant of a 3 x 3 matrix.

|**A**| = Σ (±) *a*_{1q}*a*_{2r}*a*_{3s} . . . *a*_{nz}

|**A**| = + *a*_{11}*a*_{22}*a*_{33} + *a*_{12}*a*_{23}*a*_{31} + *a*_{13}*a*_{21}*a*_{32} - *a*_{13}*a*_{22}*a*_{31} - *a*_{12}*a*_{21}*a*_{33} - *a*_{11}*a*_{23}*a*_{32}

We can employ the same process to compute the determinant for any size matrix. The same concept can also be written as follows:

Let **A** be an n x n matrix. Then the determinant of **A** is the number given by

where the sum is taken over all possible permutations on n elements and the sign is positive if the permutation is even and negative if the permutation is odd.

**Example 1:** Calculate the determinant of A where A=

Solution: Because **A** is a 2 × 2 matrix, we know that the determinant algorithm has *2*! or 2 product terms. And each product term includes one element from each row and one element from each column. We list the product terms below, with the elements of each product term arranged in ascending order of the left-hand (or row-designating) subscript.

|**A**| = + *a*_{11}*a*_{22} + *a*_{12}*a*_{21}

To determine whether each product term is preceded by a plus or minus sign, we count the inversions needed to put all of the column-designating subscripts in ascending order.

· The column-designating subscripts for the first term, *a*_{11}*a*_{22}, are already in ascending order; so the first term needs zero inversions. Therefore, the sign of the first term is positive.

· For the second term, *a*_{12}* a*_{ 21}, we must move the second element *a*_{21} one position to the left; that is, we need one inversion to put the column-designating subscripts in ascending order. Since one is an odd number, the sign of the second term is negative.

The formula for the determinant of a 2 × 2 matrix is thus:

|**A**| = + *a*_{11}*a*_{22} - *a*_{12}*a*_{21}

So the determinant of matrix **A** is:

|**A**| = (5×6) – (2×1) = 30 - 2 = 28

**Example 2:** For the given matrix *A*, find the determinant of *A*.

Solution: We can simply proceed in the following way:

det*A* = 3×(2 – 6) – 4×(1 – 9) + 5×(2 – 6)

det*A* = 3×(– 4) – 4×(– 8) + 5×(– 4)

det*A* = 0

**Example 3:** Find the determinant value of the 3x3 matrix,

**Solution:** Let the matrix be *A*.

det (**A**) = 1(3 ×1 – 4 × 1) – 2 (1×1 – 1×1) + 1(1×4 – 1×3)

= 1 (3 – 4) – 2(1 – 1) + 1(4 – 3)

= –1 + 0 + 1

det (**A**) = 0