My symbolic matrix $A$ reads
\begin{equation*} \left( \begin{array}{ccc} a \left(x^2+y^2+z^2\right) & b y z+i v x & -i v y \\ b y z-i v x & a \left(x^2+y^2+z^2\right) & b x y+i v z \\ i v y & b x y-i v z & a \left(x^2+y^2+z^2\right) \\ \end{array} \right), \end{equation*} where $a,b,v$ are nonnegative real numbers, and $x,y,z$ denote Cartesian coordinates.
$Assumptions = Element[{a, v, b}, Reals] && v >= 0 && b >= 0 && a >= 0;
A = ConstantArray[0, {3, 3}];
diagm = {a (x^2 + y^2 + z^2), a (x^2 + y^2 + z^2),
a (x^2 + y^2 + z^2)}; nondiagm = {I v x + b z y , -I v y ,
b x y + I v z};
A[[1, 1]] = diagm[[1]];
A[[2, 2]] = diagm[[2]];
A[[3, 3]] = diagm[[3]];
A[[1, 2]] = nondiagm[[1]];
A[[2, 1]] = Conjugate[A[[1, 2]]];
A[[1, 3]] = nondiagm[[2]];
A[[3, 1]] = Conjugate[A[[1, 3]]];
A[[2, 3]] = nondiagm[[3]];
A[[3, 2]] = Conjugate[A[[2, 3]]];
Af = ComplexExpand /@ A // Simplify;
Af // MatrixForm
evals = Eigenvalues[Af, Cubics -> True];
Using Eigensystem
, I can calculate the eigenvalues and eigenvectors of my matrix. For a specific $a,b,v,x,y,z$, I notice that the eigenvalues are not sorted. I can try to sort this particular matrix using this and this threads
Aftmp = Af /. {z -> 2, x -> 2, y -> 2, v -> 1, b -> 0.5, a -> 0.2} // Simplify;
Transpose@SortBy[Transpose[Eigensystem[Aftmp]], N]
Now, my question is how can I apply this particular order of numerical eigensystems to my symbolic matrix? As I need to use an ordered eigensystem in the rest of my script for various matrices, a non-hardcoded approach is much appreciated.
$Assumptions
twice, the second assignment overwrites the first one. It's a regular variable. $\endgroup$