'Fast matrix determinant calculation with specific structure
I have a k*k
squared matrix with diagonal elements x>0
and all other elements y>0
. The values of k, x, y
are all subject to change.
Now I need the determinant of this matrix. I know there won't be a closed-form formula for it, but is there a way to calculate it faster than the commonly used LU-decomposition which takes O(K^3) time complexity (considering its special structure)?
(I am using R
as my coding language, and the built-in det()
function in R
uses the LU-decomposition.)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|