I am trying to understand affine maps. In the book I am using there is the following example, which I don't understand. Given are the following points: \begin{array}{lll} p_0 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}, & p_1 = \begin{pmatrix} 1 \\ 2 \end{pmatrix}, & p_2 = \begin{pmatrix} 0 \\ 1 \end{pmatrix}, \\ q_0 = \begin{pmatrix} -2 \\ -1 \end{pmatrix}, & q_1 = \begin{pmatrix} \phantom{-}0 \\ -1 \end{pmatrix}, & q_2 = \begin{pmatrix} -2 \\ -2 \end{pmatrix}. \end{array}
Then the following vectors are computed \begin{array}{ll} \overrightarrow{p_0 p_1} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}, & \overrightarrow{p_0 p_2} = \begin{pmatrix} -1 \\ \phantom{-}0 \end{pmatrix}, \\ \overrightarrow{p_0 p_1} = \begin{pmatrix} 2 \\ 0 \end{pmatrix}, & \overrightarrow{p_0 p_1} = \begin{pmatrix} \phantom{-}0 \\ -1 \end{pmatrix}. \end{array}
I am asked to find an affine map such that $f(p_{i})=q_{i}$.
It now says that the matrix of the map determined by $F(\overrightarrow{p_0 p_i})=\overrightarrow{q_0 q_i}$, $i=1,2$ is given by $$ A = \begin{pmatrix} 0 & 2 \\ 1 & 0 \end{pmatrix}. $$
I don't understand how I get this matrix. I would say it is the following one, but I guess I am wrong. I did everything with repect to the bases $\{(0,1),(-1,0)\}$ and $\{(1,0),(0,1)\}$. I am not sure about the second basis, but since there is no other basis mentioned I thought it is the one the author has used too. $$ \begin{pmatrix} 2 & \phantom{-}0 \\ 0 & -1 \\ \end{pmatrix} $$
Unfortunately I don't know where I making the mistake.
I would really appreciate some help. Thanks a lot in advance!
Relative to the bases that you chose to use, the matrix that you computed is in fact correct. Generally speaking, however, when specific bases aren’t mentioned the standard basis is implied. Indeed, if you apply a change of basis to the matrix that you computed, you get the correct answer: $$\begin{bmatrix}2&0\\0&-1\end{bmatrix} \begin{bmatrix}0&-1\\1&0\end{bmatrix}^{-1} = \begin{bmatrix}0&2\\1&0\end{bmatrix}.$$ (No change-of-basis matrix is needed on the left side because you already used the standard basis for the codomain.)
You could have constructed this matrix directly by taking advantage of the fact that its columns are the images of the basis vectors: we know that $(0,1)^T\mapsto(2,0)^T$ and, by linearity, $(1,0)^T\mapsto(0,1)^T$, so those are the second and first columns, respectively, of the transformation matrix (with respect to the standard basis).