Matrix

Find determinant

Solution examples and comments on find determinant matrix.


Example 1

Calculate the determinant of matrix A:    $ A = \left[ \begin{array}{rrr} 0 & -5 & 3 & 4 \\ 24 & 0 & 7 & 0 \\ 45 & 8 & 6 & 0 \\ 6 & 0 & -23 & 66 \end{array}\right] $


by (a) a Laplace development on the first row;
(b) a Laplace development on the second row;
(c) a Laplace development on the first column;
(d) Calculation of matrix determinant by Bareiss algorithm;
(e) Calculation of matrix determinant by Gaussian elimination;
(f) Calculation of matrix determinant by Leibniz formula.



Solution (a) - Laplace development on the first row

$ det \left( \begin{array}{rrr} 0 & -5 & 3 & 4 \\ 24 & 0 & 7 & 0 \\ 45 & 8 & 6 & 0 \\ 6 & 0 & -23 & 66 \end{array}\right) = -24\cdot \left[ \begin{array}{rrr} -5 & 8 & 0 \\ 3 & 6 & -23 \\ 4 & 0 & 66 \end{array}\right] $ $ +45\cdot \left[ \begin{array}{rrr} -5 & 0 & 0 \\ 3 & 7 & -23 \\ 4 & 0 & 66 \end{array}\right] -6\cdot \left[ \begin{array}{rrr} -5 & 0 & 8 \\ 3 & 7 & 6 \\ 4 & 0 & 0 \end{array}\right] $ $ = 120\cdot \left[ \begin{array}{rrr} 6 & -23 \\ 0 & 66 \end{array}\right] + 192 \cdot \left[ \begin{array}{rrr} 3 & -23 \\ 4 & 66 \end{array}\right]$ $ - 225\cdot \left[ \begin{array}{rrr} 7 & -23 \\ 0 & 66 \end{array}\right] + 30 \cdot \left[ \begin{array}{rrr} 7 & 6 \\ 0 & 0 \end{array}\right] - 48 \cdot \left[ \begin{array}{rrr} 3 & 7 \\ 4 & 0 \end{array}\right] = 594 $

Solution (b) - Laplace development on the second row

$ det \left( \begin{array}{rrr} 0 & -5 & 3 & 4 \\ 24 & 0 & 7 & 0 \\ 45 & 8 & 6 & 0 \\ 6 & 0 & -23 & 66 \end{array}\right) = -24\cdot \left[ \begin{array}{rrr} -5 & 3 & 4 \\ 8 & 6 & 0 \\ 0 & -23 & 66 \end{array}\right] $ $ -7\cdot \left[ \begin{array}{rrr} 0 & -5 & 4 \\ 45 & 8 & 0 \\ 6 & 0 & 66 \end{array}\right] = 120\cdot \left[ \begin{array}{rrr} 6 & 0 \\ -23 & 66 \end{array}\right] + 72 \cdot \left[ \begin{array}{rrr} 8 & 0 \\ 0 & 66 \end{array}\right] $ $ - 96\cdot \left[ \begin{array}{rrr} 8 & 6 \\ 0 & -23 \end{array}\right] - 35\cdot \left[ \begin{array}{rrr} 45 & 0 \\ 6 & 66 \end{array}\right] - 28\cdot \left[ \begin{array}{rrr} 45 & 8 \\ 6 & 0 \end{array}\right] = 594 $

Solution (c) - Laplace development on the first column

$ det \left( \begin{array}{rrr} 0 & -5 & 3 & 4 \\ 24 & 0 & 7 & 0 \\ 45 & 8 & 6 & 0 \\ 6 & 0 & -23 & 66 \end{array}\right) = -24\cdot \left[ \begin{array}{rrr} -5 & 3 & 4 \\ 8 & 6 & 0 \\ 0 & -23 & 66 \end{array}\right] $ $ +45\cdot \left[ \begin{array}{rrr} -5 & 3 & 4 \\ 0 & 7 & 0 \\ 0 & -23 & 66 \end{array}\right] -6\cdot \left[ \begin{array}{rrr} -5 & 3 & 4 \\ 0 & 7 & 0 \\ 8 & 6 & 0 \end{array}\right] $ $ = 120\cdot \left[ \begin{array}{rrr} 6 & 0 \\ -23 & 66 \end{array}\right] + 192 \cdot \left[ \begin{array}{rrr} 3 & 4 \\ -23 & 66 \end{array}\right]$ $ - 225\cdot \left[ \begin{array}{rrr} 7 & 0 \\ -23 & 66 \end{array}\right] + 30 \cdot \left[ \begin{array}{rrr} 7 & 0 \\ 6 & 0 \end{array}\right] - 48 \cdot \left[ \begin{array}{rrr} 3 & 4 \\ 7 & 0 \end{array}\right] = 594 $

Solution (d) - Calculation of matrix determinant by Bareiss algorithm


The determinant of the matrix is equal to the element in the last line after reducing the matrix to the row echelon form using the formula $\textstyle a_{i,j} = \frac{a_{r,c}\mathstrut \cdot a_{i,j}-a_{i,c} \cdot a_{r,j}}{p} $ where r and c - the numbers of the row and the column of support element, and p - the value of the support element in the previous step.

Note: p.e. - pivot element


