From: Zack M. Davis Date: Sat, 14 Jun 2025 04:10:37 +0000 (-0700) Subject: check in "Discontinuous Linear Functions" X-Git-Url: https://zackmdavis.net/blog/source?a=commitdiff_plain;h=3647933cc902ae6c8fb17b7e2a075064e71e9c96;p=An_Algorithmic_Lucidity.git check in "Discontinuous Linear Functions" This was actually published on the 5th, and I need to change it because commenters caught some errors. --- diff --git a/discontinuous_linear_functions.md b/discontinuous_linear_functions.md new file mode 100644 index 0000000..37aec39 --- /dev/null +++ b/discontinuous_linear_functions.md @@ -0,0 +1,25 @@ +## 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{v}}$ 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 C1(ℝ) of continuously differentiable functions ℝ → ℝ 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 ℝ_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 C1(ℝ). The sequence converges to the zero function: for any ε, we can take $k := \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: C1(ℝ) → C0(ℝ) 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 function not having any "jumps" implies that it can't have an "infinitely steep" slope: 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 {**u⃗**_j_} and eigenvalues {λ_j_}. Then for input **x⃗** = Σ_j_ _c__j_**u⃗**_j_, we have _T_(**x⃗**) = Σ_j_ _c__j_λ_j_**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_ |λ_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, 2x2, 3x3, ...) on sequences 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).