---
title: The phase plane
heading: Reading a system's fate from two numbers
eyebrow: A8 · Lesson 40 · The phase plane
xp: 40
---

::: hook
An oscillator circuit needs to start by itself: switched on with almost nothing in it, it must grow its own oscillation from noise. A latch needs to snap one way or the other from its balance point. A filter needs to settle. Each of these is a statement about how trajectories move near an equilibrium in the **phase plane**, and for a two-variable linear system all of it is decided by two numbers you can read off the matrix at a glance: its trace and its determinant.
:::

::: play
- The arrows and curves show $\dot{\mathbf{x}} = A\mathbf{x}$ for $A = \begin{bmatrix}a & b\\c & d\end{bmatrix}$.
- Watch the readouts as you move the sliders: trace $T$, determinant $D$, and $T^2 - 4D$.
- Find a saddle ($D < 0$), a spiral ($T^2 < 4D$), a node ($T^2 > 4D > 0$), and a center ($T = 0$, $D > 0$).
:::
:::

```sim plot
view: flow
x: x = -3..3
y: y = -3..3
slider: a = -2..2 step 0.1 = -0.5
slider: b = -2..2 step 0.1 = 1.5
slider: c = -2..2 step 0.1 = -1.5
slider: d = -2..2 step 0.1 = -0.5
dx: a*x + b*y
dy: c*x + d*y
start: 2.5, 0 | forward
start: -2.5, 0.5 | forward
start: 0, 2.5 | forward
start: 0.5, -2.5 | forward
grid: 16
readout: trace T = a + d | digits: 3
readout: determinant D = a*d - b*c | digits: 3
readout: T² − 4D = (a + d)^2 - 4*(a*d - b*c) | digits: 3
```

::: predict
## A matrix has a negative determinant. What does the phase portrait look like near the origin?

- [ ] A stable spiral
- [x] A saddle: trajectories come in along one direction and leave along another
- [ ] A center
- [ ] A stable node

::: reveal
A saddle. The determinant is the product of the eigenvalues, so a negative determinant means one positive and one negative eigenvalue. Trajectories approach along the negative one's eigenvector and get flung out along the positive one's. Whatever the trace, a saddle is unstable.
:::
:::

::: nameit
## The trace-determinant plane

For a 2 × 2 matrix the eigenvalues are $\lambda = \frac{T \pm \sqrt{T^2 - 4D}}{2}$, where $T = \lambda_1 + \lambda_2$ and $D = \lambda_1\lambda_2$. That gives the whole classification:

| Condition | Eigenvalues | Portrait |
|---|---|---|
| $D < 0$ | real, opposite signs | **saddle** (unstable) |
| $D > 0$, $T^2 > 4D$ | real, same sign | **node**: stable if $T < 0$, unstable if $T > 0$ |
| $D > 0$, $T^2 < 4D$ | complex, $\frac{T}{2} \pm j\cdots$ | **spiral**: stable if $T < 0$, unstable if $T > 0$ |
| $D > 0$, $T = 0$ | $\pm j\sqrt D$ | **center**: closed orbits |
| $T^2 = 4D$ | repeated | boundary: star or degenerate node |

**Stable** (every trajectory goes to the origin) exactly when $T < 0$ and $D > 0$.

## Reading it in circuits

- A series RLC: $T = -R/L < 0$ and $D = \frac{1}{LC} > 0$, so it's always stable; low $R$ puts it among the spirals, high $R$ among the nodes.
- An oscillator adds a negative resistance (an amplifier feeding energy in), making $T > 0$: an unstable spiral, so noise grows into oscillation. Lesson 42 shows what stops it growing.
- Positive feedback with enough gain gives $D < 0$: a saddle, the balance point of a latch.

## Sketching

Draw the **nullclines**, where $\dot x = 0$ (the arrows are vertical) and where $\dot y = 0$ (horizontal). They cross at equilibria and split the plane into regions with a single arrow direction each, which with the classification is enough for a rough portrait.
:::

::: example
## Classify $A = \begin{bmatrix}1 & 2\\3 & 0\end{bmatrix}$.

