TITLE: elementary ring proof with composition of functions and addition of functions as operations
QUESTION [7 upvotes]: Consider the set $\mathcal{F}=\lbrace f\mid \mathcal{f}:\Bbb{R}\to\Bbb{R}\rbrace$, in which an additive group is defined by addition of functions and a second operation defined as composition of functions. The question asks to verify that the resulting structure does not satisfy the ring properties.  

This is the question 24.10 from Modern Algebra, by Durbin, 4th edition.
So what I have so far is that all of the properties for the additive group (with addition of functions as the operation here) hold, associativity of the composition of functions hold, and that the failure must come from the distributive laws.
My proof of my claim, so far; 
$$1\,\,\,\,\,[(\mathcal{f}\circ\mathcal{g})+\mathcal{h}](\mathcal{x})=\cdots=\mathcal{f}(\mathcal{g}(\mathcal{x}))+\mathcal{f}(\mathcal{h}(\mathcal{x})).$$
...but, 
$$2\,\,[(\mathcal{f}\circ\mathcal{g})+\mathcal{h}](\mathcal{x})=$$
$$3\,\,(\mathcal{f}\circ\mathcal{g})(\mathcal{x})+\mathcal{h}(\mathcal{x})=$$
$$4\,\,\,\mathcal{f}(\mathcal{g}(\mathcal{x}))+\mathcal{h}(\mathcal{x}).$$
...which brings me to my contradiction of the properties of rings that; 
$$5\,\,\,[\mathcal{f}\circ(\mathcal{g}+\mathcal{h})](\mathcal{x})\neq[(\mathcal{f}\circ\mathcal{g})+\mathcal{h}](\mathcal{x}).$$
So my question is, is this the correct path to showing the distributive laws are not obeyed when composition is taken as an operation on $\mathcal{F}$? particularly my proceeding from 2 to 3 to 4 is what i feel uncomfortable about, like i may be missing a step in there.
thanks

REPLY [6 votes]: If the distributive property $f \circ (g + h) = f \circ g + f \circ h$ held, notice that we would have $f(g(x) + h(x)) = f(g(x)) + f(h(x))$, that is, $f$ would preserve addition. In other words, $f$ would be a group homomorphism from $\mathbb{R}$ to $\mathbb{R}$ (the reals with addition). But not every $f \in \mathcal{F}$ is a group homomorphism!
Of course if we restricted our set to include only homomorphisms from $\mathbb{R}$ to $\mathbb{R}$ (called endomorphisms), then the ring axioms would be satisfied. This ring is called the endomorphism ring, and can be formed from any abelian group.