Showing that if $fg=gf$ and $fh=hf$, then $gh=hg$, where $f$, $g$, and $h$ are affine functions Given real numbers $a$ and $b$ ($a \ne 0$), let $f_{a,b}$ be the function $\mathbb{R} \to \mathbb{R}$ defined by $x \mapsto ax+b$.  The set of such functions is a permutation group on $\mathbb{R}$, under function composition.
Let $f,g,h, \in G$, where $f$ is not the identity.  If $f$ commutes with both $g$ and $h$, show that $g$ and $h$ commute with each other.
(Problem from I.M. Isaacs)
I think I have proved this, but I'd like to be sure.
Let $f(x)=ax+b$, $g(x)=cx+d$, and $h(x)=mx+n$.  We have the following:
$$f(g(x))=acx+ad+b,\quad g(f(x))=acx+bc+d$$
For these two functions to be equal, therefore, we must have that $ad+b=bc+d$.  Am I correct in thinking that this further implies that $a,c=1$?
If so, then by essentially the same argument we also obtain $a,m=1$, and so $c,m=1$, which would imply that $gh=hg$ (since $g(h(x))=cmx+cn+d$ and $h(g(x))=cmx+md+n$).
Is this an effective proof?  It's clear that, for example in the first case, $a,c=1$ implies $ad+b=bc+d$, but it's not completely clear to me that $ad+b=bc+d$ necessarily implies $a,c=1$.
Thanks.
 A: Identify $x\mapsto sx+t$ with $\begin{bmatrix}s&t\\0&1\end{bmatrix}$, and you will be able to prove that composition of the affine functions corresponds to multiplication of the corresponding matrices. 
Now the given information that $fg=gf$ corresponds to $\begin{bmatrix}f\end{bmatrix}\begin{bmatrix}g\end{bmatrix}=\begin{bmatrix}g\end{bmatrix}\begin{bmatrix}f\end{bmatrix}$. Note that under this identification, $\begin{bmatrix}k\end{bmatrix}$ is a scalar matrix if and only if $k$ is the identity function. $f$ is not the identity function, and if either $g$ or $h$ are, the result is trivial.
If both $\begin{bmatrix}f\end{bmatrix}$ and $\begin{bmatrix}g\end{bmatrix}$ are diagonalizable, then since they commute, linear algebra tells us they are simultaneously diagonalizable. Since we can assume that neither matrix is a scalar matrix, then they have the same eigenspaces (each having two eigenspaces of dimension $1$ with distinct eigenvalues.) Ditto for $\begin{bmatrix}f\end{bmatrix}$ and $\begin{bmatrix}h\end{bmatrix}$. Therefore, assuming all three matrices are diagonalizable,  $\begin{bmatrix}g\end{bmatrix}$ and $\begin{bmatrix}h\end{bmatrix}$ have the same eigenspaces, are therfore simultaneously diagonalizable, and therefore  commute.
What if any one of these is not diagonalizable? In the case of $\begin{bmatrix}f\end{bmatrix}$, that would mean $a=1$ and $b\neq0$. So $f$ is a nonzero translation. Such a move only commutes with other translations. (If that is not geometrically clear, then you can deduce it from your formula with $a=1$ and $b\neq0$.) So $g$ and $h$ are also translations, and thus commute with each other. This argument can be spun around to apply if it's one of the other two functions ($g$ or $h$) that has a nondiagonalizable matrix.
A: As commenters have noted, you can't conclude $a=c=1$.
The condition $ad+b=bc+d$ can be rewritten as:
$$d(a-1)=b(c-1)$$
Now, if $a=1$ then $b\neq 0$ (or else $f(x)=x$ is the identity.)
So in that case, then $x+b$ commutes with $cx+d$ if and only if $c=1$. So if $x+b$ commutes with $cx+d$ and $mx+n$ then $c=m=1$ and therefore $cx+d$ and $mx+n$ commute.
If $a\neq 1$ then $c\neq 1$ (since $c=1\implies a=1$). So we can divide by $(a-1)(b-1)$ and get
$$\frac b{a-1}= \frac{d}{c-1}$$
$$\frac b{a-1}= \frac n{m-1}$$
Therefore:
$$\frac d{c-1} = \frac n{m-1}$$
and therefore $cx+d$ and $mx+n$ commute.
A: Your conclusion doesn't follow. For example, let $b=c=1,d=0$. Then $ad+b=cb+d$ doesn't imply anything at all about $a$.

Let $$f(x)=a_1x+b_1,\;g(x)=a_2x+b_2,\;h(x)=a_3x+b_3,$$ where $a_1\neq 1$ or $b_1\neq 0$, and suppose that $fg=gf$ and $fh=hf$. Your work shows that this means $$a_1b_2+b_1=a_2b_1+b_2\tag{1}$$ and $$a_1b_3+b_1=a_3b_1+b_3\tag{2}$$ hold, and that you want to show that $$a_2b_3+b_2=a_3b_2+b_3.\tag{#}$$
Let's rewrite $(1)$, $(2)$, and $(\#)$ as the equivalent equations $$(a_1-1)b_2=(a_2-1)b_1,\tag{$1'$}$$ $$(a_1-1)b_3=(a_3-1)b_1,\tag{$2'$}$$ and$$(a_2-1)b_3=(a_3-1)b_2.\tag{$\#'$}$$ and proceed casewise.
Case A: If $a_1=1$, then $b_1\neq 0$, so it follows by $(1')$ and $(2')$ that $a_2=a_3=1$, whence $(\#')$ holds.
Case B: If $a_1\neq 1$, then we can rewrite $(1')$ and $(2')$ as the equivalent equations $$b_2=\frac{a_2-1}{a_1-1}b_1\tag{$1''$}$$ and $$b_3=\frac{a_3-1}{a_1-1}b_1,\tag{$2''$}$$ whence $(\#')$ holds.
At that point, we're done.
