1
$\begingroup$

For a parametrized matrix $H(\lambda)$, how do I plot all the eigenvalues of the matrix vertically corresponding to a particular value of $\lambda$? i.e. we use $\lambda$ as the horizontal axis and the eigenvalues are along the vertically axis.

ps. We can for sure plot each of these points separately, but I'm wondering whether there is a simpler way. Thanks.

$\endgroup$
4
  • $\begingroup$ could you provide a MWE of the input? $\endgroup$
    – Nasser
    Commented Jun 3, 2020 at 2:23
  • $\begingroup$ what does MWE stand for? $\endgroup$
    – M. Zeng
    Commented Jun 3, 2020 at 4:08
  • 2
    $\begingroup$ MWE is a minimum working example that somewhat represents your problem. Having that makes it much easier for people to help you as they don’t have to spend so much time writing code or guessing what you want. In this case, even providing a small sample dataset would be really helpful. $\endgroup$
    – MassDefect
    Commented Jun 3, 2020 at 4:31
  • 1
    $\begingroup$ Tracking Eigenvalues Through a Crossing $\endgroup$
    – LouisB
    Commented Jun 3, 2020 at 4:44

1 Answer 1

1
$\begingroup$

See if the following works for you (I made up a matrix that depends on lambda since none was provided):

ClearAll[m] 
m[lambda_] := {{1 + lambda,       2 lambda,          3}, 
               {3 + lambda^2,   1 - lambda,          2}, 
               {2,                      -1,   3 lambda}}

DiscretePlot[Evaluate@Eigenvalues@m[l], {l, 1, 10}, Filling -> None]

plot for discrete values of lambda

Plot[Evaluate@Eigenvalues@m[l], {l, 1, 10}]

plot for continuous values of lambda

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.