The determinant of a matrix is used to determine whether it is invertible, i.e.
$$ A \text{ invertible} \iff |A| \neq 0 $$
We previously saw the determinant of a 2x2 matrix
$$ \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc $$
Now, we extend this concept to larger matrices.

$$ \text{det}(A) = a_{11}\text{det}(A_{11}) - a_{12}\text{det}(A_{12}) + \cdots + (-1)^{n + 1}a_{1n}\text{det}(A_{1n}) $$
where $A_{ij}$ represents the $(n-1) \times (n-1)$ matrix which is $A$ with its $i$th row and $j$th column removed (see picture above). This procedure can be done using any row or column. As long as the signs of the cofactors follow this pattern

<aside> ⭐ Notice that the formula above is a recursive definition. It calculates the determinant of matrix $A$ using the determinants of its minor matrices $A_{ij}$. This can be computationally intensive on large matrices, even for computers.
</aside>
An upper triangular matrix has all zeroes below the main diagonal

The determinant of an upper diagonal matrix is the product of its diagonal entries
$$ |A| = a_{11}a_{22}a_{33}\cdots a_{nn} $$
This is found by repeatedly applying the general formula for calculating the determinant of a matrix along the first column of its minors.