Skip to content

Determinants

The concept of determinants originated from efforts to solve systems of linear equations, with early methods documented in ancient Babylonian and Chinese texts. In the 17th century, European mathematicians like Leibniz began formalizing determinants while solving linear systems, leading to further advancements by Cramer and Laplace in the 18th century. Determinants were systematically studied by Gauss and others in the 19th century, solidifying their role in linear algebra and matrix theory as a crucial tool for understanding properties of matrices and transformations.

For more details, see this link.

System of Linear Equations

Consider a system of linear equations with two variables:

\[ \begin{align} a_1x + b_1y &= c_1, \\ a_2x + b_2y &= c_2. \end{align} \]

Solving by Elimination

To solve this system using elimination, we aim to eliminate one of the variables by combining the equations.

Multiply the first equation by \(b_2\) and the second by \(b_1\):

\[ \begin{align} b_2(a_1x + b_1y) &= b_2c_1, \\ b_1(a_2x + b_2y) &= b_1c_2. \end{align} \]

Expanding both equations, we have:

\[ \begin{align} a_1b_2x + b_1b_2y &= b_2c_1, \\ a_2b_1x + b_1b_2y &= b_1c_2. \end{align} \]

Subtract the second equation from the first to eliminate \(y\):

\[ (a_1b_2 - a_2b_1)x = b_2c_1 - b_1c_2. \]

Solving for \(x\), we get:

\[ x = \frac{b_2c_1 - b_1c_2}{a_1b_2 - a_2b_1}. \]

To find \(y\), multiply the first equation by \(a_2\) and the second by \(a_1\):

\[ \begin{align} a_2(a_1x + b_1y) &= a_2c_1, \\ a_1(a_2x + b_2y) &= a_1c_2. \end{align} \]

Expanding and then subtracting the second equation from the first:

\[ (a_2b_1 - a_1b_2)y = a_2c_1 - a_1c_2. \]

Solving for \(y\), we have:

\[ y = \frac{a_2c_1 - a_1c_2}{a_2b_1 - a_1b_2}. \]

Solution Representation

Notice that both \(x\) and \(y\) are expressed as fractions. Each fraction's numerator and denominator have a similar structure. This structure can be written compactly using symbols, known as determinants:

\[ x = \frac{\begin{vmatrix} c_1 & b_1 \\ c_2 & b_2 \end{vmatrix}}{\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix}}, \quad y = \frac{\begin{vmatrix} a_1 & c_1 \\ a_2 & c_2 \end{vmatrix}}{\begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix}}. \]

The determinant of a \(2 \times 2\) matrix is defined by:

\[ \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc. \]

Defining Determinants

To define determinants, we must first introduce two key concepts: minors and cofactors. The definition of a determinant is recursive in nature. That is, although we are aiming to define a determinant, we will first define the minor, which itself involves a determinant. This may seem circular, but it is necessary for building up the concept of determinants for larger matrices.

Minor

For an element \(a_{ij}\) in an \(n \times n\) matrix, the minor of that element, denoted as \(M_{ij}\), is the determinant of the \((n-1) \times (n-1)\) submatrix formed by removing the \(i\)-th row and \(j\)-th column from the original matrix.

Example

Consider the matrix \( \mathbf{A} \) given by:

\[ \mathbf{A} = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix}. \]
  • The minor \(M_{12}\) is obtained by removing the first row and the second column from \(\mathbf{A}\):
\[ M_{12} = \begin{vmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{vmatrix}. \]
  • Similarly, the minor \(M_{21}\), which corresponds to the element \(a_{21}\), is obtained by removing the second row and first column from \(\mathbf{A}\):
\[ M_{21} = \begin{vmatrix} a_{12} & a_{13} \\ a_{32} & a_{33} \end{vmatrix}. \]
  • The minor \(M_{22}\), corresponding to the element \(a_{22}\), is the determinant of the submatrix formed by removing the second row and the second column:
\[ M_{22} = \begin{vmatrix} a_{11} & a_{13} \\ a_{31} & a_{33} \end{vmatrix}. \]

Thus, each minor \(M_{ij}\) is a determinant of a smaller submatrix that excludes the \(i\)-th row and \(j\)-th column of the original matrix \( \mathbf{A} \).

At this point, we do not yet evaluate these determinants, as the full definition of the determinant will follow once minors and cofactors are introduced.

Cofactor

Once we have defined the minor \(M_{ij}\), we can now define the cofactor. The cofactor of an element \(a_{ij}\) in a matrix, denoted by \(C_{ij}\), is a signed version of the minor. The cofactor is given by the formula:

\[ C_{ij} = (-1)^{i+j} M_{ij}, \]

where \(M_{ij}\) is the minor of the element \(a_{ij}\), and the sign factor \((-1)^{i+j}\) introduces alternating signs depending on the position of the element within the matrix.

Example

Consider the same \(3 \times 3\) matrix \( \mathbf{A} \):

\[ \mathbf{A} = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix}. \]
  • The cofactor \(C_{12}\) is calculated as:
