Basis Transformation Matrix I have a problem related to transformation matrix. 
The problem is like that;
Given basis $B$: $b_1 = \begin{pmatrix}1&2\end{pmatrix}^T$ and $b_2 =\begin{pmatrix}2&1\end{pmatrix}^T$ and $A$: $a_1=\begin{pmatrix}1&2\end{pmatrix}^T$, $a_2=\begin{pmatrix}2&7\end{pmatrix}^T$.
Find the transformation matrix $T$ from the basis $B$ into basis $A$?
I would appreciate if anyone help me with this.
 A: The definition of the transformation matrix is $A=TB$ where $A$ is a vector in the new basis and $B$ the same vector in the old basis. So by taking $A$ and $B$ as the basis vectors, you can see that finding $T$ comes down to finding an expansion of the new basis in terms of the old basis.
A: The change of basis matrix  from basis $\mathscr B$ to basis $\mathscr A$ is the matrix of the identity map from $(\mathbf R^2,\mathscr A)$ to  $(\mathbf R^2,\mathscr B)$.
Let $T_B$ be the matrix with column vectors $b_1$ and $b_2$: it's the change of basis matrix from the canonical basis to basis  $\mathscr B$. Similarly the matrix $T_A$ with colum,n vectors $a_1ˆ$ and $a_2$ is the change of basis matrix from the canonical basis to basis $\mathscr A$. The commutative diagram:
$$\begin{array}{cl}(\mathbf R^2,\textit{Can})&\stackrel{=}{\longleftarrow}(\mathbf R^2,\mathscr B)\\\uparrow\, =&\nearrow\,=\\(\mathbf R^2,\mathscr A)\end{array}$$
shows at once that
$$T=T_B^{-1}T_A.$$
A: The solution by provided by @NDewolf. Let's fill out the details.

Vectors will be colored according to the basis membership, and named based upon color:
$$
 \color{blue}{\mathbf{B}\ (standard)}, \qquad
 \color{red}{\mathbf{R}\ (a)}, \qquad
 \color{green}{\mathbf{G}\ (b)}.
$$

$$
\mathbf{T}_{\color{red}{R}\to \color{blue}{B}}=
\color{black}{\left[
\begin{array}{r|r}
 1 & 2 \\
 2 & 7 \\
\end{array}
\right]}
$$

The matrix $\mathbf{T}_{\color{red}{B}\to \color{blue}{A}}$ is an operator which maps a $\color{blue}{blue}$ vector to a $\color{red}{red}$ vector.
The inverse matrix is a map which connects vectors in the $\color{blue}{standard}$ basis to vectors in the $\color{red}{\mathbf{R}}$ basis:
$$
\mathbf{T}^{-1}_{\color{blue}{B}\to \color{red}{R}} =
%
\color{blue}{
\frac{1}{3}
\left(
\begin{array}{rr}
 7 & -2 \\
 -2 & 1 \\
\end{array}
\right)}
$$

For the green basis $\color{green}{\mathbf{G}}$, the maps are
$$
\mathbf{G}_{\color{green}{G}\to \color{blue}{A}}=
\color{black}{\left[
\begin{array}{r|r}
 1 & 2 \\
 2 & 1 \\
\end{array}
\right]}, \qquad
%
\mathbf{G}^{-1}_{\color{blue}{A}\to \color{green}{G}}=
\color{black}{\left[
\begin{array}{rr}
 -1 &  2 \\
  2 & -1 \\
\end{array}
\right]}
$$

Transition from red $\color{red}{\mathbf{R}\ (a)}$ to green $\color{green}{\mathbf{G}\ (b)}$
As so succinctly expressed by @Bernard, connect all bases through the hub of the blue basis, $\color{blue}{standard}$. Start with a vector in the $\color{red}{\mathbf{R}}$ basis, map that to a vector in the $\color{blue}{standard}$ basis, then map that to a vector in the $\color{green}{\mathbf{G}}$ basis:
$$
\color{red}{
\left[
\begin{array}{c}
 x_{1} \\
 y_{1} \\
\end{array}
\right]}
%
\quad \Longrightarrow \quad
%
\color{blue}{
\left[
\begin{array}{c}
 x_{2} \\
 y_{2} \\
\end{array}
\right]}
%
\quad \Longrightarrow \quad
%
\color{green}{
\left[
\begin{array}{c}
 x_{3} \\
 y_{3} \\
\end{array}
\right]}
%
$$
The solution is
$$
\begin{align}
  T_{\color{red}{R}\to\color{green}{G}} &= \color{green}{G^{-1}} \color{red}{R} \\
& =
\left[
\begin{array}{rr}
 -1 & 2 \\
 2 & -1 \\
\end{array}
\right]
%
\left[
\begin{array}{cc}
  1 & 2 \\
  2 & 7 \\
\end{array}
\right] \\
%
&=
\left[
\begin{array}{cr}
 1 & 4 \\
 0 & -1 \\
\end{array}
\right]
\end{align}
$$
