---
title: Impedance
heading: One complex number for resistors, capacitors and inductors
eyebrow: C3 · Lesson 6 · Impedance
xp: 50
---

::: hook
Resistors, capacitors and inductors each relate voltage to current differently, but with phasors all three follow one rule: $\mathbf V = Z\mathbf I$, where the impedance Z is a complex number. Its real part resists and turns energy into heat; its imaginary part, the reactance, stores and returns energy and shifts the phase. With impedances, every DC technique from C1 (series, parallel, dividers, nodal analysis, Thevenin) works for AC unchanged.

::: play
- The arrows add the impedances of a resistor, an inductor and a capacitor in series: R along the real axis, $jX_L$ up, $-jX_C$ down. The last arrow is their sum, Z.
- Sweep the frequency. When does Z point straight along the real axis? What's special about that frequency?
- At low frequencies, which part dominates? At high frequencies?
:::
:::

```sim plot
view: complex
range: 300
axes: R, X
slider: R = 10..300 step 10 = 100 Ω
slider: L = 1..50 step 1 = 10 mH
slider: C = 0.1..5 step 0.1 = 1 µF
slider: f = 200..5000 = 1000 Hz log
arrow: R∠0 | label: R
arrow: (2*pi*f*L*1e-3)∠90 | from: R∠0 | color: ch2 | label: jX_L
arrow: (1/(2*pi*f*C*1e-6))∠-90 | from: R + j*2*pi*f*L*1e-3 | color: ch2 | label: −jX_C
arrow: R + j*(2*pi*f*L*1e-3 - 1/(2*pi*f*C*1e-6)) | color: ch3 | label: Z
readout: |Z| = abs(R + j*(2*pi*f*L*1e-3 - 1/(2*pi*f*C*1e-6))) Ω
readout: angle = arg(R + j*(2*pi*f*L*1e-3 - 1/(2*pi*f*C*1e-6)))*180/pi °
```

::: predict
## A 100 Ω resistor is in series with a capacitor whose reactance is 100 Ω. What is the size of their total impedance?

- [ ] 200 Ω
- [x] About 141 Ω
- [ ] 100 Ω
- [ ] 0 Ω

::: reveal
About 141 Ω. The impedances add as complex numbers, $100 - j100$, and they point at right angles, so the magnitude is $\sqrt{100^2 + 100^2} = 141$ Ω, at −45°. Adding magnitudes (200 Ω) would only be right for impedances pointing the same way.
:::
:::

::: nameit
## Impedance

**Definition.** For a part or network driven by sinusoids at one frequency, the ratio of the voltage phasor to the current phasor:

$$Z = \frac{\mathbf V}{\mathbf I} = R + jX \qquad |Z| = \sqrt{R^2 + X^2} \qquad \angle Z = \arctan\frac XR$$

- $R$, the **resistance**, dissipates power.
- $X$, the **reactance**, stores and returns it. $X > 0$ is **inductive** (current lags); $X < 0$ is **capacitive** (current leads).

**The three parts:**

$$Z_R = R \qquad Z_L = j\omega L \qquad Z_C = \frac{1}{j\omega C} = -\frac{j}{\omega C}$$

**Combining.** Exactly as resistors:

$$\text{series: } Z = Z_1 + Z_2 \qquad \text{parallel: } Z = \frac{Z_1Z_2}{Z_1 + Z_2}$$

using complex arithmetic (A3). In parallel it's often easier to add **admittances**, $Y = 1/Z = G + jB$.

**Ohm's law for AC.** $|\mathbf V| = |Z||\mathbf I|$ for the amplitudes, and the current's phase is the voltage's minus $\angle Z$.

**Frequency matters.** The same network has a different impedance at every frequency. In series RLC, the inductor dominates at high frequencies and the capacitor at low ones; at $\omega_0 = 1/\sqrt{LC}$ their reactances cancel and Z is just R (lesson 12).
:::

::: example
## 100 Ω is in series with an inductor whose reactance is also 100 Ω. What is the impedance in polar form?

::: solution
1. **Add in series.**
   $$Z = 100 + j100\ \Omega$$
2. **Polar form.**
   $$\begin{aligned} |Z| &= \sqrt{100^2 + 100^2} \\ &= 141\ \Omega \end{aligned}$$
   and the angle is 45°, so $Z = 141\angle 45°$ Ω.
3. **The inductor.** At 159 Hz, that's a 100 mH inductor.

**Answer:** $Z = 141\angle 45°$ Ω.
:::
:::

::: example
## 1 kΩ is in parallel with a capacitor of 1 kΩ reactance. What is the impedance?

