# Vector space/Change of basis/Introduction/Section

We know, due to fact, that in a finite-dimensional vector space, any two bases have the same length, the same number of vectors. Every vector has, with respect to every basis, unique coordinates (the coefficient tuple). How do these coordinates behave when we change the bases? This is answered by the following statement.

## Lemma

Let $K$ be a field, and let $V$ be a $K$-vector space of dimension $n$. Let ${\mathfrak {v}}=v_{1},\ldots ,v_{n}$ and ${\mathfrak {w}}=w_{1},\ldots ,w_{n}$ denote bases of $V$. Suppose that
    $v_{j}=\sum _{i=1}^{n}c_{ij}w_{i}\,$
with coefficients $c_{ij}\in K$, which we collect into the $n\times n$-matrix
    $M_{\mathfrak {w}}^{\mathfrak {v}}={\left(c_{ij}\right)}_{ij}\,.$
$u$
${\begin{pmatrix}s_{1}\\\vdots \\s_{n}\end{pmatrix}}$
${\mathfrak {v}}$
    ${\begin{pmatrix}t_{1}\\\vdots \\t_{n}\end{pmatrix}}=M_{\mathfrak {w}}^{\mathfrak {v}}{\begin{pmatrix}s_{1}\\\vdots \\s_{n}\end{pmatrix}}={\begin{pmatrix}c_{11}&c_{12}&\ldots &c_{1n}\\c_{21}&c_{22}&\ldots &c_{2n}\\\vdots &\vdots &\ddots &\vdots \\c_{n1}&c_{n2}&\ldots &c_{nn}\end{pmatrix}}{\begin{pmatrix}s_{1}\\\vdots \\s_{n}\end{pmatrix}}\,$
${\mathfrak {w}}$

### Proof

This follows directly from
    $u=\sum _{j=1}^{n}s_{j}v_{j}=\sum _{j=1}^{n}s_{j}{\left(\sum _{i=1}^{n}c_{ij}w_{i}\right)}=\sum _{i=1}^{n}{\left(\sum _{j=1}^{n}s_{j}c_{ij}\right)}w_{i}\,,$
and the definition of matrix multiplication.
$\Box$
The matrix $M_{\mathfrak {w}}^{\mathfrak {v}}$, which describes the base change from ${\mathfrak {v}}$ to ${\mathfrak {w}}$, is called the transformation matrix. In the $j$-th column of the transformation matrix, there are the coordinates of $v_{j}$ with respect to the basis ${\mathfrak {w}}$. When we denote, for a vector $u\in V$ and a basis ${\mathfrak {v}}$, the corresponding coordinate tuple by $\Psi _{\mathfrak {v}}(u)$, then the transformation can be quickly written as
    $\Psi _{\mathfrak {w}}(u)=M_{\mathfrak {w}}^{\mathfrak {v}}(\Psi _{\mathfrak {v}}(u))\,.$

## Example

We consider in $\mathbb {R} ^{2}$ the standard basis,
    ${\mathfrak {u}}={\begin{pmatrix}1\\0\end{pmatrix}},\,{\begin{pmatrix}0\\1\end{pmatrix}}\,,$
and the basis
    ${\mathfrak {v}}={\begin{pmatrix}1\\2\end{pmatrix}},\,{\begin{pmatrix}-2\\3\end{pmatrix}}\,.$
The basis vectors of ${\mathfrak {v}}$ can be expressed directly with the standard basis, namely
    $v_{1}={\begin{pmatrix}1\\2\end{pmatrix}}=1{\begin{pmatrix}1\\0\end{pmatrix}}+2{\begin{pmatrix}0\\1\end{pmatrix}}\,\,{\text{ and }}\,\,v_{2}={\begin{pmatrix}-2\\3\end{pmatrix}}=-2{\begin{pmatrix}1\\0\end{pmatrix}}+3{\begin{pmatrix}0\\1\end{pmatrix}}.$
Therefore, we get immediately
    $M_{\mathfrak {u}}^{\mathfrak {v}}={\begin{pmatrix}1&-2\\2&3\end{pmatrix}}\,.$
For example, the vector which has with respect to ${\mathfrak {v}}$ the coordinates $(4,-3)$, has the coordinates
    $M_{\mathfrak {u}}^{\mathfrak {v}}{\begin{pmatrix}4\\-3\end{pmatrix}}={\begin{pmatrix}1&-2\\2&3\end{pmatrix}}{\begin{pmatrix}4\\-3\end{pmatrix}}={\begin{pmatrix}10\\-1\end{pmatrix}}\,$
with respect to the standard basis ${\mathfrak {u}}$. The transformation matrix $M_{\mathfrak {v}}^{\mathfrak {u}}$ is more difficult to compute: We have to write the standard vectors as linear combinations of $v_{1}$ and $v_{2}$. A direct computation (solving two linear systems) yields
    ${\begin{pmatrix}1\\0\end{pmatrix}}={\frac {3}{7}}{\begin{pmatrix}1\\2\end{pmatrix}}-{\frac {2}{7}}{\begin{pmatrix}-2\\3\end{pmatrix}}\,$
and
    ${\begin{pmatrix}0\\1\end{pmatrix}}={\frac {2}{7}}{\begin{pmatrix}1\\2\end{pmatrix}}+{\frac {1}{7}}{\begin{pmatrix}-2\\3\end{pmatrix}}\,.$
Hence,
    $M_{\mathfrak {v}}^{\mathfrak {u}}={\begin{pmatrix}{\frac {3}{7}}&{\frac {2}{7}}\\-{\frac {2}{7}}&{\frac {1}{7}}\end{pmatrix}}\,.$