Let M be a topological space. Define an averaging function as a continuous map f:M×M→M which satisfies f(a,b)=f(b,a) for all a,b∈M and f(a,a)=a for all a∈M.
These seem like reasonable properties for a function which deserves the name “average” to have, since they are enjoyed by the usual averaging functions on Rn.
One can rule out an averaging function on both S1 and S2 by some cohomological arguments. I have not worked out whether any sphere admits an averaging function, but I suspect not.
Euclidean spaces all do (given by the usual average).
Does anyone have a characterization of spaces which admit an averaging function?
Here is a proof that no sphere (of dimension >0) admits an averaging function. Suppose there is an averaging function f:Sn×Sn→Sn. Let T(x0,x1,x2,…,xn)=(−x0,−x1,x2,…,xn); then T:Sn→Sn is homotopic to the identity and satisfies T(T(x))=x. Now consider the map g:Sn→Sn given by g(x)=f(x,T(x)). Since T is homotopic to the identity, g is homotopic to x↦f(x,x)=x, and so g has degree 1. But note that g(T(x))=f(T(x),T(T(x)))=f(T(x),x)=f(x,T(x))=g(x), so g factors through the quotient Sn→Sn/∼, where ∼ identifies x with T(x). It is easy to see that Sn/∼≅Sn and the quotient map has degree 2. Thus g must have even degree, which is a contradiction.
On the other hand, here are some spaces that have means. First, suppose M=|X| is the geometric realization of a countable contractible simplicial set. The functor X↦X×X/Σ2 commutes with geometric realization for countable simplicial sets, so we get a CW-complex structure on M×M/Σ2 such that the diagonal M→M×M/Σ2 is a subcomplex. Since M is contractible, it follows by obstruction theory that M is a retract of M×M/Σ2. But such a retraction is exactly a mean on M. (The restriction to countable simplicial sets is just so that the product has the right topology; if you work in the category of compactly generated spaces rather than all spaces, you can remove the countability hypothesis. I also suspect that this argument works for arbitrary contractible CW-complexes (not just realizations of simplicial sets), but in that case it is not obvious how to get a CW-structure on M×M/Σ2 with the diagonal as a subcomplex).
There are also some spaces with means with more interesting homotopical properties. For instance, let (An)n≥0 be a sequence of countable Z[1/2]-modules (as above, the countability hypothesis can be dropped if you work with compactly generated spaces). Consider the bounded chain complex of Z[1/2]-modules whose objects are the An and whose maps are all zero. Via the Dold-Kan correspondence, we obtain from this chain complex a countable simplicial Z[1/2]-module X such that πn(X)=An. The geometric realization M=|X| is then a topological Z[1/2]-module with πn(M)=An. We can then define a mean on M by f(a,b)=(a+b)/2.