::: solution
1. **Product over sum.**
   $$\begin{aligned} Z &= \frac{1000 \times (-j1000)}{1000 - j1000} \\ &= 707\angle{-45°}\ \Omega \end{aligned}$$
2. **Compare.** That's smaller than either, as parallel impedances are.

**Answer:** $Z = 707\angle{-45°}$ Ω.
:::
:::

::: example
## A series RLC has 100 Ω, 10 mH and 1 µF. What's its impedance at 1 kHz?

::: solution
1. **Inductive reactance.**
   $$\begin{aligned} X_L &= 2\pi \times 1000 \times 0.01 \\ &= 62.8\ \Omega \end{aligned}$$
2. **Capacitive reactance.**
   $$\begin{aligned} X_C &= \frac{1}{2\pi \times 1000 \times 10^{-6}} \\ &= 159.2\ \Omega \end{aligned}$$
3. **Add the impedances.** The reactances subtract:
   $$\begin{aligned} Z &= 100 + j(62.8 - 159.2) \\ &= 100 - j96.3\ \Omega \\ &= 138.8\angle{-43.9°}\ \Omega \end{aligned}$$
4. **What it means.** Below resonance the capacitor wins and the circuit looks capacitive.
5. **At resonance.** At about 1.59 kHz the reactances cancel and the impedance falls to the 100 Ω alone.

**Answer:** $Z = 100 - j96.3$ Ω, or $138.8\angle{-43.9°}$ Ω.
:::
:::

::: check
given: R = 100 | 300 | 470; X = 200 | 500 | 1000
answer: sqrt(R^2 + X^2)
unit: Ω
tolerance: 0.5%

## A {R} Ω resistor is in series with a capacitor of {X} Ω reactance. What is the magnitude of their impedance?

::: right
Right. $\sqrt{R^2 + X^2}$ = {answer}.
:::

::: misses
- [R + X] They're at right angles: add as complex numbers.
- [abs(R - X)] The capacitor's reactance is imaginary, so it doesn't subtract from R.
- [any] Not yet. $|Z| = \sqrt{R^2 + X_C^2}$.
:::
:::

::: check
given: R = 100 | 220 | 1000; f = 100 | 1000; L = 10 | 100
answer: atan(2*pi*f*L*1e-3/R)*180/pi
unit: °
tolerance: 0.5%

## A {R} Ω resistor is in series with a {L} mH inductor at {f} Hz. What is the angle of their impedance?

::: right
Right. $\arctan(\omega L/R)$ = {answer}.
:::

::: misses
- [atan(R/(2*pi*f*L*1e-3))*180/pi] It's reactance over resistance.
- [-atan(2*pi*f*L*1e-3/R)*180/pi] An inductor gives a positive angle.
- [any] Not yet. $\angle Z = \arctan(X_L/R)$.
:::
:::

::: check
given: R = 1 | 2.2 | 4.7; X = 1.5 | 3.3 | 6.8
answer: R*X/sqrt(R^2 + X^2)
unit: kΩ
tolerance: 0.5%

## A {R} kΩ resistor is in parallel with a capacitor of {X} kΩ reactance. What is the magnitude of their impedance?

::: right
Right. $|Z| = RX/\sqrt{R^2 + X^2}$ = {answer}, less than either.
:::

::: misses
- [R*X/(R + X)] That's product over sum of the magnitudes. With complex impedances: $R(-jX)/(R - jX)$.
- [sqrt(R^2 + X^2)] That's the series value.
- [any] Not yet. Compute $\frac{R \cdot (-jX)}{R - jX}$ and take its magnitude.
:::
:::

::: check
given: R = 50 | 100; L = 10 | 47; C = 1 | 2.2; f = 500 | 2000
answer: sqrt(R^2 + (2*pi*f*L*1e-3 - 1/(2*pi*f*C*1e-6))^2)
unit: Ω
tolerance: 0.5%

## A series circuit has R = {R} Ω, L = {L} mH and C = {C} µF. What is the magnitude of its impedance at {f} Hz?

::: right
Right. $\sqrt{R^2 + (\omega L - 1/\omega C)^2}$ = {answer}.
:::

::: misses
- [sqrt(R^2 + (2*pi*f*L*1e-3 + 1/(2*pi*f*C*1e-6))^2)] The reactances have opposite signs: subtract.
- [R + 2*pi*f*L*1e-3 + 1/(2*pi*f*C*1e-6)] Add as complex numbers.
- [any] Not yet. $Z = R + j(\omega L - 1/\omega C)$.
:::
:::

::: check
given: V = 5 | 10; R = 300 | 600; X = 400 | 800
answer: V/sqrt(R^2 + X^2)*1000
unit: mA
tolerance: 0.5%

