# How to find out the linear transformation from its matrix with respect to non-standard bases?

Here is one example:

Find the functional form of the linear operator $f$ on $\mathbb{R}^2$ whose matrix with respect to the basis $\mathcal{B}=\{(1,1),(1,-1)\}$ is $$\begin{bmatrix} 2 & -1\\3&5\end{bmatrix}.$$

Hint: From the first column, we can deduce that $$f(1,1) = 2 (1,1) + 3(1,-1) = (5,-1)$$ From the second column, we can deduce that $$f(1,-1) = -(1,1) + 5(1,-1) = (4,-6)$$ In the standard matrix of $f$, the first column will be $f(1,0)$, and the second column will be $f(0,1)$.

Alternatively: let $$M = \pmatrix{2&-1\\3&5}$$ We know that the matrix $$P = \pmatrix{1&1\\1&-1}$$ implements a change of basis from the standard basis to $\mathcal B$. If we take $A$ to denote the matrix that we're looking for, we have $$PM = AP \implies A = PMP^{-1}$$ which can be directly computed.

Being $f$ a linear map we have to remember that:

$$f(ax) = af(x) \\f(a+b) = f(a)+f(b)$$

The matrix representation of a linear map, after choosing a base for the domain and for the image (in our case $\mathcal{B} = \{(1,1),(1,-1)\})$ is done by evaluating the map on the basis and then writing down the resultant vector in the basis of the image: the column of the matrix are the coefficients of that vector.

## Long solution

In our case then we have that: $$f((1,1)) = 2(1,1)+3(1,-1)\\ f((1,-1)) = -1(1,1)+5(1,-1))$$ All we have to do now is to write down our basis vectors in the standard base $\mathcal{C} = \{(1,0), (0,1)\}$. This can be easily done: $$\color{red}{(1,1)} = 1(1,0)+1(0,1)\\ \color{blue}{(1,-1)} = 1(1,0)-1(0,1)$$ We can then utilise the fact that $f$ is a linear map, the first becomes $$f(\color{red}{(1,0)+(0,1)}) = 2((1,0)+(0,1))+3((1,0)-(0,1)) \\ f((1,0))+f((0,1)) = 5(1,0)-1(0,1)$$ and the second $$f(\color{blue}{(1,0)-(0,1)}) = -((1,0)+(0,1))+5((1,0)-(0,1)) \\ f((1,0))-f((0,1)) = 4(1,0)-6(0,1)$$ All we need to find now is the values of $f((0,1))$ and $f((1,0))$ which is easily done by solving the system of the fist and second equalities. Doing the calculations we get: $$2f((1,0)) = 9(1,0)-7(0,1)\\-2f((0,1)) = -(1,0)-5(0,1)$$ So the matrix in the standard base is $$[f]_{\mathcal{C}}^{\mathcal{C}} = \left(\begin{matrix} {9\over 2} & {1\over 2}\\ -{7\over 2}& {5\over 2}\end{matrix}\right)$$ The explicit representation is easily found: take a vector $\mathbf{v} = (x,y)$ then $$f(\mathbf{v}) = [f]_{\mathcal{C}}^{\mathcal{C}}\mathbf{v} = \left({9\over 2}x+{1\over 2}y, -{7\over 2}x+{5\over 2}y\right)$$

## Fast, easy, better solution

