Compute determinant of a skew-symmetric matrix

  • Context: Graduate 
  • Thread starter Thread starter Gianni
  • Start date Start date
  • Tags Tags
    Determinant Matrix
Click For Summary

Discussion Overview

The discussion revolves around computing the determinant of a skew-symmetric matrix, with a focus on efficient numerical methods and potential code implementations, particularly in Fortran. Participants explore the use of LAPACK routines and the challenges associated with skew-symmetric matrices.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant seeks efficient code for computing the determinant of a skew-symmetric matrix, expressing concern over using general LAPACK routines for large matrices.
  • Another participant suggests that LAPACK has routines for symmetric matrices and mentions the efficiency of these routines, noting that they operate in O(n^3) time for n x n matrices.
  • A different participant acknowledges the effectiveness of LAPACK for symmetric matrices but points out the lack of specific routines for anti-symmetric matrices, suggesting a need for custom implementations.
  • One participant reflects on the complexity of factorization algorithms for symmetric matrices, particularly when dealing with zero diagonal terms, and discusses the potential for similar methods to apply to skew matrices.
  • Participants express uncertainty about whether writing a custom routine would yield significant improvements over existing LAPACK routines.

Areas of Agreement / Disagreement

Participants generally agree on the effectiveness of LAPACK for symmetric matrices but disagree on the availability of routines for skew-symmetric matrices and the necessity of writing custom code. The discussion remains unresolved regarding the optimal approach for skew-symmetric matrices.

Contextual Notes

Participants note limitations related to the complexity of factorization algorithms and the implications of matrix sparsity or structure on computational efficiency. There is also mention of the potential numerical stability issues when using pivoting in factorization.

Gianni
Messages
2
Reaction score
0
Hello everybody,

To compute an observable in a physical problem I need to compute the determinant of a skew matrix (http://en.wikipedia.org/wiki/Skew-symmetric_matrix#Determinant").
The straightforward way to numerically calculate this determinant is to use a lapack routine that compute the determinant for a general matrix (without symmetries). But this is not the optimal choice for big matrices.

Is there some code (preferably in Fortran, but not necessarily) to compute this determinant in a efficient way? Do I have to write it by myself?

Thank you very much!
 
Last edited by a moderator:
Physics news on Phys.org
There should be a Lapack routine to calculate the determinant of a symmetric matrix. There was a routine for that in Linpack. It may be an option in the routine to factorize a symmetric matrix for solving linear equations, not a separately named routine.

For a fully populated matrix, the Lapack method is is the most efficient way to do it (it takes O(n^3) operations for an nxn matrix). Of course if your matrix is sparse or has a special structure, you may be able to find a better way that uses all the information you know about the matrix.
 
Yes, of course, lapack is the best and optimal choice for symmetric or "generic" matrices. But I have not been able to find routines for anti-symmetric matrices in lapack.

Therefore, in your opinion, for an anti-symmetric matrix I have two choices: use lapack routines for "generic" matrices or write by myself a "fast" routine that exploits the anti-symmetry of the matrix. I think that if I write by myself this routine I will not get a better result than O(n^3) operations...so, for the time being, I will use the lapack routine although there should be a faster algorithm. :(
 
Sorry, my bad, my brain decided that "skew" meant "symmetric", which is nonsense of course :blushing:

The factorization algorithm for symmetric (but not positive definite) matrices is not straightforward, because you can have zero terms on the diagonal. You can't use pivoting because it destroys the symmetry. The LINPACK routine used an algorithm by Bunch and Parlett. Bunch (who was a PhD student of Parlett's, I believe) proved that if you eliminate variables in blocks of either 1 or 2 at a time, the factorization is always numerically stable without pivoting.

I don't have a reference to the original paper but I'm fairly sure it is referenced in the LINPACK / LAPACK documentation. I suspect the same idea would work for skew matrices, where of course every diagonal term in the matrix is zero.

But as you say, you will only gain a speed up of 2 or 3 times compared with a general matrix routine, so it's up to you if this is worth the trouble.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
18K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K