# Eigenvalues of a Matrix and RegionPlot

So, this is my problem.

I have a 15 x 15 matrix with 7 parameters. I'm assigning numerical values to 5 of the parameters. Then, I do something like:

RegionPlot[{Max[Re[Eigenvalues[M/.{a->a1, b->b1}]]]>1},{a1,0,1},{b1,0,1}]


Where M is the matrix and a and b the two parameters. This was working well when one of the five parameters was 0. But, as soon as I give it another values, say 0.5, it does not work anymore. My guess is that Mathematica is trying to get the Eigenvalues first, by solving this:

Max[Re[Eigenvalues[M/.{a->a1, b->b1}]]]


And only then uses RegionPlot to substitute a and b for a1 and b1. I know that, for instance, Mathematica only takes less than 1 second to find the Eigenvalues of the matrix if all the parameters have a given value. But, apparently, this is not working because Mathematica doesn't apply values to a1 and b1 immediately. Unfortunately, the matrix is too complex to post it here, but if anyone has some information how to accelerate this process, that would be appreciated.

PS: Here is the matrix, depending only on the a and b values

{{0.55 - 0.580263/(2.10526 - 1. b) - 0.025 b,
0, (-0.340132 + (0.365132 - 0.025 b) b +
a (0.013125 + (-0.013125 + 1.31839*10^-18 b) b))/(-4.21053 +
1.05 a + 2. b - 1.05471*10^-16 a b),
0.55 - 0.580263/(2.10526 - 1. b) - 0.025 b,
0.1 - 0.00263158/(1.05263 - 1. b) -
0.05 b, (-0.340132 + (0.365132 - 0.025 b) b +
a (0.013125 + (-0.013125 + 1.31839*10^-18 b) b))/(-4.21053 +
1.05 a + 2. b -
1.05471*10^-16 a b), (-0.102632 + (0.152632 - 0.05 b) b +
a (0.00125 + (-0.00125 + 2.63678*10^-18 b) b))/(-2.10526 +
0.05 a + 2. b - 1.05471*10^-16 a b),
0, (-0.340132 + (0.365132 - 0.025 b) b +
a (0.013125 + (-0.013125 + 1.31839*10^-18 b) b))/(-4.21053 +
1.05 a + 2. b - 1.05471*10^-16 a b), 0,
0, (-0.340132 + (0.365132 - 0.025 b) b +
a (0.013125 + (-0.013125 + 1.31839*10^-18 b) b))/(-4.21053 +
1.05 a + 2. b -
1.05471*10^-16 a b), (-0.102632 + (0.152632 - 0.05 b) b +
a (0.00125 + (-0.00125 + 2.63678*10^-18 b) b))/(-2.10526 +
0.05 a + 2. b - 1.05471*10^-16 a b), 0, 0}, {0,
0.025 + 0.525/(2.10526 - 1. a), (
0.340132 - 0.013125 a - 0.025 b + 1.31839*10^-18 a b)/(
4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), 0, 0, (
0.340132 - 0.013125 a - 0.025 b + 1.31839*10^-18 a b)/(
4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), 0,
0.025 + 0.525/(2.10526 - 1. a), (
0.340132 - 0.013125 a - 0.025 b + 1.31839*10^-18 a b)/(
4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b),
0.05 + 0.05/(1.05263 - 1. a), (
0.205263 - 0.0525 a - 0.05 b + 5.27356*10^-18 a b)/(
4.21053 - 2.1 a - 2. b + 2.10942*10^-16 a b), (
0.340132 - 0.013125 a - 0.025 b + 1.31839*10^-18 a b)/(
4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), 0, (
0.205263 - 0.0525 a - 0.05 b + 5.27356*10^-18 a b)/(
4.21053 - 2.1 a - 2. b + 2.10942*10^-16 a b), 0}, {0,
0, (-0.340132 + (0.365132 - 0.025 b) b +
a (0.013125 + (-0.013125 + 1.31839*10^-18 b) b))/(-4.21053 +
1.05 a + 2. b - 1.05471*10^-16 a b), 0,
0, (-0.340132 + (0.365132 - 0.025 b) b +
a (0.013125 + (-0.013125 + 1.31839*10^-18 b) b))/(-4.21053 +
1.05 a + 2. b -
1.05471*10^-16 a b), (-0.102632 + (0.152632 - 0.05 b) b +
a (0.00125 + (-0.00125 + 2.63678*10^-18 b) b))/(-2.10526 +
0.05 a + 2. b - 1.05471*10^-16 a b),
0, (-0.340132 + (0.365132 - 0.025 b) b +
a (0.013125 + (-0.013125 + 1.31839*10^-18 b) b))/(-4.21053 +
1.05 a + 2. b - 1.05471*10^-16 a b),
0, (-0.205263 + (0.255263 - 0.05 b) b +
a (0.0525 + (-0.0525 + 5.27356*10^-18 b) b))/(-4.21053 + 2.1 a +
2. b - 2.10942*10^-16 a b), (-0.340132 + (0.365132 - 0.025 b) b +
a (0.013125 + (-0.013125 + 1.31839*10^-18 b) b))/(-4.21053 +
1.05 a + 2. b -
1.05471*10^-16 a b), (-0.102632 + (0.152632 - 0.05 b) b +
a (0.00125 + (-0.00125 + 2.63678*10^-18 b) b))/(-2.10526 +
0.05 a + 2. b -
1.05471*10^-16 a b), (-0.205263 + (0.255263 - 0.05 b) b +
a (0.0525 + (-0.0525 + 5.27356*10^-18 b) b))/(-4.21053 + 2.1 a +
2. b - 2.10942*10^-16 a b), (-0.102632 + (0.152632 - 0.05 b) b +
a (0.0025 + (-0.0025 + 5.27356*10^-18 b) b))/(-1.05263 + 0.05 a +
1. b - 1.05471*10^-16 a b)}, {0.025 + 0.525/(2.10526 - 1. b), 0, (
0.340132 - 0.013125 a - 0.025 b + 1.31839*10^-18 a b)/(
4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b),
0.025 + 0.525/(2.10526 - 1. b), 0.05 + 0.05/(1.05263 - 1. b), (
0.340132 - 0.013125 a - 0.025 b + 1.31839*10^-18 a b)/(
4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), (
0.102632 - 0.00125 a - 0.05 b + 2.63678*10^-18 a b)/(
2.10526 - 0.05 a - 2. b + 1.05471*10^-16 a b), 0, (
0.340132 - 0.013125 a - 0.025 b + 1.31839*10^-18 a b)/(
4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), 0, 0, (
0.340132 - 0.013125 a - 0.025 b + 1.31839*10^-18 a b)/(
4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), (
0.102632 - 0.00125 a - 0.05 b + 2.63678*10^-18 a b)/(
2.10526 - 0.05 a - 2. b + 1.05471*10^-16 a b), 0,
0}, {0.475 - 0.525/(2.10526 - 1. b), 0, (0.2375 - 0.2375 b)/(
4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b),
0.475 - 0.525/(2.10526 - 1. b), 0.95 - 0.05/(1.05263 - 1. b), (
0.2375 - 0.2375 b)/(4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), (
0.475 - 0.475 b)/(2.10526 - 0.05 a - 2. b + 1.05471*10^-16 a b),
0, (0.2375 - 0.2375 b)/(
4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), 0, 0, (
0.2375 - 0.2375 b)/(4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), (
0.475 - 0.475 b)/(2.10526 - 0.05 a - 2. b + 1.05471*10^-16 a b), 0,
0}, {0, 0, 0.2375/(4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), 0,
0, 0.2375/(4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), 0, 0,
0.2375/(4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), 0, 0,
0.2375/(4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), 0, 0, 0}, {0,
0, (0.2375 - 0.2375 b)/(
4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), 0, 0, (
0.2375 - 0.2375 b)/(4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), (
0.475 - 0.475 b)/(2.10526 - 0.05 a - 2. b + 1.05471*10^-16 a b),
0, (0.2375 - 0.2375 b)/(
4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), 0, 0, (
0.2375 - 0.2375 b)/(4.21053 - 1.05 a - 2. b + 1.05471*10^-16 a b), (
0.475 - 0.475 b)/(2.10526 - 0.05 a - 2. b + 1.05471*10^-16 a b), 0,
0}, {0, 0.55 - 0.580263/(2.10526 - 1. a) - 0.025 a, (
0.0559654 + (-0.0792152 + 0.025 b) b +
a (-0.0677186 + (0.0908954 - 0.025 b) b) +
a^2 (0.0131979 + (-0.013125 + 1.31839*10^-18 b) b))/((-1.00555 +
1. b) (-4.21053 + 1.05 a + 2. b - 1.05471*10^-16 a b)), 0, 0, (
0.0559654 + (-0.0792152 + 0.025 b) b +
a (-0.0677186 + (0.0908954 - 0.025 b) b) +
a^2 (0.0131979 + (-0.013125 + 1.31839*10^-18 b) b))/((-1.00555 +
1. b) (-4.21053 + 1.05 a + 2. b - 1.05471*10^-16 a b)), 0,
0.55 - 0.580263/(2.10526 - 1. a) - 0.025 a, (
0.0559654 + (-0.0792152 + 0.025 b) b +
a (-0.0677186 + (0.0908954 - 0.025 b) b) +
a^2 (0.0131979 + (-0.013125 + 1.31839*10^-18 b) b))/((-1.00555 +
1. b) (-4.21053 + 1.05 a + 2. b - 1.05471*10^-16 a b)),
0.1 - 0.00263158/(1.05263 - 1. a) - 0.05 a, (
0.106906 + (-0.156043 + 0.05 b) b +
a (-0.159195 + (0.208041 - 0.05 b) b) +
a^2 (0.0527916 + (-0.0525 + 5.27356*10^-18 b) b))/((-1.00555 +
1. b) (-4.21053 + 2.1 a + 2. b - 2.10942*10^-16 a b)), (
0.0559654 + (-0.0792152 + 0.025 b) b +
a (-0.0677186 + (0.0908954 - 0.025 b) b) +
a^2 (0.0131979 + (-0.013125 + 1.31839*10^-18 b) b))/((-1.00555 +
1. b) (-4.21053 + 1.05 a + 2. b - 1.05471*10^-16 a b)), 0, (
0.106906 + (-0.156043 + 0.05 b) b +
a (-0.159195 + (0.208041 - 0.05 b) b) +
a^2 (0.0527916 + (-0.0525 + 5.27356*10^-18 b) b))/((-1.00555 +
1. b) (-4.21053 + 2.1 a + 2. b - 2.10942*10^-16 a b)), 0}, {0,
0, (0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0, 0}, {0,
0.475 - 0.525/(2.10526 - 1. a), (
0.00251256 + a (-0.0013191 + 1.32501*10^-19 b) -
0.00119347 b)/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0, (
0.00251256 + a (-0.0013191 + 1.32501*10^-19 b) -
0.00119347 b)/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0.475 - 0.525/(2.10526 - 1. a), (
0.00251256 + a (-0.0013191 + 1.32501*10^-19 b) -
0.00119347 b)/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0.95 - 0.05/(1.05263 - 1. a), (
0.0100503 + a (-0.00527638 + 5.30006*10^-19 b) -
0.00477387 b)/((-1.00555 + 1. b) (-4.21053 + 2.1 a + 2. b -
2.10942*10^-16 a b)), (
0.00251256 + a (-0.0013191 + 1.32501*10^-19 b) -
0.00119347 b)/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, (
0.0100503 + a (-0.00527638 + 5.30006*10^-19 b) -
0.00477387 b)/((-1.00555 + 1. b) (-4.21053 + 2.1 a + 2. b -
2.10942*10^-16 a b)), 0}, {0, 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, (
0.95 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 2.1 a + 2. b -
2.10942*10^-16 a b)), (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, (
0.95 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 2.1 a + 2. b -
2.10942*10^-16 a b)), 0}, {0, 0, (
0.0559654 + (-0.0792152 + 0.025 b) b +
a (-0.0677186 + (0.0908954 - 0.025 b) b) +
a^2 (0.0131979 + (-0.013125 + 1.31839*10^-18 b) b))/((-1.00555 +
1. b) (-4.21053 + 1.05 a + 2. b - 1.05471*10^-16 a b)), 0, 0, (
0.0559654 + (-0.0792152 + 0.025 b) b +
a (-0.0677186 + (0.0908954 - 0.025 b) b) +
a^2 (0.0131979 + (-0.013125 + 1.31839*10^-18 b) b))/((-1.00555 +
1. b) (-4.21053 + 1.05 a + 2. b - 1.05471*10^-16 a b)), (
0.05291 + (-0.102896 + 0.05 b) b +
a (-0.0539091 + (0.103895 - 0.05 b) b) +
a^2 (0.00125033 + (-0.00125 + 2.63678*10^-18 b) b))/((-1.00026 +
1. b) (-2.10526 + 0.05 a + 2. b - 1.05471*10^-16 a b)), 0, (
0.0559654 + (-0.0792152 + 0.025 b) b +
a (-0.0677186 + (0.0908954 - 0.025 b) b) +
a^2 (0.0131979 + (-0.013125 + 1.31839*10^-18 b) b))/((-1.00555 +
1. b) (-4.21053 + 1.05 a + 2. b - 1.05471*10^-16 a b)), 0, (
0.106906 + (-0.156043 + 0.05 b) b +
a (-0.159195 + (0.208041 - 0.05 b) b) +
a^2 (0.0527916 + (-0.0525 + 5.27356*10^-18 b) b))/((-1.00555 +
1. b) (-4.21053 + 2.1 a + 2. b - 2.10942*10^-16 a b)), (
0.0559654 + (-0.0792152 + 0.025 b) b +
a (-0.0677186 + (0.0908954 - 0.025 b) b) +
a^2 (0.0131979 + (-0.013125 + 1.31839*10^-18 b) b))/((-1.00555 +
1. b) (-4.21053 + 1.05 a + 2. b - 1.05471*10^-16 a b)), (
0.05291 + (-0.102896 + 0.05 b) b +
a (-0.0539091 + (0.103895 - 0.05 b) b) +
a^2 (0.00125033 + (-0.00125 + 2.63678*10^-18 b) b))/((-1.00026 +
1. b) (-2.10526 + 0.05 a + 2. b - 1.05471*10^-16 a b)), (
0.106906 + (-0.156043 + 0.05 b) b +
a (-0.159195 + (0.208041 - 0.05 b) b) +
a^2 (0.0527916 + (-0.0525 + 5.27356*10^-18 b) b))/((-1.00555 +
1. b) (-4.21053 + 2.1 a + 2. b - 2.10942*10^-16 a b)), (
0.05291 + (-0.102896 + 0.05 b) b +
a (-0.0551594 + (0.105145 - 0.05 b) b) +
a^2 (0.00250066 + (-0.0025 + 5.27356*10^-18 b) b))/((-1.00026 +
1. b) (-1.05263 + 0.05 a + 1. b - 1.05471*10^-16 a b))}, {0, 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), (
0.475 (-1. + b) (-1.05263 + a (0.0526316 - 1.11022*10^-16 b) +
1. b))/((-1.00026 + 1. b) (-2.10526 + 0.05 a + 2. b -
1.05471*10^-16 a b)), 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), (
0.475 (-1. + b) (-1.05263 + a (0.0526316 - 1.11022*10^-16 b) +
1. b))/((-1.00026 + 1. b) (-2.10526 + 0.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0}, {0, 0, (
0.00251256 + a (-0.0013191 + 1.32501*10^-19 b) -
0.00119347 b)/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0, (
0.00251256 + a (-0.0013191 + 1.32501*10^-19 b) -
0.00119347 b)/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0, (
0.00251256 + a (-0.0013191 + 1.32501*10^-19 b) -
0.00119347 b)/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, (
0.0100503 + a (-0.00527638 + 5.30006*10^-19 b) -
0.00477387 b)/((-1.00555 + 1. b) (-4.21053 + 2.1 a + 2. b -
2.10942*10^-16 a b)), (
0.00251256 + a (-0.0013191 + 1.32501*10^-19 b) -
0.00119347 b)/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, (
0.0100503 + a (-0.00527638 + 5.30006*10^-19 b) -
0.00477387 b)/((-1.00555 + 1. b) (-4.21053 + 2.1 a + 2. b -
2.10942*10^-16 a b)), 0}, {0, 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), (
0.475 (-1. + b) (-1.05263 + a (0.0526316 - 1.11022*10^-16 b) +
1. b))/((-1.00026 + 1. b) (-2.10526 + 0.05 a + 2. b -
1.05471*10^-16 a b)), 0, (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), 0, (
0.95 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 2.1 a + 2. b -
2.10942*10^-16 a b)), (
0.2375 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 1.05 a + 2. b -
1.05471*10^-16 a b)), (
0.475 (-1. + b) (-1.05263 + a (0.0526316 - 1.11022*10^-16 b) +
1. b))/((-1.00026 + 1. b) (-2.10526 + 0.05 a + 2. b -
1.05471*10^-16 a b)), (
0.95 (-1. + b) (-2.10526 + a (1.10526 - 1.11022*10^-16 b) +
1. b))/((-1.00555 + 1. b) (-4.21053 + 2.1 a + 2. b -
2.10942*10^-16 a b)), (
0.95 (-1. + b) (-1.05263 + a (0.0526316 - 1.11022*10^-16 b) +
1. b))/((-1.00026 + 1. b) (-1.05263 + 0.05 a + 1. b -
1.05471*10^-16 a b))}}

