How do I reduce a symmetric matrix to a tridiagonal matrix with the same eigenvalues?

StackOverflow https://stackoverflow.com/questions/23181283

  •  06-07-2023
  •  | 
  •  

Question

I have a symmetric matrix found from the following commands:

a=rand(n);
A=triu(a)+triu(a,1)'

I was wondering how I reduce this symmetric matrix into a tridiagonal matrix?

Any help is appreciated. Thank you very much.

Était-ce utile?

La solution

What you want is to find the upper Hessenberg form of your matrix. For a symmetric matrix, this is tridiagonal.

Use the command hess to do this:

B=hess(A); 
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top