Efficient Fortran Subroutines for Matrix Diagonalisation: Small Matrices

  • Thread starter Morberticus
  • Start date
  • Tags
    Matrix
In summary, the conversation discusses the need for a matrix diagonalisation subroutine in Fortran and the possibility of using LAPACK/BLAS for this task. It is noted that LAPACK may be seen as overkill for smaller matrices and that understanding every line of code is not necessary. The size of LAPACK is explained as it is designed for various matrix solutions. The type of matrices and their origin are also mentioned as factors to consider when choosing a subroutine.
  • #1
Morberticus
85
0
Hi,

I'm looking for a matrix diagonalisation subroutine in fortran. Does anyone know of any online sources for such things? The matrices are small (The largest being 100x100) so LAPACK/BLAS seems like overkill.
 
Physics news on Phys.org
  • #2
Why do you think LAPACK is "overkill"? The reason the code may look complicated is because it is carefully written to handle any numbers that are thrown at them, but it doesn't add anything significant to the computing time.

You don't need to understand what every line of the code is for. Just compile the libraries and use them.
 
  • #3
LAPACK is large because it is designed to provide many different kinds of matrix solutions. You say your largest problem will be the diagonalization of a 100 x 100 matrix. How are these matrices obtained? For example, finite elements typically produce banded matrices, where zeros appear in a large number of the cells, and the remaining elements are symmetric about the main diagonal. Boundary elements typically produce fully populated matrices where zero elements are rare. Least squares regression analyses produce matrices which can be difficult to diagonalize unless you have access to special routines or have a machine capable of doing extra-long floating point precision. What's yer poison?
 

1. What is matrix diagonalisation?

Matrix diagonalisation is a process of finding a diagonal matrix that is similar to a given square matrix. This means that the diagonal matrix has the same eigenvalues as the original matrix, and the eigenvectors of the two matrices are related by a linear transformation.

2. Why is matrix diagonalisation important?

Matrix diagonalisation is important because it simplifies the calculations involved in certain operations, such as finding powers and inverses of matrices. It also helps in solving systems of linear equations and understanding the behavior of dynamical systems.

3. How is matrix diagonalisation done?

The process of matrix diagonalisation involves finding the eigenvalues and eigenvectors of the given matrix. These eigenvectors form a basis for the vector space, and the diagonal matrix is constructed using the eigenvalues as the entries on the main diagonal.

4. What are the benefits of diagonalising a matrix?

Diagonalising a matrix allows for easier computation of certain operations, such as finding powers and inverses of matrices. It also simplifies the process of finding solutions to systems of linear equations and understanding the behavior of dynamical systems.

5. Can any matrix be diagonalised?

No, not all matrices can be diagonalised. A matrix can only be diagonalised if it has n linearly independent eigenvectors, where n is the size of the matrix. If a matrix has repeated eigenvalues, it may not be diagonalisable. Additionally, matrices with complex eigenvalues may not be diagonalisable.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Linear and Abstract Algebra
Replies
12
Views
1K
  • Linear and Abstract Algebra
Replies
1
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Linear and Abstract Algebra
Replies
3
Views
2K
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Linear and Abstract Algebra
Replies
4
Views
2K
  • Linear and Abstract Algebra
Replies
3
Views
1K
  • Linear and Abstract Algebra
Replies
3
Views
2K
  • Linear and Abstract Algebra
Replies
4
Views
2K
Back
Top