The determinant

👋 About the exercise session


Last week, we talked about inverse of a matrix and how to use it to solve the given system of linear equations. But before start looking for an inverse of a matrix, it might good to know if it is even possible. That is where determinant comes in rescue. In addition, we also discussed linear transformations whose effect on the vector space can also be described through determinant. Let’s get to work!


📓 Notes


Finding determinant of a matrix


Below, I summarize several approaches on how to find determinant of the given matrix. The approach always depends on what the kind of the matrix and also its values. Lastly, it is important to mention that determinant is essentially just a mapping of given input matrix to some real value.

General approach: co-factor expansion

In co-factor expansion, the idea is to choose specific row or column and then multiply its elements by corresponding weights called co-factors. Finding co-factors can take some time, so it is best to choose row or column with most zeros. So how do we find co-factors for corresponding position in the matrix? Essentially, we can do this in two steps:

(1) Find minor: to find minor, you ignore all values in the given’s position row and column and create a new matrix for which you want to find corresponding determinant.

(2) Find corresponding sign: to find the sign, you can follow the pattern matrix which always starts with plus in the upper left corner. (The pattern then alternates between \(+\) and \(-\))

I personally find this method quite cumber-some computationally. Luckily there is an alternative.


Alternative approach: reduction to triangular matrix

Alternatively, we can reduce the given matrix to a triangular matrix using elementary row-operations. Then we simply compute the product of values along the main diagonal which yields the determinant of the given matrix. This sounds to easy to be true and yes, there is one thing to be aware of. Specifically, how each operation affects the determinant of the newly created matrix:

(1) Swap rows: \(det(A) = -det(B)\)

(2) Add multiple of a row: \(det(A) = det(B)\) (no change)

(3) Constant row multiplication: \(det(A) = \frac{1}{c} det(B)\)


Special matrices approach

Finally, if we are given any of the following matrices, we can use special trick or formula:

(1) Matrix is \(2\times2\)

The determinant of the matrix \(A=\left[\begin{array}{ll} a_{11} & a_{12} \\ a_{21} & a_{22} \end{array}\right]\) is \(\operatorname{det}(A)=|A|=a_{11} a_{22}-a_{21} a_{12}\).

(2) Matrix is \(3\times3\)

We take 1st and 2nd column and add it as 3rd and 4th, we then compute diagonal products as defined below and add/subtract them:

\[|A|=a_{11} a_{22} a_{33}+a_{12} a_{23} a_{31}+a_{13} a_{21} a_{32}-a_{31} a_{22} a_{13}-a_{32} a_{23} a_{11}-a_{33} a_{21} a_{12}\]


Conditions for the determinant to be zero


If A is a square matrix and any one of the conditions below is true, then det(A) = 0.

(1) An entire row (or an entire column) consists of zeros.

(2) Two rows (or columns) are equal.

(3) One row (or column) is a multiple of another row (or column).


Useful determinant properties


Here are most important rules:

(1) Product rule: \(det(AB) = det(A)det(B)\)

(2) Constant rule: If \(A\) is a square matrix of order \(n\) and \(c\) is a scalar, then the determinant of \(c A\) is \(\operatorname{det}(c A)=c^n \operatorname{det}(A)\)

(3) Inverse rule: If \(A\) is an \(n \times n\) invertible matrix, then \(\operatorname{det}\left(A^{-1}\right)=\frac{1}{\operatorname{det}(A)}\)

(4) Transpose rule: If \(A\) is a square matrix then \(\operatorname{det}(A)=\operatorname{det}\left(A^T\right)\)


Possible application 1: finding inverse


One of the possible use cases of determinant is for finding an inverse. Use following steps:

(1) Find adjoint of matrix A - co-factor matrix transposed

(2) Then the formula is as follows:

\[\text { If } A \text { is an } n \times n \text { invertible matrix, then } A^{-1}=\frac{1}{\operatorname{det}(A)} \operatorname{adj}(A) \text {. }\]


Possible application 2: solving systems of linear equations using Cramer’s rule


Given coefficient matrix \(A\) with two variables to be found, we can write:

\[x_1=\frac{\left|A_1\right|}{|A|} \text { and } x_2=\frac{\left|A_2\right|}{|A|}\]

where \(A_1\) and \(A_2\) looks as follows:

\[\left|A_1\right|=\left|\begin{array}{ll} b_1 & a_{12} \\ b_2 & a_{22} \end{array}\right| \text { and } \quad\left|A_2\right|=\left|\begin{array}{ll} a_{11} & b_1 \\ a_{21} & b_2 \end{array}\right|\]

Note that \(b_i\) denotes the values in the constant column vector.


Equivalent Conditions for a Nonsingular Matrix


Citing from the book If \(A\) is an \(n \times n\) matrix, then the statements below are equivalent:

(1) \(A\) is invertible.

(2) \(A \mathbf{x}=\mathbf{b}\) has a unique solution for every $n \times 1$ column matrix \(\mathbf{b}\).

(3) \(A \mathbf{x}=O\) has only the trivial solution.

(4) \(A\) is row-equivalent to \(I_n\).

(5) \(A\) can be written as the product of elementary matrices.

(6) Non-zero determinant \(\operatorname{det}(A) \neq 0\)


⛳️ Learning goals checklist


This week has been focused on actually computing things rather theoretical concepts. The main takeaways are:

  • Be able to compute the determinants of \(2 \times 2\) and \(3 \times 3\) matrices using the closed formulas
  • Compute the determinants of general square matrices using matrix the alternative approach which uses reduction to a triangular matrix
  • Recognise conditions for when a matrix has zero determinant (see above)
  • Compute the cofactor matrix and use it to compute the inverse of a matrix

Good job, see you next week in exercise about vector spaces.☺️