# A simple question on linear algebra and linear transformations

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]\!].$$

-

Hint: It suffices to consider each $f_i$ separately. Consider the action on the basis vectors $(1,0,0\dots)$, $(0,1,0,\dots)$, $\dots$. Note that by linearity, the action of the function on these vectors determines the entire function. (To get you started, if $f((1,0,0,\dots)=a_1$, then linearity implies $f((x_1,0,0,\dots)=x_1a_1$. Generalize this method to get your desired result.)

-

Hint: A function is linear if and only if there exists a matrix which acts on the vector in the same way. Doesn't this look sort of familiar when thought of this way?

Ok, considering your comment below. First show that $f$ is linear if and only if each $f_i$ is linear (this shouldn't be hard) and so we really just need to show that each linear map $\mathbb{R}^n\to\mathbb{R}$ is of the desired form. To see this, merely check that if we let $a_i:=f(e_i)$ then $$f(x_1,\cdots,x_n)=f\left(\sum_{i=1}^{n}x_i e_i\right)=\sum_{i=1}^{n}x_i f(e_i)=\sum_{i=1}^{n}x_i a_i$$

-
The problem is that we have not had any matrix theory yet. We are supposed to prove this based purely on the definitions. – user44069 Feb 20 '13 at 6:19
Nice one! Thanks, Alex! – user44069 Feb 20 '13 at 6:26