\[ C_{12} = (-1)^{1+2} M_{12} = (-1)^3 M_{12} = -M_{12}. \]
  • Similarly, the cofactor \(C_{21}\) is:
\[ C_{21} = (-1)^{2+1} M_{21} = (-1)^3 M_{21} = -M_{21}. \]
  • The cofactor \(C_{22}\) is:
\[ C_{22} = (-1)^{2+2} M_{22} = (-1)^4 M_{22} = M_{22}. \]

Thus, the cofactor introduces a sign (positive or negative) to the minor depending on the sum of the indices \(i\) and \(j\).

Definition of Determinants

Now that we have defined minors and cofactors, we can proceed to define the determinant of a matrix.

Determinant of a \(1 \times 1\) Matrix

The simplest case is a \(1 \times 1\) matrix. For a matrix \( \mathbf{A} = (a_{11}) \), the determinant is simply the value of the single element in the matrix:

\[ \det(\mathbf{A}) = a_{11}. \]

Determinant of an \(n \times n\) Matrix

For an \(n \times n\) matrix, the determinant is defined in terms of minors and cofactors. To find the determinant, we can choose any row or column of the matrix and sum the products of each element in that row or column with its corresponding cofactor.

Let \( \mathbf{A} \) be an \(n \times n\) matrix. The determinant of \( \mathbf{A} \), denoted as \(\det(\mathbf{A})\) or \(\begin{vmatrix} \mathbf{A} \end{vmatrix}\), is given by the following formula when expanding along the \(i\)-th row:

\[ \det(\mathbf{A}) = a_{i1}C_{i1} + a_{i2}C_{i2} + \dots + a_{in}C_{in}, \]

where \(a_{ij}\) is the element of the matrix in the \(i\)-th row and \(j\)-th column, and \(C_{ij}\) is the corresponding cofactor of that element.

Alternatively, we can expand the determinant along the \(j\)-th column:

\[ \det(\mathbf{A}) = a_{1j}C_{1j} + a_{2j}C_{2j} + \dots + a_{nj}C_{nj}. \]

The determinant can be expanded along any row or column, and the result will always be the same. Each expansion involves multiplying each element of the chosen row or column by its corresponding cofactor and then summing the results.

To understand how determinants are evaluated let us start by evaluating a 2 by 2 determinant. Then, after that we will learn how to evaluate a 3 by 3 determinant.

Determinant of a 2 by 2 matrix

To calculate the determinant of a \(2 \times 2\) matrix using the definition that we just defined, let's go step by step. Consider the matrix:

\[ \mathbf{A} = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}. \]

We will first expand the determinant along row 1, then verify we get the same result by expanding along row 2.

Expanding along Row 1

The determinant of \(\mathbf{A}\) using row 1 is given by:

\[ \det(\mathbf{A}) = a_{11}C_{11} + a_{12}C_{12}. \]

Now, let's calculate the cofactors.

  • Cofactor \(C_{11}\):

    \[ C_{11} = (-1)^{1+1} M_{11} = M_{11} = \begin{vmatrix} a_{22} \end{vmatrix} = a_{22}. \]
  • Cofactor \(C_{12}\):\

    \[ C_{12} = (-1)^{1+2} M_{12} = -M_{12} = -\begin{vmatrix} a_{21} \end{vmatrix} = -a_{21}. \]

Thus, the determinant becomes:

\[ \det(\mathbf{A}) = a_{11} \cdot a_{22} + a_{12} \cdot (-a_{21}) = a_{11}a_{22} - a_{12}a_{21}. \]
Expanding along Row 2

Now, let's expand the determinant along row 2 and verify we get the same result. The determinant is given by:

\[ \det(\mathbf{A}) = a_{21}C_{21} + a_{22}C_{22}. \]

