Determinant

Det is a function that we can apply to Matrix to get a scalar. It’s defined for n×nn\times n only.

For a 2×22\times 2 matrix it’s just

det[abcd]=adbc\begin{gather*} det\begin{bmatrix}a & b \\ c & d\end{bmatrix}=ad-bc \end{gather*}

For an n×nn\times n matrix it can be done with cofactor expansion

det(A)=j=1n(1)i+jaijMij\begin{gather*} det(A)=\sum_{j=1}^n(-1)^{i+j}a_{ij}M_{ij} \end{gather*}

Note it’s recursive so it’s really expensive

also dont forget that

det(A^B^)=det(A^)det(B^)\begin{gather*} det(\hat{A}\hat{B})=det(\hat{A})det(\hat B) \end{gather*}

An easier way to do it is through row reduction. Make a triangular matrix and multiply the diags together

det(a11a2200a33)=a11a22a33\begin{gather*} det\begin{pmatrix}a_{11} & * & * \\ & a_{22} & * \\ 0 & 0 & a_{33} \end{pmatrix}=a_{11}a_{22}a_{33} \end{gather*}