Finding the matrix associated with a linear transformation I've been staring at this problem for over an hour, trying different things and getting approximately nowhere. Here's the problem:

Let $$w_1=\begin{bmatrix}1\\2\\0\end{bmatrix},w_2=\begin{bmatrix}2\\5\\1\end{bmatrix}, w_3=\begin{bmatrix}2\\4\\1\end{bmatrix}$$
  Let $f:\mathbb{R}^3\rightarrow\mathbb{R}^3$ be the linear transformation satisfying:
  $$f(w_1)=w_2-w_3,f(w_2)=-w_2+w_3,f(w_3)=w_1+w_2+w_3$$
  Give the matrix representation of $f$ with respect to the basis {$w_1,w_2,w_3$}. Also give the matrix representation of $f$ where the input x is written with respect to the basis {$w_1,w_2,w_3$} and the output $f(x)$ is written with respect to the standard basis.

It's coming up with the matrix representation that's getting me—I think once I have that I can probably figure out how to find the one that shows the output with respect to the standard basis. I just have no idea how to even get started and I can't find anything that looks like this problem in my textbook.
Even just a hint on how to get started would be awesome.
 A: Hint: Let the function $f:U\to V$ be linear and let $\{u_i\}$ and $\{v_j\}$ be an ordered basis of the space $U$ and $V$ respectively. Then to get the matrix representation of the function $f$ w.r.t. these ordered bases, it is sufficient to calculate $f(u_i)$ and express them in terms of (i.e., w.r.t. the basis) $\{v_j\}$. So, if $$f(u_i)=\sum_jc_{ij}v_j$$ then the matrix representation of $f$ is $C^t=(c_{ji}).$
Note: The basis $\{(1,0,0),(0,1,0),(0,0,1)\}$ is called the standard basis of $\mathbf{R}^3$.
A: first :(a matrix that accept a vector with coordinate at$\{w_{1},w_{2},w_{3}\}$  and gives as a vector with coordinate at $\{w_{1},w_{2},w_{3}\}$ again )
for this you must find coordinate of $w_{2}-w_{3}$ at  $ \{w_{1},w_{2},w_{3}\} $
as $f(w_{1})=w_{2}-w_{3}=0 w_{1}+1w_{2}+-1w_{3}$
ans so
$f(w_{2})=0w_{1}-1w_{2}+1w_{3}$ and also $f(w_{3}=1w_{1}+1w_{2}+1w_{3})$
so f=[0,0,1;1,-1,1;-1,1,1] ( column i shows f($w_{i}$) at base $\{w_{1},w_{2},w_{3}\}$ )
will be matrix that represents f at base$\{w_{1},w_{2},w_{3}\}$
second :( a matrix that accept vector at base $\{w_{1},w_{2},w_{3}\}$ then give as a vector at standard base)
at this time you need to write $ f(w_{i}) = \alpha_{1}(1,0,0)+\alpha_{2}(0,1,0)+\alpha_{3}(0,0,1))$
$f(w_{1})=w_{2}-w_{3}=(0,1,0)=0(1,0,0)+1(0,1,0)+0(0,0,1) $
$f(w_{2})=-w_{2}+w_{3}=(0,-1,0)=0(1,0,0)+-1(0,1,0)+0(0,0,1)$
$f(w_{3})=w_{1}+w_{2}+w_{3}=(5,11,2)=5(1,0,0)+11(0,1,0)+2(0,0,1)$
so f=[0,0,5;1,-1,11;0,0,2] will be our matrix  (column i shows f(w_{i} at standard base)
for example column (0,1,0) shows $f(w_{1})$ at standard base
A: Let A is a required 3x3 matrix and from the problem we have A [w1 w2 w3] = [f(w1) f(w2) f(w3)]
Therefore A = [f(w1) f(w2) f(w3)]*[w1 w2 w3]^-1
find [f(w1) f(w2) f(w3)] = (\left[\begin{matrix}0&0&5\\1&-1&11\\0&0&2\end{matrix}\right])
and [w1 w2 w3]^- = (\left[\begin{matrix}1&0&-2\\-2&1&0\\2&-1&1\end{matrix}\right])
therefore A = (\left[\begin{matrix}10&-5&5\\25&-12&9\\4&-2&2\end{matrix}\right])
that A is required matrix 
