Devlogs
determinant is the function that associates a scalar value det(A) to the square nxn matrix A.in computer computations it can be easily computated using LU matrix decomposition. but, ive made "quick and dirty" implementation of matrix determinant definition, just to see how it works. just to refresh memory, determinant of square nxn matrix A can be expressed using determinant expansion by minors :

where Cij is called cofactor, and Mij is so-called minor of matrix A. Minor is obtained by taking the determinant of matrix A with out i-th row ant j-th column.

there is no sumation over j index, as it can be chosen freely. we see now that calculation of matrix determinant can be implemented (in very naive approach) using recursive function.
as we are calculating matrix determinant using recursion (and/or iterations) we are intrested in aswering the quaestion, who many matrices have to be created (including input matrix and 1x1 matrices) ?
matrix size : 2x2 matrices count : 3
matrix size : 3x3 matrices count : 10
matrix size : 4x4 matrices count : 41
matrix size : 5x5 matrices count : 206
.
matrix size : 8x8 matrices count : 69281
.
matrix size : 10x10 matrices count : 6235301
matrix size : 11x11 matrices count : 68588312
code of my "quick and dirty" can be taken from here : det.c
No comments as yet. Be first to comment.