Let's calculate the cofactors for row 2:

  • Cofactor \(C_{21}\):

    \[ C_{21} = (-1)^{2+1} M_{21} = -M_{21} = -\begin{vmatrix} a_{12} \end{vmatrix} = -a_{12}. \]
  • Cofactor \(C_{22}\):

    \[ C_{22} = (-1)^{2+2} M_{22} = M_{22} = \begin{vmatrix} a_{11} \end{vmatrix} = a_{11}. \]

Thus, expanding along row 2 gives:

\[ \det(\mathbf{A}) = a_{21} \cdot (-a_{12}) + a_{22} \cdot a_{11} = -a_{21}a_{12} + a_{22}a_{11}. \]

Rearranging the terms:

\[ \det(\mathbf{A}) = a_{11}a_{22} - a_{12}a_{21}. \]

As you can see, we get the same result whether we expand along row 1 or row 2:

\[ \det(\mathbf{A}) = a_{11}a_{22} - a_{12}a_{21}. \]

This verifies that the determinant is independent of the row chosen for expansion.

Let's now calculate the determinant of the \(2 \times 2\) matrix by expanding along both columns, in addition to the rows. We will use the matrix:

\[ \mathbf{A} = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}. \]
Expanding along Column 1

The determinant of \(\mathbf{A}\) by expanding along column 1 is given by:

\[ \det(\mathbf{A}) = a_{11}C_{11} + a_{21}C_{21}. \]

We already know the cofactors from the row expansion:

  • Cofactor \(C_{11}\):

    \[ C_{11} = a_{22}. \]
  • Cofactor \(C_{21}\):

    \[ C_{21} = -a_{12}. \]

Thus, expanding along column 1 gives:

\[ \det(\mathbf{A}) = a_{11} \cdot a_{22} + a_{21} \cdot (-a_{12}) = a_{11}a_{22} - a_{12}a_{21}. \]
Expanding along Column 2

Now, let's expand the determinant along column 2. The determinant is given by:

\[ \det(\mathbf{A}) = a_{12}C_{12} + a_{22}C_{22}. \]

Again, we already have the cofactors from the row expansion:

  • Cofactor \(C_{12}\):

    \[ C_{12} = -a_{21}. \]
  • Cofactor \(C_{22}\):

    \[ C_{22} = a_{11}. \]

Thus, expanding along column 2 gives:

\[ \det(\mathbf{A}) = a_{12} \cdot (-a_{21}) + a_{22} \cdot a_{11} = -a_{12}a_{21} + a_{11}a_{22}. \]

Rearranging terms:

\[ \det(\mathbf{A}) = a_{11}a_{22} - a_{12}a_{21}. \]

Conclusion

No matter how we expand the determinant—whether by row 1, row 2, column 1, or column 2—we always obtain the same result:

\[ \det(\mathbf{A}) = a_{11}a_{22} - a_{12}a_{21}. \]

This consistency shows that the determinant is independent of the row or column chosen for expansion, confirming that the method works universally for any row or column in a \(2 \times 2\) matrix.

Now that we've gone through the detailed process of expanding a \(2 \times 2\) matrix determinant along both rows and columns, we arrive at the formula:

\[ \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc. \]

This is the standard formula for the determinant of a \(2 \times 2\) matrix, and it’s important to remember this result, as it is frequently used when working with matrices of this size.

In other words, for a matrix:

\[ \mathbf{A} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, \]

the determinant is simply:

\[ \boxed{ \det(\mathbf{A}) = ad - bc.} \]

This formula will be essential whenever we need to quickly calculate the determinant of a \(2 \times 2\) matrix without going through the full expansion process.

Evaluating the Determinant of a \(3 \times 3\) Matrix

To calculate the determinant of a \(3 \times 3\) matrix, we start by expanding along a row (we'll choose row 1 here). Recall the formula for a \(2 \times 2\) determinant \(\begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc\), which we will use in the calculation of minors.

Consider the \(3 \times 3\) matrix:

\[ \mathbf{A} = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix}. \]

We expand the determinant along row 1:

\[ \det(\mathbf{A}) = a_{11}C_{11} + a_{12}C_{12} + a_{13}C_{13}. \]

Now, let's write out the minors and cofactors before evaluating them:

  • Cofactor \(C_{11}\):

    \[ C_{11} = (-1)^{1+1} M_{11} = M_{11}, \quad M_{11} = \begin{vmatrix} a_{22} & a_{23} \\ a_{32} & a_{33} \end{vmatrix}. \]
  • Cofactor \(C_{12}\):

    \[ C_{12} = (-1)^{1+2} M_{12} = -M_{12}, \quad M_{12} = \begin{vmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{vmatrix}. \]
  • Cofactor \(C_{13}\):

    \[ C_{13} = (-1)^{1+3} M_{13} = M_{13}, \quad M_{13} = \begin{vmatrix} a_{21} & a_{22} \\ a_{31} & a_{32} \end{vmatrix}. \]

So, the determinant is:

\[ \det(\mathbf{A}) = a_{11} \begin{vmatrix} a_{22} & a_{23} \\ a_{32} & a_{33} \end{vmatrix} - a_{12} \begin{vmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{vmatrix} + a_{13} \begin{vmatrix} a_{21} & a_{22} \\ a_{31} & a_{32} \end{vmatrix}. \]

Step-by-Step Evaluation

Now, let's evaluate each minor using the \(2 \times 2\) determinant formula.

  • First minor \(M_{11}\):

    \[ M_{11} = a_{22}a_{33} - a_{23}a_{32}. \]
  • Second minor \(M_{12}\):

    \[ M_{12} = a_{21}a_{33} - a_{23}a_{31}. \]
  • Third minor \(M_{13}\):

    \[ M_{13} = a_{21}a_{32} - a_{22}a_{31}. \]

Now substitute these evaluated minors back into the determinant formula:

\[ \det(\mathbf{A}) = a_{11}(a_{22}a_{33} - a_{23}a_{32}) - a_{12}(a_{21}a_{33} - a_{23}a_{31}) + a_{13}(a_{21}a_{32} - a_{22}a_{31}). \]

This is the fully expanded and evaluated determinant of the \(3 \times 3\) matrix \( \mathbf{A} \).

Speeding Up the Evaluation of a \(3 \times 3\) Determinant

When evaluating \(3 \times 3\) determinants, it's helpful to streamline the process by remembering the signs of the cofactors, which alternate based on the position in the matrix. The general cofactor sign pattern for a \(3 \times 3\) matrix can be remembered as:

\[ \begin{pmatrix} + & - & + \\ - & + & - \\ + & - & + \end{pmatrix}. \]

This helps us directly apply the correct sign to each cofactor without recalculating \((-1)^{i+j}\).

Suppose we want to expand the determinant of the following matrix along row 2:

\[ \mathbf{A} = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix}. \]

The cofactor signs for row 2 are \( (- + -) \).

Now, let's go step by step for each element of row 2.

Step 1: Calculate the Cofactor of \(a_{21}\)

The cofactor of \(a_{21}\) is negative (from the cofactor sign pattern). So:

\[ C_{21} = -M_{21}. \]

Now, we hide the second row and first column of the matrix, leaving the submatrix:

\[ \begin{pmatrix} * & a_{12} & a_{13} \\ * & * & * \\ * & a_{32} & a_{33} \end{pmatrix} \quad \Rightarrow \quad \begin{pmatrix} a_{12} & a_{13} \\ a_{32} & a_{33} \end{pmatrix}. \]

We now crisscross the remaining elements to compute the \(2 \times 2\) determinant:

\[ M_{21} = a_{12}a_{33} - a_{13}a_{32}. \]

Thus, the cofactor becomes:

\[ C_{21} = -(a_{12}a_{33} - a_{13}a_{32}). \]

Step 2: Calculate the Cofactor of \(a_{22}\)

The cofactor of \(a_{22}\) is positive (from the cofactor sign pattern). So:

\[ C_{22} = +M_{22}. \]

We hide the second row and second column, leaving the submatrix:

\[ \begin{pmatrix} a_{11} & * & a_{13} \\ * & * & * \\ a_{31} & * & a_{33} \end{pmatrix} \quad \Rightarrow \quad \begin{pmatrix} a_{11} & a_{13} \\ a_{31} & a_{33} \end{pmatrix}. \]

Crisscross the remaining elements to compute the \(2 \times 2\) determinant:

\[ M_{22} = a_{11}a_{33} - a_{13}a_{31}. \]

Thus, the cofactor becomes:

\[ C_{22} = a_{11}a_{33} - a_{13}a_{31}. \]

Step 3: Calculate the Cofactor of \(a_{23}\)

The cofactor of \(a_{23}\) is negative (from the cofactor sign pattern). So:

\[ C_{23} = -M_{23}. \]

We hide the second row and third column, leaving the submatrix:

\[ \begin{pmatrix} a_{11} & a_{12} & * \\ * & * & * \\ a_{31} & a_{32} & * \end{pmatrix} \quad \Rightarrow \quad \begin{pmatrix} a_{11} & a_{12} \\ a_{31} & a_{32} \end{pmatrix}. \]

Crisscross the remaining elements to compute the \(2 \times 2\) determinant:

\[ M_{23} = a_{11}a_{32} - a_{12}a_{31}. \]

Thus, the cofactor becomes:

\[ C_{23} = -(a_{11}a_{32} - a_{12}a_{31}). \]

Final Determinant Expression

Now, we can put everything together for the determinant, expanded along row 2:

\[ \det(\mathbf{A}) = a_{21}C_{21} + a_{22}C_{22} + a_{23}C_{23}. \]

Substituting the cofactors:

\[ \det(\mathbf{A}) = a_{21}(-(a_{12}a_{33} - a_{13}a_{32})) + a_{22}(a_{11}a_{33} - a_{13}a_{31}) + a_{23}(-(a_{11}a_{32} - a_{12}a_{31})). \]

This process ensures that you can quickly apply the correct signs and efficiently calculate the determinant of a \(3 \times 3\) matrix by focusing on the crisscross patterns for each minor.

Example

Let's evaluate the determinant of the matrix:

\[ \mathbf{A} = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix} \]

