Solving Problem to Get Unnormalized Eigenvectors in C/Fortran

In summary, the individual is seeking a way to obtain unnormalized eigenvectors from a matrix, specifically through a subroutine in C or Fortran. Normalization is not a mysterious concept and the individual is interested in finding the normalization factor for each vector. The use of Mathematica is not feasible for the individual's project.
  • #1
evgenx
14
0
Hallo,

I am trying to solve the following problem. I need to get eigenvectors of a matrix. I know that there are many subroutines for that in linear algebra packages, for instance in Lapack there is DSPEV, but they all give normalized eigenvectors, while I need the "original" unnormalized ones. I will very appreciate any idea/point how one can solve this using a standart library/subroutine in C or fortran (to embed it in a code written in C/frotran).
Many thanks!Evgeniy
 
Last edited:
Physics news on Phys.org
  • #3
What do you mean by an "unnormalized" eigenvector?

If you multiply a "normalized" vector by any nonzero random number, it becomes an unnormalized vector - but I don't suppose that was what you really wanted to do..

Normalized vectors just have the some nice property. Either the maximum entrry in the vector is +1.0, or ##x^Tx = 1##, or ##x^TAx = 1##, or whatever method of normalization you choose. Normalization isn't something mysterious and complicated.
 
  • #4
Hi All,

Many thanks for your replies !
Concerning the solution with Mathematica it is of course very nice but unfortunatelly I cannot use it. I need a subroutine in C or fortran because I have to embed it in a code (written in C/fortran). Sorry, that I was imprecise in my post concerning the type of solution.

To the question on the "unnormalized" eigenvectors, yes you are right that normalization isn't mysterious :). In fact, I am interested in the
the normalization factor in the case of x^{T}x=1. I thought that if I get the unnormalized eigenvectors, that is, the "raw" eigenvectors obtained after diagonalization of the matrix, I would be able to find the normalization factor for each vector.
 
Last edited:
  • #5
,

There are a few potential solutions to this problem. One option would be to use a different subroutine in the Lapack library, such as DSYEV, which allows you to specify whether you want normalized or unnormalized eigenvectors. Another option would be to modify the output of the DSPEV subroutine to unnormalize the eigenvectors yourself, using the eigenvalues as scaling factors.
Alternatively, you could write your own subroutine to calculate the eigenvectors using a different method, such as the power method or QR algorithm, which may give you unnormalized eigenvectors by default. However, this would require more effort and expertise in linear algebra.
Overall, it is important to carefully consider the specific needs and constraints of your project before deciding on the best approach for obtaining unnormalized eigenvectors. I hope this helps, and good luck with your research!
 

1. How do I solve for unnormalized eigenvectors in C/Fortran?

In order to solve for unnormalized eigenvectors in C/Fortran, you will need to use a linear algebra library that supports this functionality. Some popular options include LAPACK and BLAS. These libraries have built-in functions for calculating eigenvectors, including the option to return unnormalized eigenvectors.

2. Why do I need unnormalized eigenvectors?

Unnormalized eigenvectors are important because they can provide additional information about a system or matrix. Normalized eigenvectors have a magnitude of 1, but unnormalized eigenvectors can have any magnitude, allowing for a more complete understanding of the system.

3. How do I interpret unnormalized eigenvectors?

Interpreting unnormalized eigenvectors can be done in a similar manner as normalized eigenvectors. The direction of the vector will still represent the principal direction of the matrix or system, but the magnitude will also provide information about the strength or importance of that direction.

4. Can I normalize unnormalized eigenvectors?

Yes, it is possible to normalize unnormalized eigenvectors by dividing each element by the magnitude of the vector. However, keep in mind that this will change the magnitude and therefore potentially alter the information the vector provides about the system.

5. Are there any potential issues with calculating unnormalized eigenvectors?

One potential issue when calculating unnormalized eigenvectors is that the vector may become very large or very small, causing numerical instability. This can be mitigated by using a linear algebra library that has robust algorithms for calculating eigenvectors, or by scaling the matrix beforehand to avoid extreme values.

Similar threads

Replies
2
Views
1K
  • Programming and Computer Science
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Programming and Computer Science
2
Replies
59
Views
9K
  • Quantum Physics
Replies
2
Views
957
  • Programming and Computer Science
Replies
14
Views
4K
  • Calculus and Beyond Homework Help
Replies
2
Views
363
Back
Top