# Discontinuous Linear Functions?!

We know what linear functions are. A function _f_ is linear iff it satisfies _additivity_ $f(x + y) = f(x) + f(y)$ and _homogeneity_ $f(ax) = af(x)$.

We know what continuity is. A function _f_ is continuous iff for all ε there exists a δ such that if $|x - x_0|$ < δ, then $|f(x) - f(x_0)|$ < ε.

An equivalent way to think about continuity is the sequence criterion: _f_ is continuous iff a sequence $(x_k)$ converging to $x$ implies that $(f(x_k))$ converges to $f(x)$. That is to say, if for all ε there exists an _N_ such that if _k_ ≥ _N_, then $|x_k - x|$ < ε, then for all ε, there also exists an _M_ such that if _k_ ≥ _M_, then $|f(x_k) - f(x)|$ < ε.

Sometimes people talk about discontinuous linear functions. You might think: that's crazy. I've seen many linear functions in my time, and they were definitely all continuous. _f_(_x_): ℝ → ℝ := _ax_ is continuous for any _a_ ∈ ℝ. _T_(**x⃗**): ℝ² → ℝ² := $\begin{pmatrix} a & b \\ c & d \end{pmatrix} \boldsymbol{\vec{x}}$ is continuous no matter what the entries in the matrix are. Stop being crazy!!

Actually, it's not crazy. It's just that all the discontinuous linear functions live in infinite-dimensional spaces.

Take, say, the space $C^1([a,b])$ of continuously differentiable functions from a closed interval [a,b] to ℝ, with the uniform norm. (The uniform norm means that the "size" of a function for the purposes of continuity is the least upper bound of its absolute value.) If you think of a vector in the _n_-dimensional $\mathbb{R}^n$  as a function from {1...n} to ℝ, then you can see why a function from a continuous (not even countable) domain would be infinite-dimensional.

Consider the sequence of functions $(f_k) = (\frac{\sin kx}{k})_{k=1}^{\infty}$ in $C^1([a,b])$. The sequence converges to the zero function: for any ε, we can take $N := \lceil \frac{1}{\varepsilon} \rceil$ and then $\frac{\sin kx}{k} \le \frac{1}{\lceil \frac{1}{\varepsilon} \rceil} \le \frac{1}{\frac{1}{\varepsilon}} = \varepsilon$.

Now consider that the sequence of derivatives is $(\frac{k \cos kx}{k})_{k=1}^{\infty} = (\cos kx)_{k=1}^{\infty}$, which doesn't converge. But the function D: $C^1([a,b]) \rightarrow $C^0([a,b])$ that maps a function to its derivative is linear. (We have additivity because the derivative of a sum is the sum of the derivatives, and we have homogeneity because you can "pull out" a constant factor from the derivative.)

By exhibiting a function _D_ and a sequence $(f_k)$ for which $(f_k)$ converges but $(D(f_k))$ doesn't, we have shown that the derivative mapping _D_ is a discontinuous linear function, because the sequence criterion for continuity is not satisfied. If you know the definitions and can work with the definitions, it's not crazy to believe in such a thing!

The infinite-dimensionality is key to grasping the ultimate sanity of what would initially have appeared crazy. One way to think about continuity is that a small change in the input can't correspond to an arbitrarily large change in the output.

Consider a linear transformation $T$ on a finite-dimensional vector space; for simplicity of illustration, suppose it's diagonalizable with eigenbasis $\{\vec{u}_j\}$ and eigenvalues $\{\lambda_j\}$. Then for input $\vec{x} = \sum_j c_j \vec{u}_j$, we have $T(\vec{x}) = \sum_j c_j \lambda_j \vec{u}_j$: the eigencoördinates of the input get multiplied by the eigenvalues, so the amount that the transformation "stretches" the input is bounded by $\max_j |\lambda_j|$. The linearity buys us the "no arbitrarily large change in the output" property which is continuity.

In infinite dimensions, linearity doesn't buy that. Consider the function $T(x_1, x_2, x_3, ...) = (x_1, 2x_2, 3x_3, ...)$ on sequences with finitely many nonzero elements, under the uniform norm. The effect of the transformation on any given dimension is linear and bounded, but there's always another dimension that's getting stretched more. A small change in the input can result in an arbitrarily large change in the output, by making the change sufficiently far in the sequence (where the input is getting stretched more and more).

_(Thanks to Jeffrey Liang and Gurkenglas for corrections to the original version of this post.)_