We will expand this determinant first along row 1 and then along the third column to verify that we get the same result in both cases.

Expanding Along Row 1

We start by expanding the determinant along the first row:

\[ \det(\mathbf{A}) = 1 \cdot \begin{vmatrix} 5 & 6 \\ 8 & 9 \end{vmatrix} - 2 \cdot \begin{vmatrix} 4 & 6 \\ 7 & 9 \end{vmatrix} + 3 \cdot \begin{vmatrix} 4 & 5 \\ 7 & 8 \end{vmatrix}. \]

Now, let's evaluate each of the \(2 \times 2\) determinants:

  • \(\begin{vmatrix} 5 & 6 \\ 8 & 9 \end{vmatrix} = (5 \cdot 9) - (6 \cdot 8) = 45 - 48 = -3\),
  • \(\begin{vmatrix} 4 & 6 \\ 7 & 9 \end{vmatrix} = (4 \cdot 9) - (6 \cdot 7) = 36 - 42 = -6\),
  • \(\begin{vmatrix} 4 & 5 \\ 7 & 8 \end{vmatrix} = (4 \cdot 8) - (5 \cdot 7) = 32 - 35 = -3\).

Substituting these values back into the determinant expression:

\[ \det(\mathbf{A}) = 1 \cdot (-3) - 2 \cdot (-6) + 3 \cdot (-3), \]
\[ \det(\mathbf{A}) = -3 + 12 - 9 = 0. \]

Thus, the determinant of the matrix is \(0\).

Expanding Along Column 3

Now, we expand the determinant along the third column:

\[ \det(\mathbf{A}) = 3 \cdot \begin{vmatrix} 4 & 5 \\ 7 & 8 \end{vmatrix} - 6 \cdot \begin{vmatrix} 1 & 2 \\ 7 & 8 \end{vmatrix} + 9 \cdot \begin{vmatrix} 1 & 2 \\ 4 & 5 \end{vmatrix}. \]

Again, we evaluate each \(2 \times 2\) determinant:

  • \(\begin{vmatrix} 4 & 5 \\ 7 & 8 \end{vmatrix} = 32 - 35 = -3\),
  • \(\begin{vmatrix} 1 & 2 \\ 7 & 8 \end{vmatrix} = (1 \cdot 8) - (2 \cdot 7) = 8 - 14 = -6\),
  • \(\begin{vmatrix} 1 & 2 \\ 4 & 5 \end{vmatrix} = (1 \cdot 5) - (2 \cdot 4) = 5 - 8 = -3\).

Substituting these values back into the determinant expression:

\[ \det(\mathbf{A}) = 3 \cdot (-3) - 6 \cdot (-6) + 9 \cdot (-3), \]
\[ \det(\mathbf{A}) = -9 + 36 - 27 = 0. \]

