If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Precalculus (Eureka Math/EngageNY)>Unit 1

Lesson 1: Topic A: Lessons 1-6: Complex numbers review

# Linearity

When you double the voltage on a resistor, the current doubles. We say a resistor is a linear device. Capacitors and inductors are linear, too. Written by Willy McAllister.

## Introduction

Linearity is a mathematical concept that has a profound impact on electronic design. The idea itself is quite simple, but the implications have great meaning for our field. First we will talk about the mathematical meaning of linear. Then we will apply the idea to electronic circuits.

### What we're building to

A function is linear in the mathematical sense if it has these properties:
Homogeneity (scaling): $f\left(ax\right)=af\left(x\right)$
Additivity: $f\left({x}_{1}+{x}_{2}\right)=f\left({x}_{1}\right)+f\left({x}_{2}\right)$
When the inputs and outputs are single numbers, a function that has the scaling property automatically has additivity as well. Resistors, capacitors, and inductors are linear because they have the scaling property.

## Linear

The term linearity refers to the property of scaling. Suppose you have two related physical properties, for example the speed you can run and the distance you can run. If you double your speed, you double the distance. If you triple your speed, you triple your distance. This is called a linear relationship. Usually the cost of something is linear. If a notebook costs $1, then ten notebooks will cost$10.
In electronics, an ideal resistor creates a linear relationship between voltage and current. If you double voltage, the current doubles, and vice versa. So we say an ideal resistor is a linear element.

## Scaling (homogeneity)

We want to write this scaling property in mathematical terms. This doubling-begets-doubling can be written as $f\left(2x\right)=2f\left(x\right)$. Similarly, tripling-begets-tripling can be written as $f\left(3x\right)=3f\left(x\right)$. And in general, the scaling property is
$f\left(ax\right)=af\left(x\right)$
The fancy mathematical word for this property is homogeneity.
A function that looks like a line through the origin has the scaling property. Let $y=f\left(x\right)=2x$.
If $x=2$, then $y=2\cdot 2=4$.
If we double $x$ from $2$ to $4$, then $y=2\cdot 4=8$.
So doubling $x$ exactly doubles $y$.
Importantly, because $f\left(x\right)$ is a straight line, the scale factor $a$ does not depend on the value of $x$.
If the function is any other shape, like $y={x}^{2}$ or $y=1/x$ or $y={e}^{x}$, the scale factor isn't the same for every $x$, it depends on $x$'s value.
For example, if $y={x}^{2}/16$,
At $x=4$, $y={4}^{2}/16=1$, so the scale factor going from $x$ to $y$ is $1/4$.
At $x=8$, $y={8}^{2}/16=4$, so the scale factor is $1/2$.
For any function that is not a straight line, scaling (amplification) is not constant, but rather depends on the input value, $x$.
This is the main reason we like to build and use linear amplifiers to make small signals bigger. Every signal is uniformly scaled up by the same amount, so the output looks like a scaled up replica of the input.

When a relationship is linear (has the scaling property), we can derive an adding property. All linear functions have the form of a line with scale factor (slope) $a$:
$f\left(x\right)=ax$
If we make the input the sum of two distinct inputs $\left({x}_{1}+{x}_{2}\right)$. Then,
$f\left({x}_{1}+{x}_{2}\right)=a\left({x}_{1}+{x}_{2}\right)\phantom{\rule{0.167em}{0ex}},$
and using the distributive property,
$f\left({x}_{1}+{x}_{2}\right)=a{x}_{1}+a{x}_{2}\phantom{\rule{0.167em}{0ex}}.$
The terms on the right side are equivalent to:
$a{x}_{1}=f\left({x}_{1}\right)\phantom{\rule{2em}{0ex}}a{x}_{2}=f\left({x}_{2}\right)$
And now we have an adding property (called additivity in math talk):
$f\left({x}_{1}+{x}_{2}\right)=f\left({x}_{1}\right)+f\left({x}_{2}\right)$
We can use this additivity property in a clever way.
Suppose we have two inputs, ${x}_{1}$ and ${x}_{2}$, and we make each of them an input to a linear function, $f\left(x\right)$. The outputs are, of course, $f\left({x}_{1}\right)$ and $f\left({x}_{2}\right)$.
If we add the inputs together, ${x}_{1}+{x}_{2}$, and put the sum into $f\left(x\right)$, by definition the output will be $f\left({x}_{1}+{x}_{2}\right)$.
Here's the clever part: If $f\left(x\right)$ happens to be a linear function, there is another way to derive the output when ${x}_{1}+{x}_{2}$ is the input. The output can also be computed from the sum of the two individual outputs, $f\left({x}_{1}\right)+f\left({x}_{2}\right)$.
The additivity property of linear functions is called superposition. It is the basis of a circuit analysis technique that goes by the same name. Superposition is put to brilliant use in the Mesh Current Method and in many other engineering areas (especially signal processing).

## Linearity of electronic components

Let's start by looking at a resistor. Mathematically, you might take the point of view that a resistor is a function that takes voltage as an input, and creates a current as an output.
We can tell if an ideal resistor is linear by testing to see if it meets the rule for scaling. We can write Ohm's Law as a function:
$i=f\left(v\right)=\frac{1}{\text{R}}\phantom{\rule{0.167em}{0ex}}v$

### Resistor scaling

If we double the voltage across the resistor, the current doubles.
If we push $4$ times as much current through the resistor, the voltage goes up by $4$ times.

