Let $f = (f_1, \cdots, f_m)$ be a function from $\mathbb{R}^n \to \mathbb{R}^m$. Prove that $f$ is linear if and only if for each $i$, $f_i$ is of the form
$$f_i (x_1, \cdots, x_n) = a_1x_1 + \cdots, a_nx_n$$
for some $a_1, \cdots, a_n \in \mathbb{R}$.
It is the forward direction that troubles me. The reverse one seems quite clear. Any help?
Let's denote by $(e_1,\ldots,e_n)$ and $(e'_1,\ldots,e'_m)$ the canonical bases of $\mathbb{R}^n$ and $\mathbb{R}^m$ respectively then $\displaystyle(x_1,\ldots,x_n)=\sum_{i=1}^nx_ie_i$ and $\displaystyle f=\sum_{j=1}^m f_j e'_j$, and consequently
$$f(x_1,\ldots,x_n)=\sum_{j=1}^mf_j(x_1,\ldots,x_n)e'_i=\sum_{j=1}^mf_j\left(\sum_{i=1}^nx_ie_i\right)e'_j=\sum_{j=1}^m\sum_{i=1}^nx_if_j(e_i)e'_j\\=\sum_{j=1}^m\sum_{i=1}^nx_ia_{ij}e'_j$$ where we denoted $f_j(e_i)$ by $a_{ij}$. Finally, we can see that $$f_j(x_1,\ldots,x_n)=\sum_{i=1}^nx_ia_{ij},\quad \forall j\in[\![1,m]\!].$$