Conclusion

By expanding the determinant along both row 1 and column 3, we obtained the same result, \(\det(\mathbf{A}) = 0\), confirming that the determinant is independent of the row or column chosen for expansion.

Example

Let's take the matrix:

\[ \mathbf{A} = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 3 & 1 \\ 1 & -1 & 3 \end{pmatrix} \]

and expand its determinant along the second column.

Step-by-Step Expansion Along Column 2

The cofactor sign pattern is:

\[ \begin{pmatrix} + & - & + \\ - & + & - \\ + & - & + \end{pmatrix}. \]

For the second column, the signs of the cofactors will be \( (- + -) \). Now, let's go through each element in column 2.

Step 1: Compute the Cofactor of \(a_{12} = 2\)

The cofactor of \(a_{12}\) is negative, so:

\[ C_{12} = -M_{12}. \]

To calculate \(M_{12}\), we hide the first row and second column:

\[ \begin{pmatrix} * & * & * \\ 2 & * & 1 \\ 1 & * & 3 \end{pmatrix} \quad \Rightarrow \quad \begin{pmatrix} 2 & 1 \\ 1 & 3 \end{pmatrix}. \]

Now, apply the crisscross formula to compute the \(2 \times 2\) determinant:

\[ M_{12} = (2 \times 3) - (1 \times 1) = 6 - 1 = 5. \]

Thus, the cofactor is:

\[ C_{12} = -5. \]

Step 2: Compute the Cofactor of \(a_{22} = 3\)

The cofactor of \(a_{22}\) is positive, so:

\[ C_{22} = +M_{22}. \]

To calculate \(M_{22}\), we hide the second row and second column:

\[ \begin{pmatrix} 1 & * & 3 \\ * & * & * \\ 1 & * & 3 \end{pmatrix} \quad \Rightarrow \quad \begin{pmatrix} 1 & 3 \\ 1 & 3 \end{pmatrix}. \]

Now, apply the crisscross formula to compute the \(2 \times 2\) determinant:

\[ M_{22} = (1 \times 3) - (1 \times 3) = 3 - 3 = 0. \]

Thus, the cofactor is:

\[ C_{22} = 0. \]

Step 3: Compute the Cofactor of \(a_{32} = -1\)

The cofactor of \(a_{32}\) is negative, so:

\[ C_{32} = -M_{32}. \]

To calculate \(M_{32}\), we hide the third row and second column:

\[ \begin{pmatrix} 1 & * & 3 \\ 2 & * & 1 \\ * & * & * \end{pmatrix} \quad \Rightarrow \quad \begin{pmatrix} 1 & 3 \\ 2 & 1 \end{pmatrix}. \]

Now, apply the crisscross formula to compute the \(2 \times 2\) determinant:

\[ M_{32} = (1 \times 1) - (3 \times 2) = 1 - 6 = -5. \]

Thus, the cofactor is:

\[ C_{32} = -(-5) = 5. \]

Final Determinant Expression

Now, let's put everything together. Expanding the determinant along column 2:

\[ \det(\mathbf{A}) = 2 \cdot C_{12} + 3 \cdot C_{22} + (-1) \cdot C_{32}. \]

Substituting the values of the cofactors:

\[ \det(\mathbf{A}) = 2 \cdot (-5) + 3 \cdot 0 + (-1) \cdot 5. \]

Simplifying:

\[ \det(\mathbf{A}) = -10 + 0 - 5 = -15. \]

Thus, the determinant of the matrix is:

\[ \det(\mathbf{A}) = -15. \]

Expanding a 4 by 4 determinant

Let's expand the \(4 \times 4\) determinant of the matrix:

\[ \mathbf{A} = \begin{pmatrix} 1 & 2 & 3 & 4 \\ 0 & 1 & 2 & 3 \\ 1 & 0 & 1 & 1 \\ 2 & 1 & 4 & 5 \end{pmatrix}. \]

We will expand along the first row.

Step-by-Step Expansion Along Row 1

The cofactor sign pattern for a \(4 \times 4\) matrix starts with:

\[ \begin{pmatrix} + & - & + & - \\ \cdots & \cdots & \cdots & \cdots \end{pmatrix}. \]

So, the determinant of \(\mathbf{A}\) is:

\[ \det(\mathbf{A}) = 1 \cdot C_{11} - 2 \cdot C_{12} + 3 \cdot C_{13} - 4 \cdot C_{14}. \]

