Linear
ElementryIf you double an input and the output doubles too, you’re onto something powerful. Linearity is one of the simplest structural properties in mathematics, and it shows up everywhere — from physics to computer graphics to machine learning.
The two rules
A function is linear if it satisfies two rules for all valid inputs , and any real number :
Rule 1 — Additivity. Applying to a sum is the same as summing the outputs:
Rule 2 — Homogeneity. Scaling the input scales the output by the same factor:
Rules (1) and (2) are usually written as a single condition:
Equation (3) says that preserves structure: it doesn’t matter whether you combine inputs before or after applying .
An example: does squaring qualify?
Let . Check both rules:
- Additivity: ✓
- Homogeneity: ✓
Now try :
- Additivity: , which is not equal to whenever . ✗
So multiplying by a constant is linear; squaring is not.
Note that a straight-line function like looks linear on a graph, but it fails Rule 1 because . A function with that shape is called affine, not linear.
Linear combinations
Equation (3) extends naturally when you have more than two terms. A linear combination of a collection of objects is any expression of the form:
where are real numbers called coefficients. Linear maps preserve linear combinations exactly:
This means you can break any input into simpler pieces, apply to each piece, and then reassemble — a trick that makes linear problems far easier to solve than non-linear ones.
Summary
- A function is linear when it satisfies additivity and homogeneity .
- Together these mean — linearity preserves structure.
- A straight line that misses the origin is affine, not linear.
- A linear combination is a sum of scaled objects; linear functions preserve linear combinations.
What’s next
Linear combinations are the building block of Finite-dimensional Vector Spaces, where you’ll see how these ideas organise into a rich algebraic structure.