[Math] determinant of a very large matrix in MATLAB

determinantMATLABmatrices

I have a very large random matrix which its elements are either $0$ or $1$ randomly. The size of the matrix is $5000$, however when I want to calculate the determinant of the matrix, it is either $Inf$ or $-Inf$. Why it is the case (as I know thw determinant is a real number and for a finite size matrix with finite elements, it cannot be $Inf$) and how can I remedy any possible mistake?

Best Answer

I did a search for "determinant of random matrix" and found this article:

https://people.math.osu.edu/nguyen.1261/cikk/loglaw.pdf

It shows that the log of the determinant of a n by n random matrix is usually about $n\log(n)/2 $.

Therefore, for large $n$, any computation of the determinant will almost certainly overflow.

Related Question