Now, we will compute the cofactors by evaluating the \(3 \times 3\) minors.

Step 1: Cofactor \(C_{11}\)

To compute \(C_{11}\), we hide row 1 and column 1, leaving the submatrix:

\[ \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 1 \\ 1 & 4 & 5 \end{pmatrix}. \]

Now, let's quickly compute this \(3 \times 3\) determinant by expanding along the first column:

\[ \det = 1 \cdot \begin{vmatrix} 1 & 1 \\ 4 & 5 \end{vmatrix} - 0 + 1 \cdot \begin{vmatrix} 2 & 3 \\ 1 & 1 \end{vmatrix} \]
\[ = 1 \cdot (1 \cdot 5 - 1 \cdot 4) + 1 \cdot (2 \cdot 1 - 3 \cdot 1) = 1 \cdot (5 - 4) + 1 \cdot (2 - 3) = 1 - 1 = 0. \]

Thus, \(C_{11} = 0\).

Step 2: Cofactor \(C_{12}\)

To compute \(C_{12}\), we hide row 1 and column 2, leaving the submatrix:

\[ \begin{pmatrix} 0 & 2 & 3 \\ 1 & 1 & 1 \\ 2 & 4 & 5 \end{pmatrix}. \]

Expanding this \(3 \times 3\) determinant along the first column:

\[ \det = 0 \cdot \begin{vmatrix} 1 & 1 \\ 4 & 5 \end{vmatrix} - 1 \cdot \begin{vmatrix} 2 & 3 \\ 4 & 5 \end{vmatrix} + 2 \cdot \begin{vmatrix} 2 & 3 \\ 1 & 1 \end{vmatrix} \]
\[ = -1 \cdot (2 \cdot 5 - 3 \cdot 4) + 2 \cdot (2 \cdot 1 - 3 \cdot 1) = -1 \cdot (10 - 12) + 2 \cdot (2 - 3) = 2 + 2(-1) = 2 - 2 = 0. \]

Thus, \(C_{12} = 0\).

Step 3: Cofactor \(C_{13}\)

To compute \(C_{13}\), we hide row 1 and column 3, leaving the submatrix:

\[ \begin{pmatrix} 0 & 1 & 3 \\ 1 & 0 & 1 \\ 2 & 1 & 5 \end{pmatrix}. \]

Expanding this \(3 \times 3\) determinant along the first column:

\[ \det = 0 - 1 \cdot \begin{vmatrix} 1 & 1 \\ 1 & 5 \end{vmatrix} + 2 \cdot \begin{vmatrix} 1 & 3 \\ 2 & 5 \end{vmatrix} \]
\[ = -1 \cdot (1 \cdot 5 - 1 \cdot 1) + 2 \cdot (1 \cdot 5 - 3 \cdot 2) = -1 \cdot (5 - 1) + 2 \cdot (5 - 6) = -4 + 2(-1) = -4 - 2 = -6. \]

Thus, \(C_{13} = -6\).

Step 4: Cofactor \(C_{14}\)

To compute \(C_{14}\), we hide row 1 and column 4, leaving the submatrix:

\[ \begin{pmatrix} 0 & 1 & 2 \\ 1 & 0 & 1 \\ 2 & 1 & 4 \end{pmatrix}. \]

Expanding this \(3 \times 3\) determinant along the first column:

\[ \det = 0 - 1 \cdot \begin{vmatrix} 0 & 1 \\ 1 & 4 \end{vmatrix} + 2 \cdot \begin{vmatrix} 0 & 1 \\ 2 & 4 \end{vmatrix} \]
\[ = -1 \cdot (0 \cdot 4 - 1 \cdot 1) + 2 \cdot (0 \cdot 4 - 1 \cdot 2) = -1 \cdot (0 - 1) + 2 \cdot (0 - 2) = 1 + 2(-2) = 1 - 4 = -3. \]

Thus, \(C_{14} = -3\).

Final Determinant Calculation

Substitute all the cofactors back into the determinant expression:

\[ \det(\mathbf{A}) = 1 \cdot 0 - 2 \cdot 0 + 3 \cdot (-6) - 4 \cdot (-3) \]
\[ = 0 - 0 + (-18) + 12 = -18 + 12 = -6. \]

Thus, the determinant of the \(4 \times 4\) matrix is:

\[ \det(\mathbf{A}) = -6. \]