In the lecture notes for a course I'm taking, it is stated that:
Unlike multiplication however, we can't reverse order. First of all, in general it doesn't even make sense to reverse composition. For example, if we have $f:\mathbb{R} \to \mathbb{Z}$ defined by $f(x) =\left \lfloor x \right \rfloor$ and $g:\mathbb{R} \to \mathbb{R}$ defined by$g(x) = x^2$. Then $f \circ g$ makes perfect sense since the codomain of $g$ and the domain of $f$ are equal (both are $\mathbb{R}$), but we can't technically do $g \circ f$, since the codomain of $f$ is $\mathbb{Z}$ and the domain of $g$ is $\mathbb{R}$.
I'm confused by the reasoning for this. Since the implication is $(g\circ f):\mathbb{R} \to \mathbb{Z}$, and we have that $f:\mathbb{R} \to \mathbb{Z}$ is true, why is it that $(g \circ f)$ is not true as well?