We usually describe a vector in $\R^2$ by its two components (or entries),
$$\mathbf{y} = \begin{bmatrix} y_1 \\ y_2 \end{bmatrix}.$$
Those entries are really \emph{coordinates}, in the standard basis: they say how far to walk along $\mathbf{e}_1$ (the ``x direction'') and how far to walk along $\mathbf{e}_2$ (the ``y direction''). The choice of basis being $\mathbf{e}_1$ and $\mathbf{e}_2$ is standard, but not required. Any basis $\beta = \{\mathbf{v}_1, \mathbf{v}_2\}$ suffices to give unique coordinates (as noted in the theorem below). This page is about computing those new coordinates when we know the standard ones. Coupling these ideas and composing operations lets us convert between any two bases.
In the graph, the red vector is $\mathbf{v}_1$, the blue vector is $\mathbf{v}_2$ (drag either tip to change the basis), and the orange vector is $\mathbf{y}$ (drag it, or use the sliders). The faint black grid is the standard grid, built from $\mathbf{e}_1$ and $\mathbf{e}_2$. Toggle on the \emph{$\beta$-grid} to see the grid built from $\mathbf{v}_1$ and $\mathbf{v}_2$ instead. Notably, the vector $\mathbf{y}$ may have different coordinates in different bases, thus sitting along different grid points.
\subsection*{Coordinates with respect to a basis}
\begin{theorem}
If $\beta = \{\mathbf{v}_1, \mathbf{v}_2\}$ is a basis of $\R^2$, then every $\mathbf{y} \in \R^2$ can be written as a linear combination $\mathbf{y} = c_1\mathbf{v}_1 + c_2\mathbf{v}_2$ in a \emph{unique} way.
\end{theorem}
\begin{definition}
Let $\beta = \{\mathbf{v}_1, \mathbf{v}_2\}$ be a basis of $\R^2$ and let $\mathbf{y} \in \R^2$. The unique scalars $c_1, c_2$ with $\mathbf{y} = c_1\mathbf{v}_1 + c_2\mathbf{v}_2$ are the \textbf{coordinates} of $\mathbf{y}$ with respect to $\beta$, and the vector
$$\big[\mathbf{y}\big]_\beta = \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} \in \R^2$$
is the \textbf{coordinate vector} of $\mathbf{y}$ with respect to $\beta$.
\end{definition}
Toggle on $c_1\mathbf{v}_1,\ c_2\mathbf{v}_2$ to see this in the graph: the dashed red and blue arrows are the scaled vectors $c_1\mathbf{v}_1$ and $c_2\mathbf{v}_2$, and the dotted lines complete the parallelogram whose far corner is their sum, $\mathbf{y}$. The coordinate vector, $\big[\mathbf{y}\big]_\beta$ simply tells use how to traverse the $\beta$-grid to arrive at $\mathbf{y}$.
\begin{remark}
A set has no order, so $\{\mathbf{v}_1, \mathbf{v}_2\} = \{\mathbf{v}_2, \mathbf{v}_1\}$. For coordinates, however, we have to fix an ordering of the basis, since the ordering decides which entry of $\big[\mathbf{y}\big]_\beta$ is which. Listing the basis as $\{\mathbf{v}_2, \mathbf{v}_1\}$ instead would give the same grid, but the two entries of $\big[\mathbf{y}\big]_\beta$ would trade places.
\end{remark}
\begin{problem}
Let $\beta = \{\mathbf{v}_1, \mathbf{v}_2\}$ be a basis of $\R^2$, and let $\beta' = \{\mathbf{v}_2, \mathbf{v}_1\}$ be the same basis listed in the opposite order. Prove that for every $\mathbf{y} \in \R^2$,
$$\big[\mathbf{y}\big]_\beta = \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} \quad\Longrightarrow\quad \big[\mathbf{y}\big]_{\beta'} = \begin{bmatrix} c_2 \\ c_1 \end{bmatrix}.$$
\end{problem}
\begin{proof}
This can be shown in two ways.
\textbf{By uniqueness.} We have $\mathbf{y} = c_1\mathbf{v}_1 + c_2\mathbf{v}_2 = c_2\mathbf{v}_2 + c_1\mathbf{v}_1$, so $\mathbf{y}$ has coefficients $c_2, c_1$ on the ordered list $\mathbf{v}_2, \mathbf{v}_1$. Coordinates are unique (the Theorem above), so these are the $\beta'$-coordinates.
\textbf{Algebraically.} Writing a linear combination as a matrix-vector product, $\big[\mathbf{y}\big]_\beta$ is the unique solution of $\begin{bmatrix} \mathbf{v}_1 & \mathbf{v}_2 \end{bmatrix}\mathbf{c} = \mathbf{y}.$ The swap matrix
$$P = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$$
satisfies $\begin{bmatrix} \mathbf{v}_1 & \mathbf{v}_2 \end{bmatrix}P = \begin{bmatrix} \mathbf{v}_2 & \mathbf{v}_1 \end{bmatrix}$ and $P^2 = I$, so by associativity
$$\begin{bmatrix} \mathbf{v}_2 & \mathbf{v}_1 \end{bmatrix}\Big(P\big[\mathbf{y}\big]_\beta\Big)
= \begin{bmatrix} \mathbf{v}_1 & \mathbf{v}_2 \end{bmatrix}P^2\big[\mathbf{y}\big]_\beta
= \begin{bmatrix} \mathbf{v}_1 & \mathbf{v}_2 \end{bmatrix}\big[\mathbf{y}\big]_\beta = \mathbf{y}.$$
Hence $P\big[\mathbf{y}\big]_\beta$ solves the coordinate equation for $\beta'$ and
$$\big[\mathbf{y}\big]_{\beta'} = P\,\big[\mathbf{y}\big]_\beta = \begin{bmatrix} c_2 \\ c_1 \end{bmatrix}.$$
\end{proof}
\begin{example}
Let $\alpha = \{\mathbf{e}_1, \mathbf{e}_2\}$ be the standard (canonical) basis of $\R^2$. For any $\mathbf{y}$,
$$\mathbf{y} = \begin{bmatrix} y_1 \\ y_2 \end{bmatrix} = y_1\begin{bmatrix} 1 \\ 0 \end{bmatrix} + y_2\begin{bmatrix} 0 \\ 1 \end{bmatrix} = y_1\mathbf{e}_1 + y_2\mathbf{e}_2,$$
so the coordinates of $\mathbf{y}$ with respect to $\alpha$ are just its entries: $\big[\mathbf{y}\big]_\alpha = \mathbf{y}$.
\end{example}
\subsection*{Computing the new coordinates}
Given $\mathbf{y} = \big[\mathbf{y}\big]_\alpha$, how do we find $\big[\mathbf{y}\big]_\beta$? By definition we want $c_1, c_2$ with $c_1\mathbf{v}_1 + c_2\mathbf{v}_2 = \mathbf{y}$. This is a linear system, which we can write as
$$\begin{bmatrix} \mathbf{v}_1 & \mathbf{v}_2 \end{bmatrix}\begin{bmatrix} c_1 \\ c_2 \end{bmatrix} = \mathbf{y}.$$
\begin{definition}
For a basis $\beta = \{\mathbf{v}_1, \mathbf{v}_2\}$ of $\R^2$, the \textbf{basis matrix} is the $2\times 2$ matrix $M_\beta = \begin{bmatrix} \mathbf{v}_1 & \mathbf{v}_2 \end{bmatrix}$ whose columns are the basis vectors. Its inverse
$$M_{\beta\leftarrow\alpha} = M_\beta^{-1}$$
is called the \textbf{change of coordinates matrix} from the standard basis $\alpha$ to the basis $\beta$.
\end{definition}
With this notation, the system above reads $M_\beta\big[\mathbf{y}\big]_\beta = \big[\mathbf{y}\big]_\alpha$. Since $\mathbf{v}_1, \mathbf{v}_2$ are linearly independent, $M_\beta$ is invertible, and multiplying both sides by $M_\beta^{-1}$ gives the main result.
\begin{theorem}
Let $\alpha$ be the standard basis of $\R^2$ and $\beta = \{\mathbf{v}_1, \mathbf{v}_2\}$ any basis of $\R^2$. For every $\mathbf{y} \in \R^2$,
$$\big[\mathbf{y}\big]_\beta = M_{\beta\leftarrow\alpha}\big[\mathbf{y}\big]_\alpha = M_\beta^{-1}\,\mathbf{y}.$$
\end{theorem}
\begin{remark}
Because the inverse is an involution (the inverse of the inverse is the original matrix), given the $\beta$-coordinates, the standard ones are $\big[\mathbf{y}\big]_\alpha = M_\beta\big[\mathbf{y}\big]_\beta$, which is just $c_1\mathbf{v}_1 + c_2\mathbf{v}_2$. So $M_\beta$ is itself a change of coordinates matrix, $M_{\alpha\leftarrow\beta} = M_\beta$, and the two directions are inverses of each other:
$$\mathbf{y} = \big[\mathbf{y}\big]_\alpha
\;\;\mathrel{\begin{array}{c}
\xrightarrow{\quad \textstyle M_{\beta\leftarrow\alpha} \,=\, M_\beta^{-1} \quad} \\[-2pt]
\xleftarrow[\quad \textstyle M_{\alpha\leftarrow\beta} \,=\, M_\beta \quad]{}
\end{array}}\;\;
\big[\mathbf{y}\big]_\beta.$$
\end{remark}
\begin{remark}
The above object is called a \textit{commutative diagram} and is read as follows. The arrows define the mapping from the input object (at the tail) to the output object (at the tip). Furthermore, you can navigate through any path (or around and around). We say the diagram \textit{commutes} because any path that starts and ends at the same points leads to the same result. This is illustrated more clearly in the next section.
\end{remark}
For a $2\times 2$ matrix the inverse is explicit: whenever $ad - bc \neq 0$,
$$M_\beta = \begin{bmatrix} a & b \\ c & d \end{bmatrix} \quad\Longrightarrow\quad M_\beta^{-1} = \frac{1}{ad-bc}\begin{bmatrix} \phantom{-}d & -b \\ -c & \phantom{-}a \end{bmatrix}.$$
This is exactly the computation shown live under the graph.
\begin{example}
Take
$$\mathbf{v}_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \qquad \mathbf{v}_2 = \begin{bmatrix} -2 \\ \phantom{-}1 \end{bmatrix}, \qquad \mathbf{y} = \begin{bmatrix} -2 \\ \phantom{-}4 \end{bmatrix}.$$
The basis matrix is
$$M_\beta = \begin{bmatrix} 1 & -2 \\ 1 & \phantom{-}1 \end{bmatrix}, \qquad \det M_\beta = 1\cdot 1 - (-2)\cdot 1 = 3,$$
so
$$M_{\beta\leftarrow\alpha} = M_\beta^{-1} = \frac{1}{3}\begin{bmatrix} \phantom{-}1 & 2 \\ -1 & 1 \end{bmatrix}
\qquad\text{and}\qquad
\big[\mathbf{y}\big]_\beta = \frac{1}{3}\begin{bmatrix} \phantom{-}1 & 2 \\ -1 & 1 \end{bmatrix}\begin{bmatrix} -2 \\ \phantom{-}4 \end{bmatrix} = \frac{1}{3}\begin{bmatrix} 6 \\ 6 \end{bmatrix} = \begin{bmatrix} 2 \\ 2 \end{bmatrix}.$$
We can check this directly:
$$2\mathbf{v}_1 + 2\mathbf{v}_2 = \begin{bmatrix} 2 \\ 2 \end{bmatrix} + \begin{bmatrix} -4 \\ \phantom{-}2 \end{bmatrix} = \begin{bmatrix} -2 \\ \phantom{-}4 \end{bmatrix} = \mathbf{y}.$$
\end{example}
\subsection*{Going between any two bases}
So far we have only gone from the standard basis $\alpha$ to a new basis $\beta$. To go between two general bases $\beta = \{\mathbf{v}_1, \mathbf{v}_2\}$ and $\beta' = \{\mathbf{w}_1, \mathbf{w}_2\}$, we simply apply two transformations (stopping at the standard basis along the way). Multiplying by $M_\beta$ takes $\beta$-coordinates to standard coordinates (since $M_\beta\big[\mathbf{y}\big]_\beta = \mathbf{y}$), and multiplying by $M_{\beta'}^{-1}$ takes standard coordinates to $\beta'$-coordinates:
$$\begin{CD}
\big[\mathbf{y}\big]_\beta @>{\qquad \textstyle M_{\beta'\leftarrow\beta} \qquad}>> \big[\mathbf{y}\big]_{\beta'} \\
@V{\textstyle M_\beta}VV @AA{\textstyle M_{\beta'}^{-1}}A \\
\mathbf{y} @= \mathbf{y}
\end{CD}$$
As mentioned in an earlier remark, we say this diagram \textit{commutes} as going down, across, and up is the same as going straight across the top. In other words, we may compose our operations (equivalently multiplying the matrices), which gives $M_{\beta'\leftarrow\beta}$.
\begin{theorem}
Let $\beta$ and $\beta'$ be bases of $\R^2$. For every $\mathbf{y} \in \R^2$,
$$\big[\mathbf{y}\big]_{\beta'} = M_{\beta'\leftarrow\beta}\big[\mathbf{y}\big]_\beta, \qquad \text{where } M_{\beta'\leftarrow\beta} = M_{\beta'}^{-1}M_\beta,$$
and in the other direction,
$$\big[\mathbf{y}\big]_\beta = M_{\beta\leftarrow\beta'}\big[\mathbf{y}\big]_{\beta'}, \qquad \text{where } M_{\beta\leftarrow\beta'} = M_\beta^{-1}M_{\beta'} = \big(M_{\beta'\leftarrow\beta}\big)^{-1}.$$
\end{theorem}
\begin{proof}
Both coordinate vectors describe the same $\mathbf{y}$, so $M_{\beta'}\big[\mathbf{y}\big]_{\beta'} = \mathbf{y} = M_\beta\big[\mathbf{y}\big]_\beta$. Multiplying on the left by $M_{\beta'}^{-1}$ gives the first formula, and by $M_\beta^{-1}$ gives the second.
\end{proof}
\begin{remark}
None of the theory so far required $\R^2.$ All the results generalize to $\R^n$ by just bulding similar $(n \times n)$ \textbf{basis matrices} and inverting as necessary.
\end{remark}
Let's conclude with a final example, going between two bases.
\begin{example}
Keep $\beta$ and $\mathbf{y}$ from the previous example, where we found $\big[\mathbf{y}\big]_\beta$ has entries $2, 2$, and let $\beta' = \{\mathbf{w}_1, \mathbf{w}_2\}$ with
$$\mathbf{w}_1 = \begin{bmatrix} \phantom{-}1 \\ -1 \end{bmatrix}, \qquad \mathbf{w}_2 = \begin{bmatrix} -4 \\ \phantom{-}6 \end{bmatrix}, \qquad M_{\beta'} = \begin{bmatrix} \phantom{-}1 & -4 \\ -1 & \phantom{-}6 \end{bmatrix}, \qquad M_{\beta'}^{-1} = \frac{1}{2}\begin{bmatrix} 6 & 4 \\ 1 & 1 \end{bmatrix}.$$
Then
$$M_{\beta'\leftarrow\beta} = M_{\beta'}^{-1}M_\beta = \frac{1}{2}\begin{bmatrix} 6 & 4 \\ 1 & 1 \end{bmatrix}\begin{bmatrix} 1 & -2 \\ 1 & \phantom{-}1 \end{bmatrix} = \frac{1}{2}\begin{bmatrix} 10 & -8 \\ 2 & -1 \end{bmatrix},
\qquad
\big[\mathbf{y}\big]_{\beta'} = \frac{1}{2}\begin{bmatrix} 10 & -8 \\ 2 & -1 \end{bmatrix}\begin{bmatrix} 2 \\ 2 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}.$$
We never had to compute $\mathbf{y}$ itself, but we can check against it:
$$2\mathbf{w}_1 + \mathbf{w}_2 = \begin{bmatrix} \phantom{-}2 \\ -2 \end{bmatrix} + \begin{bmatrix} -4 \\ \phantom{-}6 \end{bmatrix} = \begin{bmatrix} -2 \\ \phantom{-}4 \end{bmatrix} = \mathbf{y}.$$
Going back the other way,
$$M_{\beta\leftarrow\beta'} = M_\beta^{-1}M_{\beta'} = \frac{1}{3}\begin{bmatrix} \phantom{-}1 & 2 \\ -1 & 1 \end{bmatrix}\begin{bmatrix} \phantom{-}1 & -4 \\ -1 & \phantom{-}6 \end{bmatrix} = \frac{1}{3}\begin{bmatrix} -1 & 8 \\ -2 & 10 \end{bmatrix},
\qquad
\frac{1}{3}\begin{bmatrix} -1 & 8 \\ -2 & 10 \end{bmatrix}\begin{bmatrix} 2 \\ 1 \end{bmatrix} = \begin{bmatrix} 2 \\ 2 \end{bmatrix} = \big[\mathbf{y}\big]_\beta,$$
as expected.
\end{example}