Trajectories of First-Order Linear Systems

Enter the following command to load the necessary tools.

<< Graphics`PlotField`

Part 1. Real Eigenvalues

The first matrix is defined by the next command.You will need to copy and modify this and other commands for the other matrices.

A  =  {{2, -1}, {3, -2}} ;
% // MatrixForm

The following command displays the eigenvalues and eigenvectors of the matrix.  The former sublist contains the eigenvalues λ (repeated if multiplicity > 1), and the latter the eigenvectors associated with the λ in respective order.

Eigensystem[A]

Record the eigenvalues and eigenvectors.  Now we construct the phase plane plot.  First we define the two differential equations, eq1 and eq2.  Then we solve using NDSolve and plot them under the specified initial conditions.  Finally, we combine these plots with the direction field generated by PlotVectorField.  You may need to change the initial conditions until you have a good picture of the phase portrait.

eq1  =  x1'[
            t] == A[[1]][[1]]*x1[t] + A[[1]][[2]]*
              x2[t];
eq2  =  x2'[
            t] == A[[2]][[1]]*x1[t] + A[[2]][[2]]*
              x2[t];

solution1  =  
        NDSolve[{eq1, eq2, x1[0] == 1, x2[0] == -3}, {x1, x2}, {t, 0, 
            10}];
solution2  =  
        NDSolve[{eq1, eq2, x1[0] == 0.2, x2[0] == 4}, {x1, 
            x2}, {t, 0, 10}];
solution3  =  
        NDSolve[{eq1, eq2, x1[0] == 1.7, x2[0] == 5}, {x1, x2}, {t, 0, 
            10}];
solutions  =  {solution1,  solution2, solution3};
phaseplot  =  
        Table[ParametricPlot[
            Evaluate[{x1[t], x2[t]} /. solutions[[i]]], {t, 0, 10}, 
            PlotStyle -> {RGBColor[1, 0, 0], Thickness[0.01]}, 
            DisplayFunction -> Identity], {i, 3}];

field  =  
        PlotVectorField[{A[[1]][[1]]*x1 + A[[1]][[2]]*
                x2, A[[2]][[1]]*x1 + A[[2]][[2]]*
                x2}, {x1, -5, 5}, {x2, -5, 5}, 
          ScaleFunction -> (0.5 &), HeadWidth -> 0, 
          AspectRatio -> 1, PlotPoints -> 20, Axes -> True, 
          DisplayFunction -> Identity];

Show[phaseplot,  field, 
        PlotRange -> {{-5, 5}, {-5, 5}}, 
        DisplayFunction -> $DisplayFunction];

You may copy the commands above and edit them to study the other cases.  In particular, you will need to change the definition of the system by editing the matrix A.  You may also need to change the initial conditions and the ranges for the dependent variables.

Part 2. Complex Eigenvalues

Part 3. On Your Own

Part 4. Summary