::: solution
1. **Trace and determinant.** $T = 1$ and
   $$\begin{aligned} D &= 0 - 6 \\ &= -6 \end{aligned}$$
   $D < 0$, so it's a saddle.
2. **Eigenvalues.**
   $$\lambda = \frac{1 \pm \sqrt{1 + 24}}{2}$$
   which gives 3 and $-2$.

**Answer:** a saddle, with eigenvalues 3 and −2.
:::
:::

::: example
## A series RLC with $L$ = 1 mH and $C$ = 1 µF gets a negative resistance of $-10\,\Omega$. How fast does an oscillation grow?

::: solution
1. **Trace and determinant.**
   $$\begin{aligned} T &= -R/L \\ &= +10^4\ \text{s}^{-1} \\ D &= \frac{1}{LC} \\ &= 10^9\ \text{s}^{-2} \end{aligned}$$
2. **Classify.** $T^2 < 4D$: an unstable spiral.
3. **Growth rate.** The real part of the eigenvalues is $T/2 = 5000$ s⁻¹, so the envelope grows as $e^{5000t}$, by a factor of $e$ every 0.2 ms.
4. **Ring frequency.**
   $$\sqrt{D - T^2/4} \approx 31\,200\ \text{rad/s}$$
   about 5 kHz.

**Answer:** the oscillation grows as $e^{5000t}$, by a factor of $e$ every 0.2 ms, while it rings at about 5 kHz.
:::
:::

::: example
## Classify $A = \begin{bmatrix}-3 & 1\\1 & -3\end{bmatrix}$.

::: solution
1. **Trace and determinant.** The trace is $-6$ and the determinant 8.
2. **Stability.** The determinant is positive and the trace negative, so it's stable.
3. **Node or spiral.** The discriminant is positive,
   $$\begin{aligned} T^2 - 4D &= 36 - 32 \\ &= 4 \end{aligned}$$
   so the eigenvalues are real, $-2$ and $-4$: a stable node.
4. **The trajectories.** Trajectories head into the origin without spiraling, coming in tangent to the slow eigenvector $(1, 1)$ once the fast mode, along $(1, -1)$, has died out.

**Answer:** a stable node, with eigenvalues −2 and −4.
:::
:::

::: check
given: a = 1 | 3; b = 2 | -1; c = 4 | 2; d = -1 | 2
answer: a*d - b*c

## What is the determinant of $\begin{bmatrix}\given{a} & \given{b}\\\given{c} & \given{d}\end{bmatrix}$? (Its sign decides whether the origin is a saddle.)

::: right
Right. $ad - bc$ = {answer}.
:::

::: misses
- [a + d] That's the trace.
- [any] Not yet. $ad - bc$.
:::
:::

::: check
given: a = -2 | -1.5 | -1 | 0.5 | 1 | 1.5 | 2
answer: -a

## For what $d$ is $\begin{bmatrix}\given{a} & 2\\-3 & d\end{bmatrix}$ a center?

::: right
Right. A center needs $T = 0$, so $d = -a$ = {answer}; then $D = -a^2 + 6 > 0$.
:::

::: misses
- [a] The trace $a + d$ must be zero.
- [any] Not yet. Set the trace to zero, then check $D > 0$.
:::
:::

::: check
given: T = 1 | -2; D = -6 | -3
answer: (T + sqrt(T^2 - 4*D))/2
tolerance: 0.5%

## A saddle has trace {T} and determinant {D}. What is its positive (unstable) eigenvalue?

::: right
Right. $\frac{T + \sqrt{T^2 - 4D}}{2}$ = {answer}.
:::

::: misses
- [(T - sqrt(T^2 - 4*D))/2] That's the negative one.
- [any] Not yet. Use the quadratic formula.
:::
:::

::: check
given: T = -2 | -1; D = 5 | 10
answer: sqrt(D - T^2/4)
tolerance: 0.5%

## A spiral has trace {T} and determinant {D}. At what angular frequency do trajectories wind around?

::: right
Right. The imaginary part, $\sqrt{D - T^2/4}$ = {answer}.
:::

::: misses
- [sqrt(D)] That ignores the damping's effect.
- [any] Not yet. The imaginary part of $\frac{T \pm \sqrt{T^2 - 4D}}{2}$.
:::
:::

