This is really basic (I'm new to this stuff), and doesn't even matter at all - But I'm just curious:
From my book:
If $R = (G,A,B)$ and $S = (H,B,C)$ the composition of $R$ and $S$ is known as $S \circ R = (H \circ G,A,C)$
First of all, if it says "of $R$ and $S$" I'd expect the $R$ to come first, and then the $S$. Which is not the case in $S \circ R$.
Even the graphs are inverted. I would expect $G$ to come first. But we got $(H \circ G,A,C)$.
I can live with that. But I'd like to know why is this the case. Why are they inverted?
Composition of relations is a generalization of composition of functions. When we have a function $f:A\to B$ and a function $g:B\to C$, the composite function is a function from $A$ to $C$ that takes $a$ to $g\big(f(a)\big)$, so it makes sense to write the composition in that same order: $g\circ f$ to match $g\big(f(a)\big)$ rather than $f\circ g$ to mean ‘apply $f$ first, then $g$’.
That said, however, it should be mentioned that some people do use the opposite convention for composition: when they write $f\circ g$, they do mean that $f$ is applied first, so that the result of applying $f\circ g$ to $a$ is $g\big(f(a)\big)$. When this convention is used, functions are often written to the right of their arguments: $(a)(f\circ g)=\big((a)f\big)g$. (The parentheses around the argument are often omitted.)