Laplace Expansion
정리
A square matrix $A_{n \times n} = (a_{ij})$ is given.
- [1]: For the selected $i$ row $$ \det A = \sum_{j=1}^{n} a_{ij} C_{ij} $$
- [2]: For the selected $j$ column $$ \det A = \sum_{i=1}^{n} a_{ij} C_{ij} $$
- The determinant $M_{ij}$ of the matrix obtained by removing the $i$th row and $j$th column from the square matrix $A_{n \times n} = (a_{ij})$ is called a minor, and $C_{ij} := (-1)^{i + j} M_{ij}$ is called a cofactor.
설명
Laplace expansion is also known as cofactor expansion, and its usefulness is beyond words. It is much easier than calculating the determinant with just the definition. When finding the determinant of a matrix under specific conditions, its advantages increase even more, so it is absolutely essential to know this fact.
예시
Let’s look at the following Laplace expansion as an example that can be used to determine whether a matrix is invertible or not.
$$ \begin{align*} \displaystyle \det \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} =& 1 \cdot \begin{vmatrix} 5 & 6 \\ 8 & 9 \end{vmatrix} - 2 \cdot \begin{vmatrix} 4 & 6 \\ 7 & 9 \end{vmatrix} + 3 \cdot \begin{vmatrix} 4 & 5 \\ 7 & 8 \end{vmatrix} \\ =& 1 \cdot (-3) - 2 \cdot (-6) + 3 \cdot (-3) \\ =& 0 \end{align*} $$
Therefore, it is easy to confirm that $\displaystyle \det \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}$ does not have an inverse.
Code
The following is the code for implementing and verifying the Laplace expansion in Julia. It is practically a direct translation of the equations, and in reality, it is implemented very inefficiently. For this, it would be good to refer to the following post: