I have two matrices m1 and m2
as below:
m1 = {{1, 2, 4, 6}, {2, 0, 3, 4}, {1, -1, -4, 4}, {0, 2, -2, -1}};
m2 = {{0, -2, 2, 1}, {1, 0, 2, 1}, {1, -1, -2, 1}, {1, 3, -2, -1}};
these matrices are multiplied by varying real numbers n1 and n2
(n1*m1
and n2*m2
).
Although I can obtain sorted Eigenvectors of n1*m1
with this command:
storeigenm1 = {};
Block[{nx = 3, intervals = 0.5},
storeigenm1 =
Flatten[Last /@
SortBy[Transpose@MapAt[Orthogonalize, Eigensystem[#*m1], 2],
First] & /@ Range[0, nx, intervals], 1]];
When I use storeigenm1//MatrixForm
I can see a 36*1 matrix, because at any step of n1 (which is varied in the code from nx=0 to 3 by 0.5 intervals that equals to 9 stages and at any stage there are 4 eigenvectors thus the final results has 36 row). Sorting of Eigenvectors done based on Eigenvalues amounts.
{related to lowest Eigenvalue.......................... Eigenvector of 0*m1
second ..................... Eigenvector of 0*m1
third.......................... Eigenvector of 0*m1
fourth........................... Eigenvector of 0*m1
first............................Eigenvectot of 0.5*m1
second............................Eigenvectot of 0.5*m1
third...........................Eigenvectot of 0.5*m1
fourth............................Eigenvectot of 0.5*m1
.
.
.
.
..................................Eigenvectot of 3*m1}
But the main goal and main question is related to sort Eigenvectors of a combination of m1 and m2 (which multiplied by n1 and n2) which should be as below
{first........................... Eigenvector of 0*m1 + 0*m2
second........................... Eigenvector of 0*m1 + 0*m2
third........................... Eigenvector of 0*m1 + 0*m2
fourth........................... Eigenvector of 0*m1 + 0*m2
first...........................Eigenvectot of 0.5*m1 + 0*m2
second............................Eigenvectot of 0.5*m1 + 0*m2
third..........................Eigenvectot of 0.5*m1 + 0*m2
fourth...........................Eigenvectot of 0.5*m1 + 0*m2
and so on (same as below in which I don't bring all of element and just I partly write of them)
..................................Eigenvectot of 1*m1 + 0*m2
....
................................ Eigenvector of 0*m1 + 2.5*m2
.................................Eigenvectot of 0.5*m1 + 2.5*m2
..................................Eigenvectot of 1*m1 + 2.5*m2
....
..................................Eigenvectot of 2.5*m1 + 4*m2
..................................Eigenvectot of 3*m1 + 4*m2}
m2 multiplied by 4 since the final value of n2 is different of n1.
I would be so glad to know how I change the main command for this goal?
Flatten[Last /@ SortBy[Transpose@MapAt[Orthogonalize.....
. To start with, what is the benefit of applyingOrthogonalize
to the eigenvectors? Aren't the vectors that come out ofEigensystem
already an orthonormal basis? $\endgroup$0.5 m1
are normalized:Norm /@ Eigenvectors[0.5 m1]
returns{1., 1., 1., 1.}
$\endgroup$m1
andn1*m1
should have exactly the same eigenvectors, so why make the table in the first place? $\endgroup$