# Proving that a transformation semigroup is closed

Here is my set of functions: $$S =\left\{\frac{x-3}{x-2}, 3-x, \frac{2x-3}{x-1}, \frac{x}{x-1},\frac{2x-3}{x-2},x\right\}$$

How do I show that $S$ is a transformation semigroup for function composition, or that $(\forall i,j \in S) i \circ j \in S$ without going through all 36 cases?

Also, if I compose two functions in S, the domains may change,

e.g. $f = \frac{x-3}{x-2}, (f\circ f)(x) = \frac{2x-3}{x-1}, (f\circ f\circ f)(x) = x$

but $x$ cannot be $1$ or $2$ for the last function. Will I have to expand $S$ to contain the functions with different domains?

-
I don't think you are to worry about undefinedness. And it is at worst $25$. – André Nicolas Feb 2 '13 at 6:48
I've counted 15 cases :) (f(x)=x is excepted since it is the identity function.) Anyway, this question is too elementary in my opinion and you could have been asked on other sites like artofproblemsolving.com – user26857 Feb 2 '13 at 12:32
Consider the images of $E=\{1,2,\infty\}\subset\mathbb{P}^1(\mathbb{R})$. That six functions cover all the possible permutations of $E$. – Jack D'Aurizio Feb 2 '13 at 19:11
As I understand it, the possible functions are the six in $S$, and the domains are $\mathbb{R}, \mathbb{R} \setminus \{1\}, \mathbb{R} \setminus \{1,2\}, \mathbb{R} \setminus \{2\}$? – user1526710 Feb 3 '13 at 18:48