Essay · Applied Mathematics
Half of linear is free
School gave me two conditions for a function to be linear. It has to add, f(x+y)=f(x)+f(y), and it has to scale, f(ax)=a\,f(x). I wrote both down again in the essay on a million unknowns and used the second without a thought. Then I noticed something. Put y=x into the first condition and you get f(2x)=2f(x). That is the second condition, for a=2, derived from the first. If it works for 2 it works for 3. If it works for whole numbers it should work for fractions. And if it works for every fraction, perhaps the second condition was never needed, and linear means additive, full stop.
That is almost right, and the distance between almost and right is this essay. Additivity buys homogeneity for every fraction, by counting, with no limit taken anywhere. It does not buy it for \sqrt2. What buys it for \sqrt2 is not algebra at all. It is continuity, or any of a dozen weaker promises that the function is not wild, and once you have that, one condition is enough. The textbook’s second condition is half a condition, and the half it covers is the place where algebra stops and analysis starts.
I care because every linearity I use in the thruster is checked by adding. Double the beam current at fixed voltage and the thrust doubles. Two grid apertures make a field that is the sum of the field of each. I never test the scaling condition on its own, and nobody does. I measure at one unit, two units, three, half a unit, and I believe the line between the marks. The question is what that belief rests on.
What linearity is for
Before the gap, the reason anyone wants the property at all. Linearity is the licence to cut a problem into pieces, solve each piece on its own, and add the answers. If f is linear and the input is a sum, f(x_1+x_2+\dots)=f(x_1)+f(x_2)+\dots, so a hard input can be handled as a pile of easy ones. Every method I know that handles something complicated in one pass is this sentence in disguise, and it is called superposition.
The cleanest case is a circuit. Resistors, capacitors and inductors are linear elements: V=IR, I=C\,dV/dt, V=L\,dI/dt are all straight lines through the origin, and Kirchhoff’s laws are sums. So a circuit with several sources can be solved one source at a time. Keep one source, replace every other voltage source by a wire and every other current source by a gap, solve the simple circuit that is left, and move to the next source. The real currents are the sums of the one-source currents. Take two batteries, 12 volts and 6 volts, each feeding one end of a chain of three equal resistors of 1 kilohm, with the middle node tied to ground through the third resistor. With the 6 volt battery shorted, the middle node sits at 12\times\tfrac{0.5}{1.5}=4 volts. With the 12 volt battery shorted, it sits at 6\times\tfrac{0.5}{1.5}=2 volts. The node with both batteries live is at 4+2=6 volts, which is what you get solving the whole thing at once, and the one-at-a-time route only ever asks you to split a voltage across two resistors. Put a diode in the chain and the method dies on the spot, because a diode is not a line through the origin. The question of which functions are linear is the question of which circuits can be solved this way.
The same licence runs through most of physics and engineering:
- Fields add. The field at any point in the thruster’s grid gap is the sum of the fields of each aperture and each ion, computed separately. Coulomb’s law is linear in the charge, so I never solve for the whole grid, only for one hole, and add.
- Signals are sums of sines. Fourier’s idea: any signal is a sum of sine waves, and a linear filter, amplifier or cable treats each sine on its own, changing only its size and phase. So the response to the whole signal is the sum of the responses to its sines, and each of those is a single number. Every audio equaliser, every radio and every MRI scanner is this.
- Responses add in time. Hit a linear system with a sharp kick and record what it does. Any input is a train of kicks, so the output is the sum of the shifted recordings, the convolution. This is how a bridge’s response to traffic, a room’s echo and a transistor amplifier’s distortion-free range are all computed.
- Loads add. A beam under a truck, a wind load and its own weight deflects by the sum of the three deflections, each solved alone. Engineers tabulate the deflection for one unit load at each position and build everything else by adding.
- Tides add. The tide at a port is a sum of a dozen or so sine waves with known periods, from the Moon, the Sun and their geometry. Kelvin built a machine of pulleys in 1872 that summed ten of them and drew a year of tides in a few hours, because adding was all the physics needed.
- A million unknowns. The essay on simultaneous equations only works because the equations are linear. The solvers in it, direct and iterative, are superposition made into an algorithm.
So the two conditions in the textbook are not a formality. They are the permit for every one of those methods, and the question of this essay, whether the second condition is really a separate thing, is the question of what the permit actually requires.
The ladder
Keep only the first condition and see how far it goes.
Additive. A function f is additive if f(x+y)=f(x)+f(y) for every x and y. Nothing is assumed about limits, smoothness or size. The equation is called Cauchy’s functional equation, after the man who first asked what its solutions were, in 1821.
Put x=y=0: f(0)=2f(0), so f(0)=0. Put y=x: f(2x)=2f(x). Put y=2x: f(3x)=3f(x). By induction f(nx)=n\,f(x) for every whole number n. Put y=-x: f(x)+f(-x)=f(0)=0, so f(-x)=-f(x), and the whole numbers become the integers. Now fractions. Write x as n copies of x/n. Then f(x)=f(n\cdot x/n)=n\,f(x/n), so f(x/n)=f(x)/n. Put the two steps together:
f\!\left(\frac mn\,x\right)=\frac mn\,f(x)
for every integer m and every nonzero integer n. That is the second condition, for every rational scalar, and it used nothing but the first condition applied a finite number of times. A function that adds is linear over the rationals. It cannot help it.
The figure shows how much that is and how little. Fix f(1) and every fraction’s value is forced. Raise the denominator and the rungs crowd together until the eye draws a line through them. But the rationals are countable, and a countable set of points has zero length, so however many rungs you draw they pin a set of measure zero and leave almost every point of the axis free. In particular they say nothing about f(\sqrt2). You cannot reach \sqrt2 by adding, subtracting and dividing ones, so no finite use of the equation ever mentions it. The ladder has rungs arbitrarily close to \sqrt2 on both sides, and nothing at \sqrt2 itself.
Where the ladder does not reach
Could the free points hide a surprise? For eighty years after Cauchy nobody could build an additive function that was not a straight line, and nobody could prove there was none. Georg Hamel did it in 1905, with a tool that went on to become the standard tool of linear algebra.
Hamel basis. A set B of real numbers such that every real number is, in exactly one way, a finite sum of rational multiples of members of B. It is a basis for the real numbers regarded as a vector space over the rationals. Its existence needs the axiom of choice, and nobody has written one down or ever will. It can be arranged to contain both 1 and \sqrt2, because no rational combination a+b\sqrt2 is zero unless a and b both are.
With a basis in hand, additive functions are easy to make. Choose f freely on each basis member. Then for any x, write it in the basis, x=q_1b_1+\dots+q_kb_k with rational q_i, and set f(x)=q_1f(b_1)+\dots+q_kf(b_k). This is additive, because the expansion of x+y is the sum of the two expansions. It is homogeneous for rational scalars, by the ladder. And it is linear over the reals only if the free choices on the basis happen to lie on one line, which nothing forces. Take f(1)=1 and f(\sqrt2)=0. Then f(1+\sqrt2)=1, f(3-2\sqrt2)=3, and f(\sqrt2\cdot1)=0, where a linear function would give \sqrt2\,f(1)=\sqrt2. Additive, and not linear.
The figure draws the part of this function that lives on numbers of the form a+b\sqrt2 with a and b rational, which is the part that depends only on the two choices f(1) and f(\sqrt2). The rest of the function depends on choices at the other basis members, uncountably many of them, and looks the same.
What the figure shows at a high denominator is the real surprise. The graph of a nonlinear additive function is not a line with a few strays. It fills the plane. Every disc, however small, around every point of the plane contains points of the graph. The proof is two lines. The graph contains (1,1) and (\sqrt2,0), those two vectors are not parallel, and rational combinations of two non-parallel vectors come within any distance of any point. So the function is unbounded on every interval, not monotone on any interval, and not measurable in the sense that would let you integrate it. It is as far from a line as a function can be, and it satisfies Cauchy’s equation at every pair of points.
So my hypothesis fails. Additivity alone does not make a function linear over the reals, and the failure is not a small bend at the irrationals. It is a function the eye cannot draw.
What continuity buys
Cauchy had already shown, in 1821, what closes the gap. If an additive function is also continuous, it is linear. The proof is the ladder plus one limit. Take any real \alpha and a sequence of rationals q_n that approaches it. The ladder gives f(q_nx)=q_nf(x) for every n. Continuity lets you pass to the limit on the left:
f(\alpha x)=\lim_{n\to\infty}f(q_nx)=\lim_{n\to\infty}q_nf(x)=\alpha\,f(x).
The rationals are dense in the reals, meaning every real has rationals arbitrarily close to it. Continuity is the promise that the function’s value at a point is the limit of its values nearby. Put the two together and the rungs carry their values across the gaps between them.
The interesting question is how little continuity is enough, and the answer is: almost none. Gaston Darboux showed in 1875 that continuity at a single point suffices. The reason is a one-line shift. Additivity gives f(x+h)-f(x)=f(h), and the right side does not depend on x, so the function’s behaviour near any point is a copy of its behaviour near zero. Continuous at one point, continuous everywhere, and Cauchy finishes. Darboux then showed that you do not need continuity at all. It is enough that the function is bounded on some interval, however short, or bounded on one side, or monotone on some interval. Each of these rules out the plane-filling graph, and once that is ruled out, the function is a line. Fréchet in 1913 showed that measurability suffices, and Ostrowski in 1929 that being bounded on any set of positive length does.
What forces an additive function to be linear. Any one of: continuity at one point; a bound, above or below, on one interval; monotone on one interval; measurable; bounded on a set of positive measure. Each is a different way of saying the function is not wild. None of them is algebra.
That list is the honest version of the textbook’s second condition. Homogeneity over the reals is not an independent fact about the function that you check separately. It is the statement that the function is tame enough for the rungs to determine the gaps.
Why nothing I measure can be Hamel’s function
Back to the thruster. At fixed grid voltage, thrust is additive in beam current, and I know, without any theory, that the thrust is below one newton for every current below one ampere. That is a bound on an interval. Darboux says that an additive function bounded on an interval is linear. So thrust is proportional to current at every current, including the ones I never set, including \sqrt2 milliamps, which no dial can be set to. The same goes for every superposition in the machine. The scaling condition I never checked was never a separate fact. It followed from adding and from a bound, and every quantity an instrument records comes with a bound.
Hamel’s function could not be recorded by any instrument. It exceeds every bound between any two settings of the dial, however close. It is not measurable, which means there is no sense in which it has an average over any interval, and a meter reads averages. And it needs the axiom of choice to exist at all. In 1970 Robert Solovay built a model of set theory, without that axiom, in which every set of real numbers is measurable. In that model every additive function is linear and no Hamel basis exists. The counterexample to my hypothesis is a theorem about which axioms you take, not about any function a meter could see.
So the hypothesis stands corrected and stands. Additive is linear for every fraction, by counting. Additive is linear for every real, given any bound at all. Additive is not linear only for functions that cannot be written down, cannot be integrated, and vanish from mathematics when one axiom is dropped. The textbook’s second condition is a promise that the function is not one of those. For anything physical the promise is kept automatically.
Linear over what
Linear is never just linear. It is linear over a field of scalars, and the same function can be linear over one field and not another. Hamel’s function is linear over the rationals and not over the reals. Complex conjugation, z\mapsto\bar z, is additive and scales correctly for every real number, so it is linear over the reals. But \overline{iz}=-i\bar z, not i\bar z, so it is not linear over the complex numbers.
That last example is not a curiosity. Wigner showed in 1931 that every symmetry of a quantum system is represented by an operator that is either linear or antilinear, meaning additive and homogeneous only up to conjugating the scalar. Time reversal is antilinear. It is the same split as rationals against reals, one floor up: additivity is the same in both cases, and the field you are allowed to scale by is what differs.
The same gap in the exponential
Cauchy asked about four equations, not one. f(x+y)=f(x)f(y) has the solutions e^{ax}; f(xy)=f(x)+f(y) has a\log x; f(xy)=f(x)f(y) has x^a. Each is solved on the rationals by the same ladder. For the second equation it gives f(m/n)=f(1)^{m/n}, which is exactly how a^{m/n} is defined, an nth root of an mth power, and the step to a^x for real x is continuity, which is how the exponential section of the book takes it. Without continuity there are wild solutions of all four, built from Hamel’s function: e^{g(x)} with g additive and not linear satisfies the second equation and fills every strip of the plane. Four equations, one gap, one patch.
What I am keeping
- Additivity alone gives homogeneity for every rational scalar, by a finite count. Every additive function is linear over the rationals.
- It gives nothing at the irrationals. Hamel built additive functions that are not linear in 1905, from a basis of the reals over the rationals, which needs the axiom of choice. Their graphs are dense in the plane.
- Continuity at one point closes the gap, and so does a bound on one interval, or measurability. The patch is analysis, not algebra. Darboux 1875, Fréchet 1913, Ostrowski 1929.
- Anything measured is bounded on an interval. For physics the hypothesis holds: additive is linear. The second condition in the textbook is a promise that the function is not wild, and instruments keep it for free.
- Linearity is the permit to solve a problem one piece at a time and add: one source, one sine, one load, one aperture. Everything from circuit analysis to Fourier to the tide tables runs on it, and a single diode revokes it.
- Linear always means over a field. Conjugation is linear over the reals and not over the complex numbers, and time reversal in quantum mechanics is that fact.