I am reading a book Axioms and Set Theory - A first course in Set Theory by Robert Andr´e
In the book an example if discussed regarding composition of two relations R and T
For a set S
S = {a,b,c,{a},{a,b},{{c}},∅,{∅}}
The relations R and T on S are given as
R = {(x, y) : x ∈ y}
T = {(x, y) : x = {y}}
So now,
R = { (a, {a}), (a, {a, b}), (b, {a, b}), (∅, {∅}) }
T = { ({a}, a}), ({∅},∅})}
We define T∘R
T∘R = {(x, y) : (z, y) ∈ T for some z ∈ imR}
For the relation T∘R we obtain:
T∘R = {(a, a), (∅,∅)}
For the relation R∘T we obtain:
R∘T = {({a}, {a}), ({∅}, {∅})}
But I am getting my answer as:
R∘T = {({a}, {a}), ({a}, {a, b}), ({∅}, {∅})}
Am I making any mistake or the example discussed in book has the error
I think your definition of $T\circ R$ needs a bit of work, it should read
$$ T\circ R = \{(x,y)\mid \text{there exists $z$ such that }(x,z)\in R\text{ and }(z,y)\in T\} $$
Note: it matters which $x$ the $z$ comes from in the relation $R$.
Other than that, I would agree with your answer: $(\{a\},\{a,b\})$ should be in $R\circ T$ since we have $(\{a\},a)\in T$ and $(a,\{a,b\})\in R$.