# On sort-of-linear functions

## Background

A function $f: \mathbb{R}^n \rightarrow \mathbb{R} \$ is linear if it satisfies $$(1)\;\; f(x+y) = f(x) + f(y) \ , \ and$$ $$(2)\;\; f(\alpha x) = \alpha f(x)$$ for all $x,y \in \mathbb{R}^n$ and all $\alpha \in \mathbb{R}$.

A function satisfying only (2) is not necessarily linear. For example* $f: \mathbb{R}^2 \rightarrow \mathbb{R} \$ defined by $f(x) = |x| \$ (where $|x| \$ is the $L^2$ norm) satisfies (2) but is not linear. However, a function satisfying (1) does satisfy a weaker version of (2), namely $$(2b)\;\; f(ax)=af(x)$$ for all $a \in \mathbb{Q}$.

*Edit: As pointed out in the comments this example doesn't quite work since |ax|=|a||x|.

When $f$ is continuous it's relatively straight-forward to show that under the extra hypothesis that $f$ is continuous, (2b) implies (2). I want to say that continuity is a necessary condition for (1) to imply (2), or at least (worst) there is some extra hypothesis required (possibly weaker than continuity), but I'm not sure how to show it.

My question is therefore two-fold:

-Is continuity a necessary condition for (1) to imply (2) and how could I go about proving it. -What are some examples (if there are any) of a function satisfying (1) but not (2)

This can be stated in a slightly more general context as follows: Suppose $V\$ is a vector space over $\mathbb{R}\$ and $f: V \rightarrow \mathbb{R}\$ satisfies $$(1') \;\; f(x+y) = f(x)+f(y)$$ for all $x,y \in V$.

Under what conditions is $f\$ a vector space homomorphism?

The reason I believe continuity is necessary is because of the similarity to the fact that $x^{\alpha} x^{\beta} = x^{\alpha + \beta}$ for all $\alpha,\beta \in \mathbb{R}$. Irrational powers can be defined either via continuity (i.e. if $\alpha \$ is irrational, then $x^{\alpha}:= \lim_{q\rightarrow \alpha} x^q \$ where q takes on only rational values) or by using the exponential and natual log functions, and either way proving the desired identity boils down to continuity.

I have come up with one example that satisfies (something similar to) (1) and not (2), but it doesn't quite fit the bill:
$\$ Define $\phi : \mathbb{Q}(\sqrt{2}) \rightarrow \mathbb{Q} \$ defined by $\phi(a+b\sqrt{2}) = a+b$. Then $\phi(x+y) = \phi(x)+\phi(y) \$ but if $\alpha=c+d\sqrt{2} \$ then $\phi(\alpha(a+b\sqrt{2})) = ac+2bd + ad+bc \neq \alpha \ \phi(a+b\sqrt{2})$. $\$ The problem is that even though $\mathbb{Q}(\sqrt{2}) \$ is a vector space over $\mathbb{Q}$, the $\alpha \$ is coming from $\mathbb{Q}(\sqrt{2}) \$ instead of the base field $\mathbb{Q}$.

-
Your example $f(x)=|x|$ does not work: $f(-x)\ne-|x|$. An example: For $x\in{\mathbb R}^2$, let $f(x)=5x$ unless $x$ is on the $y$-axis, in which case $f(x)=0$. –  Andres Caicedo Jan 2 '11 at 23:23
By the way: functions satisfying (1) are said to be "additive", or satify "additivity." Functions satisfying (2) are said to be "homogeneous" (or "real-homogeneous"), or to satisfy "homogeneity"; additivity implies $\mathbb{Q}$-homegeneity, as you note. –  Arturo Magidin Jan 2 '11 at 23:37
It is actually impossible to give an explicit example of an $f$ satisfying (1) and not (2), as their existence depends on the axiom of choice. This means there are natural models of set theory (where one can carry out classical analysis without any issues) where such functions do not exist. Any example will therefore depend essentially on something non-constructive (such as a Hamel basis, or a well-ordering of ${\mathbb R}). – Andres Caicedo Jan 3 '11 at 0:26 ## 2 Answers It is not true that$|ax|=a|x|$; the correct identity is$|ax|=|a||x|$. Whether or not adding the hypothesis of continuity is necessary for additive functions to be linear depends on the axiom of choice. Using a Hamel basis$B$for$\mathbb{R}^n$over$\mathbb{Q}$together with one of its countable subsets$A=\{x_1,x_2,\ldots\}$, you can construct a discontinuous$\mathbb{Q}$linear map from$\mathbb{R}^n$to$\mathbb{R}$by taking the unique$\mathbb{Q}$linear extension of the function$f:B\to\mathbb{R}$such that$f(x_k)=k|x_k|$and$f(B\setminus A)=\{0\}$. Since$\mathbb{R}$linear maps between finite dimensional real vector spaces are continuous, such a map cannot be linear. However, it is consistent with ZF that all additive functions from$\mathbb{R}^n$to$\mathbb{R}$are continuous (I am however not knowledgeable in the set theoretic background needed to show this). - Note that the example I gave is convoluted; I was thinking of one of the ways to construct a discontinuous linear function on an infinite-dimensional normed space. Here you can get away with much less work, because rational multiples of any basis element are dense in$\mathbb{R}$. So if you take any$x_1\neq x_2$in$B$, and any$f:B\to \mathbb{R}$such that$f(x_2)\neq \frac{x_2}{x_1}f(x_1)$, you have your discontinuous (and obviously not real linear, by construction) additive function. – Jonas Meyer Feb 21 '11 at 15:14 A particular (less convoluted) example is also given at the duplicate: math.stackexchange.com/questions/23069/… – Jonas Meyer Feb 21 '11 at 15:51 (When I wrote "rational multiples of any basis element are dense in$\mathbb{R}$" I was confusing the particulars with the other question. Nonetheless, much less convoluted descriptions of what to do on$B$are possible.) – Jonas Meyer Feb 21 '11 at 19:25 Yes, continuity is necessary. In one variable the counterexamples are known as pathological solutions to Cauchy's functional equation. They require the axiom of choice to construct: given the axiom of choice, we can pick a basis for$\mathbb{R}$as a vector space over$\mathbb{Q}$, and any function$f : \mathbb{R} \to \mathbb{R}$which is only required to be$\mathbb{Q}\$-linear can be specified by arbitrarily specifying its behavior on this basis.

Pathological solutions are very strange (for example their graph is dense in the plane) and can be ruled out by almost any "niceness" hypothesis, as described in the wiki article.

-
I accidentally overlapped with your answer, but hopefully it is complementary rather than just redundant. –  Jonas Meyer Jan 2 '11 at 23:31