A $2\times 2$ linear ODE system can be visualized by StreamPlot in Mathematica. For example:

StreamPlot[{y, y - x}, {x, -3, 3}, {y, -3, 3}]

which gives

enter image description here

Or, this code:

StreamPlot[{y, -3 y - x}, {x, -3, 3}, {y, -3, 3}]


enter image description here

Here is my question:

How can I draw a pair of eigenvectors (like arrows in this answer) in the graph?


As Öskå commented Show and Graphics is the way to go:

m = {{0, 1}, {-1, -3}};
ev = Eigenvectors[m];

 StreamPlot[m.{x, y}, {x, -3, 3}, {y, -3, 3}],
 Graphics[{Red, Arrow[{{0, 0}, #}] & /@ ev}]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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