BLI
November 12, 2020, 4:14pm
1
I’m looking for the spectral radius of matrix M given by:
M =\left(\begin{array}{ccc}0 & k & r\\1 & 0 & 0\\0 & 1-n & 0\end{array}\right)
where all of k,r,n are non-negative reals.
WolframAlpha can compute the eigenvalues: there are one real and two complex conjugate eigenvalues. But the expressions are really ugly.
Does any of the Julia symbolic packages support spectral radius computations?
SymPy can handle this 3x3 case:
using SymPy, LinearAlgebra
@vars k r n positive=true
M = [0 k r; 1 0 0; 0 1-n 0]
eigvals(M)
1 Like
BLI
November 12, 2020, 5:07pm
3
Can I also specify that 0 < n < 1?
You’re solving a cubic polynomial, so the analytical expressions are always going to be ugly, no?
2 Likes
BLI
November 12, 2020, 8:18pm
5
I suspect the expressions will be ugly (as you say). The problem is that I try to recreate an expression in a publication, and the expression in the publication is really, really simple.
Of course, there is always the possibility that the expression in the publication is incorrect…
You shoud be able to verify the solution in the paper directly (or show that it’s wrong), by substituting it into \det(A-\lambda I)=0 .
4 Likes
BLI
November 12, 2020, 9:25pm
7
Good point.
On second thought… [corrected after tip from dpsanders
]
\rho(A) =\max_i |\lambda_i (A)|
so I guess there is no guarantee that the spectral radius is an eigenvalue?
That should be max
, not argmax
. But yes, it’s the modulus of an eigenvalue.
1 Like
BLI
November 13, 2020, 8:05am
9
Yes, of course… the arg max
would give the i …