If $f$ is an onto linear transformation, and $g$ is a non-linear function, is it possible for $h=g \circ f$ to be linear? Trying to prove by contrary that if $f$ is an onto linear transformation, $g$ is any function, and $h=g \circ f$ is linear, then $g$ must be a linear function.
    f:Rn->Rm
    g:Rm->Rp
    h:Rn->Rp

 A: Sorry I misread question. What is described in the previous edits is not an approach to the actual question asked. 
A: If $f$ is linear and onto and $f \circ g$ is linear then $g$ must be linear. If $f$ is linear and onto, you can pull a counter-example to the linearity of $g$ back to a counter-example of the linearity of $g \circ f$. E.g., if $g(a + b) \neq g(a) + g(b)$, choose $x$ and $y$ such that $f(x) = a$ and $f(y) = b$ and then you will have
$$(g \circ f)(x + y) = g(a + b) \neq g(a) + g(b) = (g \circ f)(x) + (g \circ f)(y).
$$
And similarly if $g(\lambda a) \neq \lambda g(a)$ for some $\lambda$ and $a$.
A: Be $f:U\to V$ onto and linear, and $g:V\to W$ so that $h=g\circ f$ is linear, where $U$, $V$, $W$ are vector spaces over the field $K$.
Now be $v,w\in V$ and $\alpha,\beta\in K$. Then because $f$ is onto, there are $t,u\in U$ such that $f(t)=v$ and $f(u)=w$. Since $f$ is linear, this implies that $f(\alpha t+\beta u) = \alpha v+\beta w$. Thus we have
\begin{align}
g(\alpha v + \beta w) &= g(f(\alpha t+\beta u))\\
&= h(\alpha t+\beta u) && \text{definition of $h$}\\
&= \alpha h(t) + \beta h(u) && \text{linearity of $h$}\\
&= \alpha g(f(t)) + \beta g(f(u)) && \text{definition of $h$}\\
&= \alpha g(v) + \beta g(w)
\end{align}
Thus $g$ is a linear function.
