Defining a Linear Transformation Given a Basis for the Domain I'm having difficulty understanding the proof for the following theorem:
Suppose $B$ = $\{$$v_1$$, ... , $$v_n$$\}$ is a basis for a vector space V. Then for any elements $w_1$$, ... , $$w_n$ of a vector space $W$, there is a unique linear map T : V $\rightarrow$ W such that T($v_i$) = $w_i$ for $i = 1, ..., n$.

Proof Define T : V $\rightarrow$ W by T(v) $=$ $r_1$$w_1$ $+$ $...$ $+$ $r_n$$w_n$ where [v]$_B$ = $\begin{bmatrix}
r_1\\
.\\
r_n\\
\end{bmatrix}$ is the coordinate vector of v with respect to the basis $B$. If we let $B'$ = $\{$$w_1$$,...,$$w_n$$\}$, then we can write T(v) = $L_{B'}$, where $L_{B'}$ is the linear combination function. Since $L_{B'}$ and the coordinate vector function are linear, Theorem 6.7 gives that the composition T is linear. Of course,
T($v_i$) = $L_{B'}$([$v_i$]$_B$) = $L_{B'}$($e_i$) = $0$$w_1$$+$ $...$ $+$ $1$$w_1$ $+$ $...$ $+$ $0$$w_n$ $=$ $w_i$.
By Theorem 6.3, there is only one linear map with these values on the elements of the spanning set $B$.

I left out the two theorems mentioned in the proof because I'm mainly stuck on why T(v) is defined as the linear combination $r_1$$w_1$ $+$ $... +$ $r_n$$w_n$. Why does the proof use the scalars $r_1$$,...,$$r_n$ from the coordinate vector of v with respect to the basis $B$? If necessary, I can post the other two theorems mentioned in the proof. Sorry for the crappy formatting, this is my first post here.
 A: In the proof we construct the linear map $T$ and show that this construction is unique. Now here is how the construction goes:
Since $B=(v_1,\cdots,v_n)$ is a basis for $V$ then by definition for each $v\in V$ there exists a unique $n$-tuple of scalars $(r_1,\cdots,r_n)$ such that 
$$v=r_1v_1+\cdots+r_nv_n$$
these scalars are called the coordinates of $v$ relative to the basis $B$. A basis in vector space is not unique, so if we take another basis $B'=(v_1',\cdots,v_n')$ then there exists a unique other $n$ tuple of scalars $(r_1',\cdots,r_n')$ such that our same $v$ is written as 
$$v=r_1'v_1'+\cdots+r_n'v_n'$$ and these scalars are called the coordinates of 
$v$ relative to the basis $B'$.
 Now that we have explained the meaning of the existence and uniqueness of the coordinates of a vector once we fix a basis, let's construct a linear map 
$$T:V\longrightarrow W$$
Take any $v\in V$, as we said earlier, relative to the chosen basis $B$ it has a unique expression 
$$v=r_1v_1+\cdots+r_nv_n$$
hence we define the image of $v$ by $T$ as 
$$T(v)=r_1w_1+\cdots+r_nw_n$$
As it is defined it is clear that $T(v_i)=w_i$. 
Indeed, for each $i=1..n$,
$$v_i=0v_1+0v_2+\cdots+0v_{i-1}+1v_i+0v_{i+1}+\cdots+0v_n$$
hence 
$$T(v_i)=0w_1+0w_2+\cdots+0w_{i-1}+1w_i+0w_{i+1}+\cdots+0w_n=w_i$$
Now checking that $T$ is linear and unique follows immediately from the constructin of $T$.
