# Change of basis in two dimensions when the basis vectors have different dimensions.

I'm reviewing some linear algebra and have come upon a question which I haven't found any satisfying answer to.

Consider a 2-dimensional plane $$V = \mathbb{R}^2$$. Any point $$x \in V$$ can be represented as a linear combination of the two basis vectors for example $$x = (1,0)x_1 + (0,1)x_2$$ in the standard basis or $$(1,1)x_1' + (0,2)x_2'$$ in another.

Now consider the vector space $$W$$ spanned by \begin{align} e_1,e_2 &= \begin{pmatrix} 1 \\ 2 \\ 1 \end{pmatrix}, \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} \end{align}

$$W$$ is also a two-dimensional vector space and any point $$x \in W$$ can be represented by $$x = x_1e_1 + x_2e_2 = \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}$$

Now, is it possible to create an isomorphism $$T : V \to W$$ to change the basis from one to another?

Since the vector spaces have the same dimension it should be possible, but proceeding by the normal change of basis routine doesn't work since we can't express $$e_1,e_2 \in W$$ in terms of the standard basis in $$\mathbb{R}^2$$.

You already have such an isomorphism: it’s $$\phi: \pmatrix{x_1\\x_2}\mapsto x_1e_1+x_2e_2.$$ To construct a matrix for this linear map, recall that the columns of a transformation matrix are the images of the basis vectors, so it’s simply $$M = \pmatrix{e_1&e_2}.$$ In fact, all of the isomorphisms between $$V$$ and $$W$$ correspond to various choices for $$e_1$$ and $$e_2$$.
To find a matrix for the inverse map $$\phi^{-1}$$, we need a matrix $$A$$ such that $$AMx=x$$, i.e., a left inverse of $$A$$. This matrix is not unique: In constructing this matrix, we are extending $$\phi^{-1}$$ to all of $$\mathbb R^3$$ and are free to choose any complement of $$W$$ in $$\mathbb R^3$$ as its kernel. A convenient choice for $$A$$ is the Moore-Penrose inverse $$(M^TM)^{-1}M^T$$ because its null space is $$W^\perp$$. However, the product of $$\pmatrix{1&0&0\\0&1&0}$$ and the matrix of any endomorphism of $$\mathbb R^3$$ that maps $$e_1$$ and $$e_2$$ onto $$(1,0,0)^T$$ and $$(0,1,0)^T$$, respectively, is also a left inverse of $$M$$.
Using your two example basis vectors, we have $$M = \pmatrix{1&0\\2&0\\1&1}.$$ A couple of its left inverses are $$(M^TM)^{-1}M^T = \pmatrix{\frac15&\frac25&0\\-\frac15&-\frac25&1} \\ \pmatrix{1&0&0\\0&1&0} \pmatrix{1&0&1\\2&0&0\\1&1&0}^{-1} = \pmatrix{0&\frac12&0\\0&-\frac12&1}.$$
You're looking for a map between $$x\in\mathbb{R}^2$$ and $$y:=\sum_i x_i e_i\in\mathbb{R}^3$$. The second expression is a vector with $$j$$th component $$\sum_i x_i e_{ij}$$, where by writing $$e_{ij}$$ instead of $$(e_{i})_{j}$$ we can now think of a matrix $$e$$. its first index can take one value for each component of $$x$$, i.e. $$2$$; similarly, the second index can take $$3$$ values, so $$e\in\mathbb{R}^{2\times 3}$$. Since $$y_j=\sum_i (e^T)_{ji}x_i$$, $$y=e^T x$$.
If you want to get $$x$$ from $$y$$, first note that $$ey=ee^T x$$ and $$ee^T\in\mathbb{R}^{2\times 2}$$, so it's tempting to try $$x=(ee^T)^{-1}ey$$. Unfortunately, $$\det ee^T=0$$, so it's not quite that simple. I'll leave it as an exercise to show the second row of $$ee^T$$ is exactly twice the first, so clearly if we delete the second row we get a result of the form $$e'y=fx$$ for $$f\in\mathbb{R}^{2\times 2}$$, where $$f$$ is invertible and $$e'$$ is $$e$$ without its second row. Then $$x=(f^Tf)^{-1}f^Te'y$$.