I'm trying to prove or disprove the following statement:
let $f\subseteq A\times B$ and $g\subseteq B\times C$ to be relations such that $f\circ g$ is a function. So $f$ and $g$ are also functions.
I tried to think of an example that disproves it but every example that I tried does not disprove it. so I guess this theorem is valid and I'll be glad to hear some guidelines on how to prove it.
Hint Try $A,C$ sets with a single element. If $f= A \times B$ and $g=B \times C$, and $B \neq \emptyset$ then $f \circ g$ is a function.