::: check
given: R = 5 | 20; L = 1 | 10
answer: 2*L*1e-3/R*1000
unit: ms
tolerance: 0.5%

## An LC tank with $L$ = {L} mH gets a negative resistance of $-\given{R}\,\Omega$ in series. What is the time constant of its growing envelope?

::: right
Right. The real part is $\frac{T}{2} = \frac{R}{2L}$, so the envelope grows with time constant $\frac{2L}{R}$ = {answer}.
:::

::: misses
- [L*1e-3/R*1000] The real part is half the trace: $\frac{R}{2L}$.
- [any] Not yet. Real part of the eigenvalues, $T/2$.
:::
:::

::: check
kind: choice

## $T = -3$ and $D = 2$. What is the origin?

- [x] A stable node
- [ ] A stable spiral
- [ ] A saddle
- [ ] An unstable node

::: right
Right. $D > 0$ and $T^2 = 9 > 4D = 8$: real eigenvalues ($-1$ and $-2$), both negative.
:::

::: misses
- [2] $T^2 > 4D$ means real eigenvalues: no winding.
- [3] $D > 0$: both eigenvalues have the same sign.
- [4] $T < 0$: stable.
- [any] Check $D$, then $T^2 - 4D$, then the sign of $T$.
:::
:::

::: check
kind: parts
given: a = 2 | 3 | 5; b = 1 | 4

## Classify $A = \begin{bmatrix}-\given{a} & \given{b}\\\given{b} & -\given{a}\end{bmatrix}$.

::: part
answer: a^2 - b^2
tolerance: 0.5%

### What is $\det A$?

::: misses
- [a^2 + b^2] The off-diagonal product is subtracted.
- [any] $(-a)(-a) - b^2$.
:::
:::

::: part
answer: -a + b
tolerance: 0.5%

### What is its larger eigenvalue?

::: misses
- [any] The eigenvalues are $-a \pm b$; when it's positive, the origin is a saddle.
:::
:::
:::

::: check
kind: derivation
vars: T = -4..4, D = -4..4

## A 2 × 2 matrix has trace $T$ and determinant $D$.

::: step
answer: T^2 - 4*D

### What is the discriminant of $\lambda^2 - T\lambda + D$?
:::

::: step
answer: T/2

### When the eigenvalues are complex, what is their real part?
:::

::: right
Right. The sign of $T^2 - 4D$ separates spirals from nodes, and the sign of $T$ separates stable from unstable.
:::
:::

::: explain
## Why is a 2 × 2 linear system stable exactly when its trace is negative and its determinant positive?

::: model
The trace is the sum of the eigenvalues and the determinant their product. If both eigenvalues are real and negative, their sum is negative and their product positive. If they're a complex pair $\sigma \pm j\omega$, the product $\sigma^2 + \omega^2$ is always positive and the sum $2\sigma$ is negative exactly when they decay. Conversely, a positive determinant means real eigenvalues share a sign (or are complex), and a negative trace then makes that sign, or the real part, negative. So both conditions together are the same as every eigenvalue having a negative real part.
:::
:::

::: practice

::: check
given: a = -1 | 2; d = -3 | 1
answer: a + d

## What is the trace of $\begin{bmatrix}\given{a} & 5\\-2 & \given{d}\end{bmatrix}$?

::: misses
- [any] $a + d$.
:::
:::

::: check
given: T = -4 | -6; D = 2 | 3
answer: (T - sqrt(T^2 - 4*D))/2
tolerance: 0.5%

## A stable node has $T$ = {T} and $D$ = {D}. What is its faster eigenvalue?

::: misses
- [(T + sqrt(T^2 - 4*D))/2] That's the slower one.
- [any] The more negative root.
:::
:::

::: check
given: D = 4 | 9 | 16 | 25 | 36 | 49 | 64
answer: sqrt(D)
tolerance: 0.5%

## A center has determinant {D}. At what angular frequency do its orbits go around?

::: misses
- [D] Take the square root.
- [any] Eigenvalues $\pm j\sqrt{D}$.
:::
:::
:::
