Compute determinant of a skew-symmetric matrix

In summary, Lapack routines do not factorize anti-symmetric matrices efficiently, but you can write a "fast" routine to exploit the anti-symmetry.
  • #1
Gianni
2
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
  • #2
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.
 
  • #3
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. :(
 
  • #4
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.
 
  • #5


Dear fellow scientist,

Thank you for your question. The determinant of a skew-symmetric matrix can be calculated efficiently using the properties of skew-symmetric matrices. Since skew-symmetric matrices have a special structure, there are specific algorithms that can be used to compute their determinants without the need for general matrix routines. One such algorithm is the Leibniz formula, which involves multiplying the elements in the main diagonal and subtracting the product of the elements in the off-diagonal positions. Another method is to use the fact that the determinant of a skew-symmetric matrix is equal to the square of the determinant of its corresponding skew-Hermitian matrix.

There are various code libraries available that have already implemented these algorithms for efficient computation of skew-symmetric matrix determinants. One such library is LAPACK, which has a routine specifically for computing the determinant of a skew-symmetric matrix called "dsytdrv". This routine is written in Fortran and can be easily incorporated into your code.

However, if you prefer to write your own code, you can use the above-mentioned algorithms to efficiently compute the determinant of a skew-symmetric matrix. I hope this helps and wish you success in your research.

Best regards,
 

What is a skew-symmetric matrix?

A skew-symmetric matrix is a type of matrix in which the transpose of the matrix is equal to its negative. In other words, for an n x n skew-symmetric matrix A, A^T = -A.

What is the formula for computing the determinant of a skew-symmetric matrix?

The formula for computing the determinant of a skew-symmetric matrix is det(A) = (-1)^n * a_1, where a_1 is the first element on the main diagonal and n is the size of the matrix.

Can a skew-symmetric matrix have a non-zero determinant?

No, a skew-symmetric matrix always has a determinant of 0. This is because the determinant of a matrix is equal to the product of its eigenvalues, and for a skew-symmetric matrix, the eigenvalues are always 0.

What is the significance of a skew-symmetric matrix in linear algebra?

Skew-symmetric matrices are important in linear algebra because they represent antisymmetric linear transformations. This means that the matrix represents a transformation that preserves the dot product of vectors, but reverses its sign.

How can the determinant of a skew-symmetric matrix be used in real-world applications?

The determinant of a skew-symmetric matrix can be used in real-world applications such as calculating the angular velocity of a rigid body in mechanics, or in quantum mechanics to determine the parity of a system. It can also be used in computer graphics to determine reflection and rotation transformations.

Similar threads

  • Linear and Abstract Algebra
Replies
1
Views
1K
Replies
7
Views
4K
  • Linear and Abstract Algebra
Replies
7
Views
2K
  • Linear and Abstract Algebra
Replies
1
Views
2K
  • Linear and Abstract Algebra
Replies
1
Views
1K
  • Classical Physics
Replies
1
Views
1K
Replies
4
Views
1K
  • Linear and Abstract Algebra
Replies
2
Views
18K
  • Linear and Abstract Algebra
Replies
1
Views
2K
  • Linear and Abstract Algebra
Replies
4
Views
3K
Back
Top