If we apply $1\phantom{\rule{0.167em}{0ex}}\text{V}+3\phantom{\rule{0.167em}{0ex}}\text{V}$ to the resistor, the resulting current is either
$\frac{1\phantom{\rule{0.167em}{0ex}}\text{V}+3\phantom{\rule{0.167em}{0ex}}\text{V}}{\text{R}}=\frac{4\phantom{\rule{0.167em}{0ex}}\text{V}}{\text{R}}\phantom{\rule{1em}{0ex}}$
or
$\frac{1\phantom{\rule{0.167em}{0ex}}\text{V}}{\text{R}}+\frac{3\phantom{\rule{0.167em}{0ex}}\text{V}}{\text{R}}=\frac{4\phantom{\rule{0.167em}{0ex}}\text{V}}{\text{R}}$
A resistor has scaling (and therefore automatically has additivity).
A resistor is a linear element.
For a real-world resistor there is of course a limit to the voltage and current. If the power $\left(i\cdot v\right)$ is more than the resistor can handle, it may change resistance value as it overheats, or even burn up. So a real resistor is linear only over some range of voltage and current. But an ideal resistor works for any $i$ or $v$, so an ideal resistor is linear, period.

### Are capacitors and inductors linear?

The capacitor and inductor element laws are
$i=\text{C}\phantom{\rule{0.167em}{0ex}}\frac{dv}{dt}$
and
$v=\text{L}\phantom{\rule{0.167em}{0ex}}\frac{di}{dt}$
At first glance it might look like these are not equations of lines. But they are. They are lines if we think of the independent variable being $dv/dt$ and $di/dt$ instead of just $v$ or $i$.
$i=f\left(\frac{dv}{dt}\right)=\text{C}\phantom{\rule{0.167em}{0ex}}\frac{dv}{dt}$
and
$v=f\left(\frac{di}{dt}\right)=\text{L}\phantom{\rule{0.167em}{0ex}}\frac{di}{dt}$
The capacitor law can be graphed as a straight line with $dv/dt$ as the horizontal axis and $i$ as the vertical axis. The slope of the capacitor line is $\text{C}$.
Likewise, the inductor law can be graphed as a straight line with $di/dt$ as the horizontal axis and $v$ as the vertical axis. The slope of the inductor line is $\text{L}$.
Ideal capacitors and inductors are linear elements.
Now we have three: $\text{R L C}$.
With just these linear components we can create many interesting electronic functions.

### A diode is a non-linear device

It might help to take a second and talk something that is not a linear device, just for contrast. A diode is a non-linear semiconductor device.
We will learn a lot more about diodes later on. For now, I just want to take a look at its $i$-$v$ curve as an example of what a non-linear device looks like:
This $i$-$v$ curve is the element law for a diode. It clearly does not look like a straight line, so this is definitely not a linear device. The non-linear behavior of a diode is typical of other semiconductor devices like transistors.

## Why do we make such a big deal about linearity?

Circuit made from linear elements can be solved exactly. In fact, there is a whole branch of mathematics devoted to solving linear functions, called Linear Algebra.
Some examples of greatness: Kirchhoff's Laws work because of linearity, as do the Node Voltage Method and the Loop Current Method.

### Non-linear functions and elements

In general, functions with non-linear behavior don't have these properties. We humans have not come up with a general-purpose method to exactly solve non-linear equations/circuits.
Each new type of circuit requires mathematical techniques specific to the new circuit. The usual approach to non-linear circuits is to bend over backwards to make it seem linear over at least some small range of operation. That's what is happening when you see terms like "piecewise-linear approximation" or "small-signal model."

## Summary

A function is linear if it has these properties:
Homogeneity (scaling): $f\left(ax\right)=af\left(x\right)$
Additivity: $f\left({x}_{1}+{x}_{2}\right)=f\left({x}_{1}\right)+f\left({x}_{2}\right)$
If $x$ and $a$ are real numbers (as opposed to vectors or arrays), these properties mean the same thing, and you can test for just one of them.
Resistors, capacitors, and inductors are linear elements because they have the scaling property.

### Linearity in words

1. Scaling the input by $a$ scales the output by $a$.
2. Adding two inputs produces the same output as applying each input individually and adding the two separate outputs.

## Want to join the conversation?

• Let's analyse the equation of a line, for example y=2x+3. A line should be linear by definition. But, if I were to test it by the numbers, I would get strange results. For example, let's plug x=3 and its double, x=6 into the function. The linearity principle states that f(2x) = 2f(x). So, let's try with our linear function y=2x+3.
(1) For x=3, f(3)=2*3+3=9
(2) For x=6, f(6)=2*6+3=15
15 is not the double of 9. What am I getting wrong?
• The term 'linear' has an everyday meaning and a different meaning in mathematics. In everyday language it means "Hey, that looks like a line." In math, it means those two properties in the article (scaling and additivity). Many, but not all, lines have the mathematical property of linearity. Only those lines that pass through the origin (lines whose y-intercept is zero) are linear in the mathematical sense. This particular restriction is what gives rise to all sorts of really good properties of linear circuits.

All linear functions have the form of a line with scale factor (slope) a_:

_f(x) = ax

Could you give us a rigorous proof of this claim? By definition, a linear function has the following property:

f(ax) = af(x)

Could you show us how the statement f(ax) = af(x) implies the statement f(x) = ax ?
• I will use different variables for the given function and the linearity test.

Is f(x) = ax a linear function?

Linearity test:
f(x) is linear if f(bx) = bf(x)

Evaluate both sides of the linearity test and check to see if they are the same.

Left side: f(bx) = a (bx)
Right side: b f(x) = b (ax)

abx = bax

The linearity test passes, so f(x) = ax is a linear function.