Let me re-enforce this by looking at a similar problem.

Suppose f is a linear transformation from $\displaystyle R^3$ to $\displaystyle R^2$ defined by $\displaystyle f\left(\begin{pmatrix}x_1 \\ x_2\end{pmatrix}\right)= \begin{pmatrix}x_1+ x_2 \\ 2x_1- x_2\end{pmatrix}$.

To prove it is a linear mapping you must show that f(u+ v)= f(u)+ f(v) and f(av)= af(v) for any vectors u and v and any number a. You need to show that
$\displaystyle f\left(\begin{pmatrix}x_1 \\ x_2\end{pmatrix}+ \begin{pmatrix}y_1 \\ y_2\end{pmatrix}\right)= f\left(\begin{pmatrix}x_1+ y_1 \\ x_2+ y_2\end{pmatrix}$$\displaystyle = \begin{pmatrix}(x_1+ y_1)+ (x_2+ y_2) \\ 2(x_1+ y_1)- (x2+ y_2)\end{pmatrix}= \begin{pmatrix}(x_1+ x_2)+ (y_1+ y_2) \\ (2x_1- x_2)+ (2y_1- y_2)\end{pmatrix} $$\displaystyle = \begin{pmatrix} x_1+ x_2 \\ 2x_1- x_2\end{pmatrix}+ \begin{pmatrix}y_1+ y_2 \\ 2y_1- y_2\end{pmatrix}$$\displaystyle = f\left(\begin{pmatrix}x_1 \\ x_2\end{pmatrix}\right)+ f\left(\begin{pmatrix}y_1 \\ y_2\end{pmatrix}\right)$.

Also, $\displaystyle f\left(a\begin{pmatrix}x_1 \\ x_2\end{pmatrix}\right)= f\left(\begin{pmatrix}ax_1 \\ ax_2\end{pmatrix}\right)= \begin{pmatrix}ax_1+ ax_2 \\ 2ax_1- x_2\end{pmatrix}$$\displaystyle = \begin{pmatrix} a(x_1+ x_2) \\ a(2x_1- x_2)\end{pmatrix}$$\displaystyle = a\begin{pmatrix}x_1+ x_2 \\ 2x_1- x_2\end{pmatrix}= af\left(\begin{pmatrix}x_1 \\ x_2\end{pmatrix}\right)$.

To write it as a matrix, in a given basis, apply the transformation to the basis, the right the result of each as a linear combination of the basis. Each basis vector gives a column of the matrix. The standard matrix is $\displaystyle \begin{pmatrix}1 \\ 0 \end{pmatrix}$ and $\displaystyle \begin{pmatrix} 0 \\ 1 \end{pmatrix}$.

$\displaystyle f\left(\begin{pmatrix}1 \\ 0 \end{pmatrix}\right)= \begin{pmatrix}1+ 0 \\ 2(1)- 0\end{pmatrix}= \begin{pmatrix}1 \\ 2\end{pmatrix}$.

$\displaystyle f\left(\begin{pmatrix}0 \\ 1 \end{pmatrix}\right)= \begin{pmatrix}0+ 1 \\ 2(0)- 1\end{pmatrix}= \begin{pmatrix}1 \\ -1\end{pmatrix}$.

So the matrix representation of A in the standard basis is
$\displaystyle \begin{pmatrix}1 & 1 \\ 2 & -1\end{pmatrix}$