How to write a function as a mapping that is composed of another function?

45 Views Asked by At

Consider the following functions $f$ and $g$ where $f: X \rightarrow Y$ and $g:Y \rightarrow Z$. Here, $X$, $Y$, and $Z$ may be sets of real numbers or real vectors, but I think that is irrelevant to the question.

I want to write this as single mapping $h$ where the output of $f$ is the input to $g$ (i.e., $f$ is composed of $g$). What would be the best notation for this?

For context, these functions represent a sequence of neural networks.