## A {V} V (peak) source drives an impedance of {R} + j{X} Ω. What is the peak current?

::: right
Right. $V/|Z|$ = {answer}.
:::

::: misses
- [V/R*1000] Use the full impedance's magnitude.
- [V/(R + X)*1000] Take the magnitude $\sqrt{R^2 + X^2}$.
- [any] Not yet. $I = V/|Z|$.
:::
:::

::: check
kind: parts
given: R = 50 | 100; L = 5 | 20; C = 0.5 | 2; f = 1 | 2

## A series circuit of {R} Ω, {L} mH and {C} µF runs at {f} kHz.

::: part
answer: sqrt(R^2 + (2*pi*f*1e3*L*1e-3 - 1/(2*pi*f*1e3*C*1e-6))^2)
unit: Ω
tolerance: 0.5%

### What's the impedance magnitude?

::: misses
- [any] $\sqrt{R^2 + (X_L - X_C)^2}$.
:::
:::

::: part
answer: atan((2*pi*f*1e3*L*1e-3 - 1/(2*pi*f*1e3*C*1e-6))/R)*180/pi
unit: °
tolerance: 0.5%

### What's its angle?

::: misses
- [any] $\arctan\frac{X_L - X_C}{R}$.
:::
:::
:::

::: check
kind: derivation
vars: R = 1..10000, X = -10000..10000

## An impedance R + jX.

::: step
answer: sqrt(R^2 + X^2)

### What's its magnitude?
:::

::: step
answer: R/(R^2 + X^2)

### What's the real part of its admittance, G?
:::

::: step
answer: -X/(R^2 + X^2)

### And the imaginary part, B?
:::

::: right
Right. Inverting a complex impedance mixes its parts: a series R doesn't become a parallel 1/R.
:::
:::

::: check
kind: python

## Write `z_rlc(R, L, C, f)` returning the complex impedance of a series R, L and C at frequency f, and `polar(z)` returning `(magnitude, angle_degrees)`.

```python starter
def z_rlc(R, L, C, f):
    return complex(R, 0)

def polar(z):
    return abs(z), 0.0

print(polar(z_rlc(100, 10e-3, 1e-6, 1000)))
```

```python solution
import cmath, math

def z_rlc(R, L, C, f):
    w = 2 * math.pi * f
    return complex(R, w * L - 1 / (w * C))

def polar(z):
    return abs(z), math.degrees(cmath.phase(z))

print(polar(z_rlc(100, 10e-3, 1e-6, 1000)))
```

```python tests
import math
m, a = polar(z_rlc(100, 10e-3, 1e-6, 1000))
assert abs(m - 138.8) < 0.1 and abs(a + 43.9) < 0.1, f"At 1 kHz: 138.8 Ω at −43.9°; got {m}, {a}"
f0 = 1 / (2 * math.pi * math.sqrt(10e-3 * 1e-6))
m0, a0 = polar(z_rlc(100, 10e-3, 1e-6, f0))
assert abs(m0 - 100) < 1e-9 and abs(a0) < 1e-6, "At resonance only R is left."
```

::: right
Right. Complex arithmetic does the phasor bookkeeping for you.
:::
:::

::: explain
## Why do a resistor's and a capacitor's impedances add as complex numbers instead of simply adding?

::: model
In series they carry the same current, but their voltages peak at different times: the resistor's voltage is in step with the current, while the capacitor's lags by a quarter cycle. Two sinusoids a quarter cycle apart add like perpendicular arrows, which is what complex addition does. So the total voltage, and the impedance, has a size given by the square root of the sum of squares, with an angle between the two.
:::
:::

::: practice

::: check
given: R = 3 | 6 | 9; X = 4 | 8 | 12
answer: sqrt(R^2 + X^2)
unit: Ω
tolerance: 0.5%

## |Z| of {R} + j{X} Ω?

::: misses
- [R + X] Use $\sqrt{R^2 + X^2}$.
- [any] $\sqrt{R^2 + X^2}$.
:::
:::

::: check
given: R = 100 | 200; X = 100 | 200
answer: -atan(X/R)*180/pi
unit: °
tolerance: 0.5%

## Angle of {R} − j{X} Ω?

::: misses
- [atan(X/R)*180/pi] The reactance is negative here.
- [any] $-\arctan(X/R)$.
:::
:::

::: check
given: R = 1 | 2 | 4
answer: R/2
unit: kΩ
tolerance: 0.5%

## Two equal {R} kΩ resistors in parallel: impedance?

::: misses
- [any] Same as DC: $R/2$.
:::
:::
:::
