Given any functions $f$ and $g$ the function $h(x)=f(g(x))$ is well defined with:
$$\text{dom}(h)=g^{-1}[\text{dom}(f)\cap \text{img}(g)]$$ $$\text{img}(h)=f[\text{dom}(f)\cap \text{img}(g)]$$
However based on the answer to my question here:
When is composition of functions defined?
It seems it would not be proper to normally write $h=f\circ g$.
My new question is why this is still used for the composition of binary relations as seen here:
What is the composition of relations like this? With no transitive relations between them?
Where the range of the first relation is not equal to the domain of the second relation. Yet the composition appears to still be well defined? Transferring over that notation it would seem that it would actually make sense to write $h=f\circ g$? Why is the definition of composition defined differently for relations then if we consider a function a relation?