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

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

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

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

Yes, of course… the arg max would give the i