I need an recursive algorithm to calculate determinant of n*n matrix.
Wikipedia has a formula for calculating determinants. It involves permutations, which can easily be generated recursively. Google has plenty of results on "permutation algorithm".
I don't see the point in recursiveness here.
This matrix operation can easily be implemented in a SIMD operation, can be divided into threads, can be very well calculated on the GPU.
Recursiveness consumes a lot of memory, and some systems have limits in recursion depths.
|a b c d ...|
det |...........|
|...........|
|...........|
= a * det(M1) - b * det(M2) + c * det(M3) - d * det(M4) + ... - ...
where Mn is the remaining Matrix if you drop the first row and the n-th column
The Standard Method for computing the determinant is LU decomposition. Use a library like LAPACK in production code. There is absolutely no point in using recursion, LU decomposition is usually implemented with a variant of Gauss pivot method.