what is a matrix?

A matrix is a 2-dimensional grid of numbers. When a matrix has $a$ rows and $b$ columns, we call it an $a \times b$ matrix. Here’s a simple example of a $2 \times 2$ matrix, which has 2 rows and 2 columns:

$$ \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} $$

determinants of matrices

Imagine we have this $2\times 2$ matrix:

$$ A = \begin{bmatrix}a&b\\c&d\end{bmatrix} $$

The determinant of this matrix, denoted by $\det⁡(A)$, is calculated as follows:

$\det⁡(A)=ad−bc$

The determinant of a $3\times3$ matrix is more complicated. Let’s say $A$ looks like this:

$$ A = \begin{bmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\end{bmatrix} $$

Then the determinant is:

$$ \det(A) = a_{11}(-1)^{1+1}\det\begin{bmatrix} a_{22} & a_{23} \\ a_{32} & a_{33} \end{bmatrix} + a_{12}(-1)^{1+2}\det\begin{bmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{bmatrix} + a_{13}(-1)^{1+3}\det\begin{bmatrix} a_{21} & a_{22} \\ a_{31} & a_{32} \end{bmatrix}\\ $$

$$ = a_{11}\det\begin{bmatrix} a_{22} & a_{23} \\ a_{32} & a_{33} \end{bmatrix} - a_{12} \det\begin{bmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{bmatrix} + a_{13} \det\begin{bmatrix} a_{21} & a_{22} \\ a_{31} & a_{32} \end{bmatrix}\\ $$

That just looks like a huge mess at first! Let’s break it down.

The first term in the sum is:

$$ a_{11}(−1)^{1+1}\det⁡\begin{bmatrix}a_{22}&a_{23}\\a_{32}&a_{33}\end{bmatrix} $$

Notice how the exponent on the -1 term is 1 + 1, while the coefficient in front of it is $a_{11}$, corresponding to the element on the 1st row and 1st column of the matrix.

What about the determinant part? Notice how we’re finding the determinant of a smaller $2\times2$ matrix. This matrix is just the $3\times 3$ matrix $A$ but without the elements in the 1st row and the 1st column.

The next term is:

$$ a_{12}(−1)^{1+2}\det⁡\begin{bmatrix}a_{21}&a_{23}\\a_{31}&a_{33}\end{bmatrix} $$