I have a matrix as a function of a parameter like
d[\[Delta]_] := {{(
6.20074189109658` -
0.5773502691896257` \[Delta])/(-(3 + 2 \[Delta])^2 (-3 +
4 \[Delta]))^(1/6),
0.`, -(0.19595917942265423`/(-(3 + 2 \[Delta])^2 (-3 +
4 \[Delta]))^(1/6)),
0.27712812921102037`/(-(3 + 2 \[Delta])^2 (-3 + 4 \[Delta]))^(
1/6), 0.`, 0.`}, {0.`, (
6.339305955702091` +
1.1547005383792515` \[Delta])/(-(3 + 2 \[Delta])^2 (-3 +
4 \[Delta]))^(1/6), 0.`, 0.`,
0.27712812921102037`/(-(3 + 2 \[Delta])^2 (-3 + 4 \[Delta]))^(
1/6), 0.`}, {-(
0.19595917942265423`/(-(3 + 2 \[Delta])^2 (-3 + 4 \[Delta]))^(
1/6)), 0.`, (
1.1547005383792515` (5.25` + \[Delta]))/(-(3 +
2 \[Delta])^2 (-3 + 4 \[Delta]))^(1/6), 0.`, 0.`,
0.`}, {0.27712812921102037`/(-(3 + 2 \[Delta])^2 (-3 +
4 \[Delta]))^(1/6), 0.`,
0.`, -((2.309401076758503` (-2.625` + \[Delta]))/(-(3 +
2 \[Delta])^2 (-3 + 4 \[Delta]))^(1/6)), 0.`, 0.`}, {0.`,
0.27712812921102037`/(-(3 + 2 \[Delta])^2 (-3 + 4 \[Delta]))^(
1/6), 0.`, 0.`, (
5.923613761885561` -
0.5773502691896257` \[Delta])/(-(3 + 2 \[Delta])^2 (-3 +
4 \[Delta]))^(1/6), 0.`}, {0.`, 0.`, 0.`, 0.`, 0.`, (
5.7850496972800505` +
1.1547005383792515` \[Delta])/(-(3 + 2 \[Delta])^2 (-3 +
4 \[Delta]))^(1/6)}};
If I plot its eigenvalues using the following code
p = Plot[Evaluate[Eigenvalues[d[\[Delta]]]], {\[Delta], -0.3, 0.3}]
But I'd like to plot the eigenvalues using another method, constructing the appropriate transformation that afterward, I have the eigenvalues at the diagonal elements of the matrix. If I use the eigenvectors
command, I will find such a matrix in which each row is an eigenvector. Then I try to extract data using the following code
For[\[Delta] = -0.3, \[Delta] <= 0.3, \[Delta] = \[Delta] + 0.01,
A = Evaluate[Eigenvectors[d[\[Delta]]]];
MT = A.d[\[Delta]].Inverse[A];
AppendTo[data[[1]], {\[Delta], MT[[1, 1]]}];
AppendTo[data[[2]], {\[Delta], MT[[2, 2]]}];
AppendTo[data[[3]], {\[Delta], MT[[3, 3]]}];
AppendTo[data[[4]], {\[Delta], MT[[4, 4]]}];
AppendTo[data[[5]], {\[Delta], MT[[5, 5]]}];
AppendTo[data[[6]], {\[Delta], MT[[6, 6]]}];
];
ListLinePlot[
{data[[1]], data[[2]], data[[3]], data[[4]], data[[5]], data[[6]]}
]
but the final results are different and wrong:
One can see that after each crossing of the lines, the color of lines changes in a wring way. How can I use the second method in the right way?