$ det \left( \begin{array}{rrr} 0 & -5 & 3 & 4 \\ 24 & 0 & 7 & 0 \\ 45 & 8 & 6 & 0 \\ 6 & 0 & -23 & 66 \end{array}\right) $
$\sim $
$ R_2 \leftrightarrow -R_1 $
$ \left[ \begin{array}{rrr} \textbf{24} & 0 & 7 & 0 \\ 0 & 5 & -3 & -4 \\ 45 & 8 & 6 & 0 \\ 6 & 0 & -23 & 66 \end{array}\right] $
$\sim $
$ \left[ \begin{array}{rrr} 24 & 0 & 7 & 0 \\ 0 & \textbf{120} & -72 & -96 \\ 0 & 192 & -171 & 0 \\ 0 & 0 & -594 & 1584 \end{array}\right] $
$\sim $
$ \left[ \begin{array}{rrr} 120 & 0 & 35 & 0 \\ 0 & 120 & -72 & -96 \\ 0 & 0 & \textbf{-279} & 768 \\ 0 & 0 & -2970 & 7920 \end{array}\right] $
$\sim $
$ \left[ \begin{array}{rrr} -279 & 0 & 0 & -224 \\ 0 & -279 & 0 & 684 \\ 0 & 0 & -279 & 768 \\ 0 & 0 & 0 & \textbf{594} \end{array}\right] $
$\sim $
$ \left[ \begin{array}{rrr} 594 & 0 & 0 & 0 \\ 0 & 594 & 0 & 0 \\ 0 & 0 & 594 & 0 \\ 0 & 0 & 0 & 594 \end{array}\right] = 594 $

Solution (e) - Calculation of matrix determinant by Gaussian elimination


Convert the matrix into the row echelon form. Addition operation to one of the rows of another one multiplied by some number does not change the determinant. The determinant of the transformed matrix is equal to the determinant of the original one.

$ det \left( \begin{array}{rrr} 0 & -5 & 3 & 4 \\ 24 & 0 & 7 & 0 \\ 45 & 8 & 6 & 0 \\ 6 & 0 & -23 & 66 \end{array}\right) $
$\sim $
$ R_2 \leftrightarrow -R_1 $
$ \left[ \begin{array}{rrr} 0 & -5 & 3 & 4 \\ 24 & 0 & 7 & 0 \\ 45 & 8 & 6 & 0 \\ 6 & 0 & -23 & 66 \end{array}\right] $
$\sim $
$ R_3\!-\!\frac{15}{8}\cdot R_1\to R_3$
$ \left[ \begin{array}{rrr} 24 & 0 & 7 & 0 \\ 0 & 5 & -3 & -4 \\ 0 & 8 & \frac{-57}{8} & 0 \\ 6 & 0 & -23 & 66 \end{array}\right] $
$\sim $
$ R_4\!-\!\frac{1}{4}\cdot R_1\to R_4$
$ \left[ \begin{array}{rrr} 24 & 0 & 7 & 0 \\ 0 & 5 & -3 & -4 \\ 0 & 8 & \frac{-57}{8} & 0 \\ 0 & 0 & \frac{-99}{4} & 66 \end{array}\right] $
$\sim $
$ R_3\!-\!\frac{8}{5}\cdot R_2\to R_3$
$ \left[ \begin{array}{rrr} 24 & 0 & 7 & 0 \\ 0 & 5 & -3 & -4 \\ 0 & 0 & \frac{-93}{40} & \frac{32}{5} \\ 0 & 0 & \frac{-99}{4} & 66 \end{array}\right] $
$\sim $
$ R_4\!-\!\frac{330}{31}\cdot R_3\to R_4$
$ \left[ \begin{array}{rrr} 24 & 0 & 7 & 0 \\ 0 & 5 & -3 & -4 \\ 0 & 0 & \frac{-93}{40} & \frac{32}{5} \\ 0 & 0 & 0 & \frac{-66}{31} \end{array}\right] = 24 \cdot 5 \cdot \frac{-93}{40} \cdot \frac{-66}{31} \cdot = 594 $

Solution (f) - Calculation of matrix determinant by Leibniz formula


$ det \left( \begin{array}{rrr} 0 & -5 & 3 & 4 \\ 24 & 0 & 7 & 0 \\ 45 & 8 & 6 & 0 \\ 6 & 0 & -23 & 66 \end{array}\right) $ $= 0\cdot 0\cdot 6\cdot 66 − 0\cdot 0\cdot 0\cdot (−23)$ $− 0\cdot 7\cdot 8\cdot 66 + 0\cdot 7\cdot 0\cdot 0 $ $+ 0\cdot 0\cdot 8\cdot (−23) − 0\cdot 0\cdot 6\cdot 0$ $− (−5)\cdot 24\cdot 6\cdot 66 + (−5)\cdot 24\cdot 0\cdot (−23) $ $+ (−5)\cdot 7\cdot 45\cdot 66 − (−5)\cdot 7\cdot 0\cdot 6$ $− (−5)\cdot 0\cdot 45\cdot (−23) + (−5)\cdot 0\cdot 6\cdot 6 $ $ + 3 \cdot 24\cdot 8\cdot 66−3\cdot 24\cdot 0\cdot 0$ $− 3\cdot 0\cdot 45\cdot 66+3\cdot 0\cdot 0\cdot 6 $ $ + 3 \cdot 0\cdot 45\cdot 0−3\cdot 0\cdot 8\cdot 6$ $− 4\cdot 24\cdot 8\cdot (−23) + 4\cdot 24\cdot 6\cdot 0 $ $+ 4\cdot 0\cdot 45\cdot (−23) − 4\cdot 0\cdot 6\cdot 6 $ $− 4\cdot 7\cdot 45\cdot 0 + 4\cdot 7\cdot 8\cdot 6 = 594 $

---   end Example 1   ---




Share this link: