TITLE: Linearization of a fact about functions between finite sets
QUESTION [10 upvotes]: Suppose $X$, $Y$, and $Z$ are finite sets.  If we have a function
$$f : X \longrightarrow Y$$
and another
$$g : Y \longrightarrow Z$$
then the composite function $g \circ f$ has the property that
$$ |\mbox{Im} ( g \circ f )| \leq |Y|. $$
If we replace $f$ by a formal linear combination of functions $X \longrightarrow Y$, and $g$ by a formal linear combination of functions $Y \longrightarrow Z$, then we may "compose" these formal combinations (enforcing the distributive law) to obtain a linear combination of functions $X \longrightarrow Z$, none of which have image exceeding $|Y|$ in cardinality.
My question is the converse: can any such linear combination be obtained?
I posted this question at math.stackexchange, but there are no responses after a week:
https://math.stackexchange.com/q/97513/22621

REPLY [3 votes]: No.  Consider e.g. the case $X = Z = \{1,2,3\}$, $Y = \{1,2\}$, and the formal linear combination $h_1 + h_2$ where $h_1(1) = h_1(2)=1$, $h_1(3)=2$, $h_2(1)=h_2(3)=2$, $h_2(2)=3$.
If $h_1 = g_1 \circ f_1$, we must have $f_1(1) = f_1(2) \ne f_3(3)$ and 
$\text{Im}(g_1) = \{1,2\}$.  Similarly if $h_2 = g_2 \circ f_2$ we must have $f_2(1)=f_2(3) \ne f(2(2)$ and $\text{Im}(g_2) = \{2,3\}$.  But $h_{12} = g_2 \circ f_1$, which would have
$h_{12}(1) = h_{12}(2)$ and $\text{Im}(h_{12}) = \{2,3\}$, and similarly $h_{21} = g_1 \circ f_2$, are not part of this formal linear combination.