Phase Portrait Plotter Calculator

Visualize vector fields, trajectories, and equilibrium behavior quickly. Adjust coefficients, ranges, seeds, and simulation controls. See classifications, export data, and study nonlinear-style dynamics carefully.

Input matrix and plotting controls

Configure the system

The page keeps a single-column reading flow, while the calculator fields become three columns on large screens.

Choose a known qualitative pattern or keep your own matrix.
Graphical output

Phase portrait canvas

The canvas draws the vector field, automatic trajectories, a highlighted trajectory, axes, and optional nullclines.

Tip: Increase integration steps for smoother curves, then reduce arrow density if the field becomes too crowded.

Trajectory sample table

Highlighted seed coordinates

This table lists sampled points from the highlighted trajectory and supplies the downloadable CSV rows.

Step t x(t) y(t) dx/dt dy/dt
Example data table

Reference systems for quick testing

System type a b c d Trace Determinant Expected portrait
Stable spiral 0 1 -1 -0.4 -0.4 1 Inward spirals to the origin
Saddle point 2 0 0 -1 1 -2 One attracting and one repelling direction
Stable node -2 1 0 -1 -3 2 Direct decay without oscillation
Center 0 1 -1 0 0 1 Closed loops around the origin
Formula used

Mathematics behind the calculator

Linear autonomous system

x' = ax + by

y' = cx + dy

The coefficient matrix is A = [[a, b], [c, d]]. The origin is the equilibrium when the system has no constant forcing terms.

Trace and determinant test

trace = a + d

det = ad - bc

Δ = trace2 - 4det. These three values classify most planar linear equilibria.

Eigenvalues

λ = (trace ± √Δ) / 2

Real eigenvalues produce nodes or saddles. Complex eigenvalues produce spirals or centers, depending on the real part.

Trajectory integration

The portrait uses a fourth-order Runge–Kutta method. It approximates trajectories from seeded starting points by stepping forward and backward in time.

How to use this calculator

Workflow

  1. Choose a preset or enter custom values for the matrix coefficients a, b, c, and d.
  2. Set the visible x- and y-ranges to control how much of the phase plane is displayed.
  3. Adjust step size, integration steps, arrow density, and seed count for the desired visual detail.
  4. Enter a highlighted seed point to inspect one specific solution curve more closely.
  5. Click Plot phase portrait to place the result summary directly below the header and above the form.
  6. Review the classification, eigenvalues, nullclines, plot, and trajectory sample table.
  7. Use the export buttons to save the sampled trajectory as CSV or capture the results area as a PDF.
FAQs

Frequently asked questions

1. What does this calculator plot?

It plots the phase portrait of a two-dimensional linear autonomous system. You see arrows for the vector field, many seeded trajectories, and one highlighted solution curve for closer inspection.

2. Why are trace and determinant important?

Trace controls total expansion or contraction. Determinant shows whether directions agree or split. Together with the discriminant, they classify nodes, saddles, spirals, repeated cases, and centers.

3. What is the highlighted seed point?

It is a chosen initial condition (x0, y0). The calculator tracks this solution and lists sampled coordinates so you can inspect how one path evolves over time.

4. What do nullclines tell me?

A nullcline is where one derivative becomes zero. On an x-nullcline, horizontal motion pauses. On a y-nullcline, vertical motion pauses. Their intersection helps identify equilibria and directional changes.

5. Why might the curves look jagged?

The numerical step size may be too large, or the field may change quickly. Reduce the step size or increase the integration steps to improve smoothness and accuracy.

6. Can this handle nonlinear systems?

This version is built for linear systems only. It is still useful for studying local behavior near equilibria, because nonlinear systems are often approximated by linearization.

7. What does determinant zero mean?

A zero determinant means at least one eigenvalue is zero. The equilibrium becomes degenerate, and the portrait can show non-isolated equilibria, slow drift, or semistable behavior.

8. What do the export buttons save?

The CSV contains sampled coordinates and derivatives from the highlighted trajectory. The PDF captures the summary area, including metrics and the rendered phase portrait for reporting or teaching notes.

Related Calculators

dynamical system simulatorcobweb diagram generatorbasin of attraction calculatorhopf bifurcation calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.