• Can you post at least the matrix with the value 0.5 only depending explicitly on the last two parameters a and b? Commented Apr 28, 2017 at 8:09
• Okay, I added it now Commented Apr 28, 2017 at 9:08

## 1 Answer

Using a 2x2 as an example matrix, we can plot the maximum real part of its eigenvalues with Plot3D to get an idea of the range and then do our RegionPlot like this

ClearAll["Global*"]
m = {{5 a, 1}, {1, b}};

Plot3D[Max[Re /@ Eigenvalues[m]], {a, 0, 1}, {b, 0, 1}]
RegionPlot[Max[Re /@ Eigenvalues[m]] < 3, {a, 0, 1}, {b, 0, 1}]


RegionPlot is certainly too slow with your matrix. An alternative is to evaluate the eigenvalues at closely spaced points and use an interpolating function to obtain the RegionPlot, like this

f = Interpolation[Flatten[
Table[{{a, b}, Max[Re@Eigenvalues[M]]},
{a, 0, 1, .01}, {b, 0, 1, 0.01}],
1]]
RegionPlot[f[a, b] > 1, {a, 0, 1}, {b, 0, 1}]


Plot3D is recommended to make sure we generate enough points in the region where the function is rapidly changing.

• Thanks, but I'm not interested on knowing the range. I really just want to know when it's above 1 - and I already have this knowledge (more or less), but now I need to represent it. The RegionPlot works really well for what I want, it's just not working, because, I'm assuming, it's too complex. Commented Apr 28, 2017 at 9:11
• @GonçaloFaria RegionPlot` was too slow for me with your matrix, but the interpolating function method is reasonably fast. I added the interpolation method to my answer. Commented Apr 28, 2017 at 10:53
• Thanks! Yeah, that did the trick. It's still painfully slow but, at least, I can see the results coming in a matter of minutes instead of hours. Thank you :) Commented Apr 28, 2017 at 11:00