Creating a matrix with desirable eigenvalues

  • Context: Graduate 
  • Thread starter Thread starter Deimantas
  • Start date Start date
  • Tags Tags
    Eigenvalues Matrix
Click For Summary

Discussion Overview

The discussion revolves around generating a large matrix with specific eigenvalue characteristics, particularly focusing on ensuring that all eigenvalues are positive and closely spaced within a small interval. Participants explore various methods for achieving this, including the use of diagonal matrices and orthogonal transformations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant seeks a method to create a large symmetric matrix with positive eigenvalues that are closely spaced.
  • Another participant suggests using a diagonal matrix and applying a random orthogonal transformation to control the eigenvalue distribution.
  • A later reply provides a specific example of forming a 2x2 matrix with desired eigenvalues through diagonalization and orthogonal transformation.
  • One participant mentions the LAPACK library as a resource for matrix generation routines that may offer better numerical behavior for large matrices.
  • Another participant expresses concern about the complexity of learning LAPACK and clarifies the need for a larger matrix (100x100) rather than smaller examples.
  • Further suggestions include using Gram-Schmidt orthogonalization to create orthogonal vectors for constructing the orthogonal transformation needed for larger matrices.

Areas of Agreement / Disagreement

Participants present multiple approaches to the problem, and while there are suggestions and examples provided, no consensus is reached on a single method or solution. The discussion remains open with various competing views on how to achieve the desired matrix properties.

Contextual Notes

Some limitations include the dependency on the method of orthogonal transformation and the specific requirements for the size and properties of the matrix. The discussion does not resolve the effectiveness of the proposed methods for large matrices.

Deimantas
Messages
38
Reaction score
0
Hello,

I want to generate a (large) matrix with eigenvalues that are all in a small interval. The relationship between the maximum eigenvalue and minimum eigenvalue should be as small as possible, that's the goal. And the eigenvalues must all be positive.

Is there any simple way to do this? I'm using Mathcad, and I've built a function to randomly generate a symmetric matrix. And when I want all the eigenvalues positive, I just use the matrix multiplied by it's transpose. But the eigenvalues are scattered in a large interval, and the relationship between the max eigenvalue and min eigenvalue is in the hundreds and thousands. Any tricks to make the eigenvalues get closer to each other?
 
Physics news on Phys.org
Are you trying to generate random matrices? Because you can just pick a diagonal matrix if all you want is an arbitrary single such matrix.

Otherwise pick a diagonal matrix randomly, and conjugate it by a random orthogonal transformation. The eigenvalues are determined by the diagonal entries and the eigenvectors by the orthogonal matrix so by picking them with the appropriate distribution you can get your eigenvectors and eigenvalues to have whatever distribution you want without too much fuss.
 
  • Like
Likes   Reactions: 1 person
Office_Shredder said:
Are you trying to generate random matrices? Because you can just pick a diagonal matrix if all you want is an arbitrary single such matrix.

Otherwise pick a diagonal matrix randomly, and conjugate it by a random orthogonal transformation. The eigenvalues are determined by the diagonal entries and the eigenvectors by the orthogonal matrix so by picking them with the appropriate distribution you can get your eigenvectors and eigenvalues to have whatever distribution you want without too much fuss.

Thanks for replying. So that's the easiest way, right? Could you give a simple example of conjugating a small diagonal matrix by an orthogonal transformation?
 
^ Let's say you want a 2x2 matrix with eigenvalues 2 and 3. First you form the diagonal matrix

##\begin{pmatrix}2&0\\0&3\end{pmatrix}##

then you multiply this matrix from the left side with the rotation matrix (which is orthogonal)

##\begin{pmatrix}\cos\theta&\sin\theta\\-\sin\theta&\cos\theta\end{pmatrix}##

and finally you multiply the resulting matrix from the right side with the inverse rotation matrix

##\begin{pmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{pmatrix}##

If the parameter ##\theta## is chosen randomly from interval ##[0,2\pi]##, the eigenvalues are probably not obviously visible from the resulting matrix, but they will still be 2 and 3.
 
  • Like
Likes   Reactions: 1 person
Thank you both for the help, much appreciated
 
Look at the test programs that come with the LAPACK library, and their documentation. There are matrix generation routines that do this type of thing, and for "large" matrices they will probably have better numerical behavior than code you invent for yourself. IIRC they use other numerical methods besides the idea in post #4. http://www.netlib.org/lapack/
 
I'm afraid acquinting myself with LAPACK would take too much time.. Oh and it turns out matrix rotation isn't exactly the thing I was looking for, because what I need is a 100x100 matrix, not 2x2 or 3x3..
 
Deimantas said:
Oh and it turns out matrix rotation isn't exactly the thing I was looking for, because what I need is a 100x100 matrix, not 2x2 or 3x3..

You don't have to use a rotation matrix as the orthogonal transformation. You can form other orthogonal transformations by making NxN matrices that have a set of N orthogonal vectors as their columns. If you want to make a set of N orthogonal vectors in ℝN, just create N random vectors and use the Gram-Schmidt orthogonalization method on them.

Once you have created the orthogonal matrix ##U## that has the random orthogonal vectors as its columns, you just make the diagonal matrix ##D## that has the desired eigenvalues, and then compute ##U^{-1}DU##, which is a random matrix that has the eigenvalues you want. Remember that for an orthogonal matrix ##U##, ##U^{-1}## is just the transpose of ##U##.

For more info, see

http://en.wikipedia.org/wiki/Orthogonal_matrix

http://en.wikipedia.org/wiki/Gram-schmidt
 

Similar threads

Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K