I'm dealing with an affine map $g$ that maps $A= (0,1)$ to $A'=(0,0)$, $B=(2,0)$ to $B'=(0,1)$ and $C=(2,1)$ to $C'=(0,2)$, and I'm being asked to find the matrix representation of this map. I figured finding the translation vector would be a good place to start, so I found the coefficients $\alpha, \beta, \gamma$ such that $\alpha (0,1)+\beta(2,0)+\gamma(2,1)=(0,0)$ and $\alpha+\beta+\gamma=1$. This gave me $g(0,0)=(0,-1)$.
Now my current problem is finding the matrix representation of $g$. The transformed points do not form an affine basis for $\mathbb{R}^2$, so the matrix consisting of the vectors $\overrightarrow{A'B'}$ and $\overrightarrow{A'C'}$ in its columns does not give the correct answer. Surely something like this can be done, or am I stuck solving for each coefficient of the matrix?
The answer that seems to work is the matrix with the vector $(0,1)$ in both its columns.
Edit: perhaps I figured out why this isn't giving me the correct answer. Would I need to check to where $g$ maps the standard basis vectors $(1,0)$ and $(0,1)$ instead of my affine basis $(A,B,C)$ vectors? This seems to give the correct answer. Will this always work?
The map can be expressed as $$ \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix} b_1 \\ b_2 \end{bmatrix} $$ For the non-singular case, you should be able to solve for the 6 unknowns ($a_{ij}, b_i$) using the 6 equations that you have: $$ \begin{align} 0 &= a_{11}(0) + a_{12}(1) + b_1\\ 0 &= a_{21}(0) + a_{22}(1) + b_2\\ 0 &= a_{11}(2) + a_{12}(0) + b_1\\ 1 &= a_{21}(2) + a_{22}(0) + b_2\\ 0 &= a_{11}(2) + a_{12}(1) + b_1\\ 2 &= a_{21}(2) + a_{22}(1) + b_2 \end{align} $$ In matrix form: $$ \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \\ 0 \\ 2 \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 & 0 & 1 \\ 2 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 2 & 0 & 0 & 1 \\ 2 & 1 & 0 & 0 & 1 & 0 \\ 0 & 0 & 2 & 1 & 0 & 1 \end{bmatrix} \begin{bmatrix} a_{11} \\ a_{12} \\ a_{21} \\ a_{22} \\ b_1 \\ b_2 \end{bmatrix} $$ For the singular case you will need to compute a pseudoinverse to find the unknowns. For the data you have provided an inverse appears to exist and you don't need a pseudoinverse.