Matrix & Vector Operations
How to Calculate Determinant of a Matrix?
Determinant of a square matrix A is defined as: $$\det(A_{n \times n}) = \sum_{j=1}^{n} A_{ij}C_{ij} = \sum_{j=1}^{n}A_{ij}(-1)^{i+j}M_{ij}$$ where C is the cofactor matrix of A and M is minor matrix of A.
Determinant of 2-by-2 matrix is calculated as $$\det(A_{2 \times 2}) = \begin{vmatrix}a & b \\ c & d\end{vmatrix} = a . d - b . c$$
Determinant of 3-by-3 matrix is calculated as $$\begin{align*} \det(A_{3 \times 3}) &= \begin{vmatrix}a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33}\end{vmatrix} \\ &= 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} \end{align*}$$ This method is known as Rule of Sarrus.