Sub topic 1
What Makes a Circuit Linear
Superposition works only in linear circuits, so you need to be able to recognize one before you use the method. This chapter defines linearity, shows which elements have it, and gives you a quick way to test for it.
Prerequisites
This chapter assumes you know:
- Ohm's law.
- Kirchhoff's current and voltage laws.
- Series and parallel resistor combinations.
- Voltage and current dividers.
- The basic idea of ideal voltage and current sources.
You don't need any calculus beyond reading the equation for a capacitor or inductor.
Linearity means two properties
A circuit is linear when the relation between its inputs and any output follows two rules. Write the input as x (a source value) and the output as y (a voltage or current you want).
- Homogeneity (scaling): if input x gives output y, then input k·x gives output k·y for any constant k.
- Additivity: if x₁ gives y₁ and x₂ gives y₂, then x₁ + x₂ gives y₁ + y₂.
Together these are one rule: f(a·x₁ + b·x₂) = a·f(x₁) + b·f(x₂). Superposition is this rule applied to circuits. Each independent source is an input, so the total response is the sum of the responses to each source alone.
The relation must also pass through zero. A circuit with no source gives zero output. A straight line with an offset, such as y = 2x + 3, is not linear in this sense.
Which elements are linear
An element is linear when its voltage-current relation satisfies both rules. The circuit is linear when all its elements are linear and all its sources are either independent or dependent in a linear way.
| Element | Relation | Linear? |
|---|---|---|
| Resistor | v = i·R | Yes |
| Capacitor | i = C·dv/dt | Yes |
| Inductor | v = L·di/dt | Yes |
| Dependent source | output = constant × one circuit voltage or current | Yes |
| Diode | i = Iₛ(e^(v/Vₜ) − 1) | No |
| Any element, power | p = v²/R | No |
Power appears in the table because it is a quadratic function of voltage or current. A circuit can be linear while the power in it is not. Chapter 8 covers that limit in detail.
Testing linearity numerically
You can test the two rules directly. This script checks a resistive divider (4 Ω over 6 Ω) and a diode.
import math
def divider(v_in, r1=4.0, r2=6.0):
"""Voltage across r2 for a source v_in feeding r1 in series."""
return v_in * r2 / (r1 + r2)
def diode_current(v, i_s=1e-12, v_t=0.025):
"""Ideal diode equation."""
return i_s * (math.exp(v / v_t) - 1)
def is_homogeneous(f, x, k):
return math.isclose(f(k * x), k * f(x), rel_tol=1e-9)
def is_additive(f, x1, x2):
return math.isclose(f(x1 + x2), f(x1) + f(x2), rel_tol=1e-9)
print("divider:", is_homogeneous(divider, 12.0, 2.0), is_additive(divider, 3.0, 5.0))
print("diode: ", is_homogeneous(diode_current, 0.5, 2.0), is_additive(diode_current, 0.5, 0.5))The divider prints True True. The diode prints False False: doubling the voltage multiplies the current by far more than two, because of the exponential.
Common errors
- Calling a circuit nonlinear because it has a constant source. The DC source is the input. Output is still proportional to it. The circuit is linear.
- Treating dependent sources as nonlinear. A source such as 2·Vx is linear. A source such as Vx² is not.
- Mixing up "linear" with "straight-line graph". A straight line that does not pass through the origin fails homogeneity when you scale both the source and the offset. In a circuit, offsets come from sources, so treat each source as a separate input.
- Assuming real parts stay linear. A resistor that heats up and changes value, or an amplifier that clips, is only linear within a limited range. Check that your operating range stays inside it.
Why this matters next
Because the output is a linear function of the inputs, you can analyze each independent source alone and add the results. The next chapters show how to switch sources off correctly and combine the partial answers.
Exercise
A circuit has one 10 V source and resistors only. The voltage across one resistor is 4 V. The source is changed to 25 V. What is the new voltage across that resistor, and which property of linearity gives your answer?
Show answer
10 V. The source scales by 25/10 = 2.5, so the output scales by the same factor: 4 V × 2.5 = 10 V. This is homogeneity.
Exercise
A diode has current i = Iₛ(e^(v/Vₜ) − 1). Explain in one sentence why a circuit containing it is not linear, using the additivity rule.
Show answer
The current for v₁ + v₂ is not the sum of the currents for v₁ and v₂ separately, because the exponential of a sum is a product of exponentials, so additivity fails.