We could simply use the matrix for change of basis to find out the matrix of the function $f$ in the standard base. From the following commutative diagram $$\newcommand{\ra}{\kern-1.5ex\xrightarrow{\ \ #1\ \ }\phantom{}\kern-1.5ex} \newcommand{\ras}{\kern-1.5ex\xrightarrow{\ \ \smash{#1}\ \ }\phantom{}\kern-1.5ex} \newcommand{\da}{\bigg\downarrow\raise.5ex\rlap{\scriptstyle#1}} \begin{array}{c} \mathbb{R}^2 & \ra{[f]_{\mathcal{B}}^{\mathcal{B}}} & \mathbb{R}^2 \\ \da{[Id]^{\mathcal{B}}_{\mathcal{C}}} & & \da{[Id]^{\mathcal{B}}_{\mathcal{C}}} \\ \mathbb{R}^2 & \ras{[f]_{\mathcal{C}}^{\mathcal{C}}} & \mathbb{R}^2 \\ \end{array}$$ we can say (remember that, to put it simply, map composition goes to matrix multiplication): $$[Id]^{\mathcal{B}}_\mathcal{C}[f]^\mathcal{B}_\mathcal{B} = [f]^\mathcal{C}_{\mathcal{C}}[Id]_{\mathcal{C}}^{\mathcal{B}}$$ where $[Id]_{\mathcal{C}}^{\mathcal{B}}$ is the matrix of change of base from $\mathcal{B}$ to $\mathcal{C}$. The matrix of change of basis are invertible (the map associated with them is an isomorphism), so we can find our matrix for $f$ in the standard base $$[f]_\mathcal{C}^\mathcal{C} = [Id]_{\mathcal{C}}^{\mathcal{B}}[f]_\mathcal{C}^\mathcal{C}\left([Id]_{\mathcal{C}}^{\mathcal{B}}\right)^{-1} = [Id]_{\mathcal{C}}^{\mathcal{B}}[f]_\mathcal{C}^\mathcal{C} [Id]_{\mathcal{B}}^{\mathcal{C}}$$ where in the last step I've used the fact that $$\left([Id]_{\mathcal{C}}^{\mathcal{B}}\right)^{-1} = [Id]_{\mathcal{B}}^{\mathcal{C}}$$ that is obvious. Finding out the matrix for change of basis (and consequently it's inverse) its very simple: just write as the columns of the matrix the coefficients that define every element of one base in the other base. I'll do one for example, doing from $\mathcal{B}$ to $\mathcal{C}$: $$(1,1) = 1(1,0)+1(0,1)$$ and going the other way $$(1,0) = {1\over 2}(1,1) + {1\over 2}(1,-1)$$ Remember that you could even find only one matrix for change of base and then find the inverse! This depends on your problem: usually finding the matrix to go back in the standard base is very very easy but the opposite is not always true. Now let's write down the matrices of change of basis $$[Id]_{\mathcal{C}}^{\mathcal{B}} = \left(\begin{matrix} 1&1\\1&-1\end{matrix}\right) \\ [Id]_{\mathcal{B}}^{\mathcal{C}} = \left(\begin{matrix}{1\over 2} &{1\over 2}\\{1\over 2}&-{1\over 2}\end{matrix}\right)$$ If you do in the end the matrix multiplication you'll find the same matrix found in the long solution $$[Id]_{\mathcal{C}}^{\mathcal{B}}[f]_\mathcal{C}^\mathcal{C} [Id]_{\mathcal{B}}^{\mathcal{C}} = \left(\begin{matrix} 1&1\\1&-1\end{matrix}\right)\left(\begin{matrix}2&-1\\3&5\end{matrix}\right)\left(\begin{matrix}{1\over 2} &{1\over 2}\\{1\over 2}&-{1\over 2}\end{matrix}\right)=\left(\begin{matrix} {9\over 2} & {1\over 2}\\ -{7\over 2}& {5\over 2}\end{matrix}\right)$$ In the same way as before, you'll find the explicit form of the map

Let consider the matrix

$$M=\begin{bmatrix} 1 & 1\\1&-1\end{bmatrix}$$

which represents the change of basis form the basis $\mathcal{B}$ to the standard basis, therefore from

$$w_\mathcal{B}= A v_\mathcal{B}\quad w_\mathcal{B}= \begin{bmatrix} 2 & -1\\3&5\end{bmatrix}v_\mathcal{B}$$

and

• $w=M w_\mathcal{B}\implies w_\mathcal{B}=M^{-1} w$

• $v=M v_\mathcal{B}\implies v_\mathcal{B}=M^{-1} v$

we have

$$w_\mathcal{B}= A v_\mathcal{B}$$

$$M^{-1} w= A M^{-1} v$$

$$w= MA M^{-1} v$$