Matrix Determinant

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
mgates3
Posts: 878
Joined: Fri Jan 06, 2012 2:13 pm

Re: Matrix Determinant

Post by mgates3 » Mon Sep 10, 2018 12:31 pm

Indirectly, yes. While useful as a theoretical tool, the determinant is rarely useful for computational purposes. E.g., for solving systems, Cramer's rule is very expensive compared to LU factorization (getrf). Given
det(AB) = det(A) det(B)
and for a lower or upper triangular matrix T, det(T) is the product of its diagonal entries, you can compute the determinant by doing an LU factorization (getrf), then multiplying the diagonal entries of U. det(A) = det(LU) = det(U). The diagonal entries of L are 1, so det(L) = 1.

-mark

mgates3
Posts: 878
Joined: Fri Jan 06, 2012 2:13 pm

Re: Matrix Determinant

Post by mgates3 » Thu Oct 18, 2018 12:53 pm

Correction: the determinant also requires checking whether the permutation P in ipiv is odd or even. If odd, det(P) = -1, if even, det(P) = +1.
det( A ) = det( P ) * prod( diag( U ) )
But just to check for invertibility, you only need to check that diag( U ) is all non-zero.

Also note that the determinant often grows very quickly with the matrix size. E.g., det( rand( 1000, 1000 ) ) = ±Inf; it overflows in double precision. Of course, this is not true of all matrices, like permutation and orthogonal matrices have det = ±1.

-mark

Henryprund
Posts: 1
Joined: Sat Feb 02, 2019 10:28 pm
Location: Sri Lanka
Contact:

Matrix Determinant

Post by Henryprund » Mon Mar 18, 2019 9:52 am

Unitary matrices preserve inner products and thus norms. So every eigenvalue of a unitary matrix is on the complex unit circle. The determinant is the product of these eigenvalues so it must also lie on the complex unit circle.

Post Reply