# Find basis given linear map and transformation matrix

Consider the linear map $$f\colon\mathbb{R}^3\to\mathbb{R}^3$$ and let $$E=\{e_1,e_2,e_3\}$$ be the standard basis of $$\mathbb{R}^3$$. We are given $$f(e_1)=2e_1+e_2+e_3, f(e_2)=-4e_1+2e_2, f(e_3)=-4e_2-2e_3$$. The task is to find basis $$A=\{a_1,a_2,a_3\}$$ and $$B=\{b_1,b_2,b_3\}$$ of $$\mathbb{R}^3$$ such that the transformation matrix from basis $$A$$ to basis $$B$$ is $$M_B^A=\begin{pmatrix}1 & 2 & 3\\4 & 5 & 6\\ 7 & 8 & 9\end{pmatrix}.$$

My idea was to use $$M_B^A=T_B^E\cdot M_E^E\cdot T_E^A,$$ where $$M_E^E$$ is the transformation matrix I can deduce from above, namely, $$M_E^E=\begin{pmatrix}2 & -4 & 0\\1 & 2 & -4\\1 & 0 & -2\end{pmatrix}.$$ And the columns of $$T_E^A$$, the change of basis matrix from basis $$A$$ to basis $$E$$, should just consist of the vectors of $$A$$ since $$E$$ is the standard basis, i.e., $$T_E^A=\begin{pmatrix}a_1 & a_2 & a_3\end{pmatrix}\in\mathbb{R}^{3\times 3}.$$ Does this help to determine $$A$$ and $$B$$?

It seems to me that I first need to determine $$T_B^E$$ but I am missing information to do so.

Do you have an idea? Maybe my ansatz is not the right idea. However, I have no alternative idea.

• I'm confused why you call $M_B^A$ the transformation matrix. Should this be depend on $f$? If I understand correctly, the bases $A$ and $B$ are not unique. Put $A=E$ and solve for $B$ (if possible). Commented Dec 22, 2023 at 13:06
• The matrix $M^A_B$ is singular, so I guess it cannot be a transformation matrix from one basis of $\mathbb R^3$ to an other. Commented Dec 22, 2023 at 14:48
• @AlexRavsky The author notation is congfusing. $M_B^A$ is the matrix of the linear transformation $f$ in the bases $(A,B)$ it is not a change of basis matrix from that basis $A$ to the basis $E$ (that would be the matrix $T_B^A$). Commented Dec 22, 2023 at 15:35

Suppose that for each $$i\in\{1,2,3\}$$ we have $$a_i=a_{i1}e_1+a_{i2}e_2+a_{i3}e_3$$ and $$b_i=b_{i1}e_1+b_{i2}e_2+b_{i3}e_3$$. Let $$M_A=\|a_{ij}\|$$ and $$M_B=\|b_{ij}\|$$. Let $$F=\|f(a_i)_j\|$$, where the components of the vectors $$f(a_i)$$ are taken in the standard basis. Following Digitallis' comment, we obtain that $$f(a_i)=a_{i1} f(e_1)+a_{i2}f(e_2)+a_{i3}f(e_3)$$ for each $$i\in\{1,2,3\}$$. Thus $$F=M_A (M^E_E)^t$$. On the other hand, $$F=(M^A_B)^t M_B$$.

So we have to find some nonsingular real $$3\times 3$$ matrices $$M_A$$ and $$M_B$$, satisfying the equality $$M_A (M^E_E)^t = (M^A_B)^t M_B.$$ This can be done, for instance, as follows. The matrix $$(M^E_E)^t$$ has rank $$2$$, so it can be transformed by a sequence of basic transformations to the diagonal matrix $$\Delta=\operatorname{diag}(1,1,0)$$. The sequence of basic transformations provides us nonsingular real $$3\times 3$$ matrices $$X$$ and $$Y$$ such that $$X(M^E_E)^tY=\Delta$$. Similarly we can find nonsingular real $$3\times 3$$ matrices $$U$$ and $$V$$ such that $$U(M^A_B)^tV=\Delta$$. Then $$X(M^E_E)^tY=U(M^A_B)^tV$$, so it suffices to put $$M_A=U^{-1}X$$ and $$M_B=VY^{-1}$$.

• What is your matrix norm $M_A=\Vert a_{ij}\Vert$? Or is $M_A$ supposed to be a matrix and not a norm? Commented Dec 23, 2023 at 9:57
• @selector $M_A$ is a $3\times 3$ matrix with the entries $a_{ij}$, similarly for $M_B$. Commented Dec 23, 2023 at 12:25

One approach to handle this question is to note that every matrix has a unique reduced row echelon form (rref): For every matrix $$A\in M_{m,n}(\mathbb{R})$$, if $$\hat{A}\in M_{m,n}(\mathbb{R})$$ is the rref of $$A$$, there exists an elementary matrix $$S\in M_m(\mathbb{R})$$ such that $$\hat{A}=SA$$.

Here $$S$$ reflect the elementary row operations needed to recover $$A$$ from $$\hat{A}$$. To obtain such $$S$$, one may consider the augmented matrix $$(A\mid I_3)$$. Observe that $$S(A\mid I_3)=(SA\mid SI_3)=(\hat{A}\mid S).$$ Then it suffices to compute the rref of $$A$$ along with the augmented matrix $$(A\mid I_3)$$.

First, we may find the rref of $$M_B^A$$:

\begin{align*} (M_B^A\mid I_3)&=\begin{pmatrix} 1 & 2 & 3 & 1 & 0 & 0 \\ 4 & 5 & 6 & 0 & 1 & 0 \\ 7 & 8 & 9 & 0 & 0 & 1 \end{pmatrix}\xrightarrow{r_3\gets r_3-r_2}\begin{pmatrix} 1 & 2 & 3 & 1 & 0 & 0 \\ 4 & 5 & 6 & 0 & 1 & 0 \\ 3 & 3 & 3 & 0 & -1 & 1 \end{pmatrix} \\ &\xrightarrow{r_2\gets r_2-r_1}\begin{pmatrix} 1 & 2 & 3 & 1 & 0 & 0 \\ 3 & 3 & 3 & -1 & 1 & 0 \\ 3 & 3 & 3 & 0 & -1 & 1 \end{pmatrix}\xrightarrow{r_3\gets r_3-r_2}\begin{pmatrix} 1 & 2 & 3 & 1 & 0 & 0 \\ 3 & 3 & 3 & -1 & 1 & 0 \\ 0 & 0 & 0 & 1 & -2 & 1 \end{pmatrix} \\ &\xrightarrow{r_2\gets r_2-3r_1}\begin{pmatrix} 1 & 2 & 3 & 1 & 0 & 0 \\ 0 & -3 & -6 & -4 & 1 & 0 \\ 0 & 0 & 0 & 1 & -2 & 1 \end{pmatrix}\xrightarrow{r_2\gets r_2/(-3)}\begin{pmatrix} 1 & 2 & 3 & 1 & 0 & 0 \\ 0 & 1 & 2 & 4/3 & -1/3 & 0 \\ 0 & 0 & 0 & 1 & -2 & 1 \end{pmatrix} \\ &\xrightarrow{r_1\gets r_1-2r_2}\begin{pmatrix} 1 & 0 & -1 & -5/3 & 2/3 & 0 \\ 0 & 1 & 2 & 4/3 & -1/3 & 0 \\ 0 & 0 & 0 & 1 & -2 & 1 \end{pmatrix}. \end{align*} This shows that $$X_1:=\begin{pmatrix} 1 & 0 & -1 \\ 0 & 1 & 2 \\ 0 & 0 & 0 \end{pmatrix}=\boxed{\begin{pmatrix} -5/3 & 2/3 & 0 \\ 4/3 & -1/3 & 0 \\ 1 & -2 & 1 \end{pmatrix}}M_B^A=:\boxed{S_1}M_B^A.$$

By similar arguments, we also have $$X_2:=\begin{pmatrix} 1 & 0 & -2 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \end{pmatrix}=\boxed{\begin{pmatrix} 1/4 & 1/2 & 0 \\ -1/8 & 1/4 & 0 \\ -1/4 & -1/2 & 1 \end{pmatrix}}M_E^E=:\boxed{S_2}M_E^E.$$

Now we may make some further observations: Here $$X_1=S_1M_B^A$$ where $$S_1,S_2$$ are non-singular, so we have $$M_B^A=S_1^{-1}X_1$$. Because $$X_1$$ and $$X_2$$ are in rref, if we can find another non-singular matrix $$T$$ such that $$X_1=X_2T$$, then $$M_B^A=S_1^{-1}X_1=S_1^{-1}X_2T=S_1^{-1}S_2M_E^ET.$$

To find such $$T$$, one can consider the dual version of our previous argument by performing elementary column operations to $$\begin{pmatrix} X_1 \\ I_3 \end{pmatrix}$$ and $$\begin{pmatrix} X_2 \\ I_3 \end{pmatrix}$$, and multiply the corresponding elementary matrices in some fashion.

In this question, however, some easy observations are sufficient as the structures of $$X_1$$ and $$X_2$$ are rather simple: $$X_1=\begin{pmatrix} 1 & 0 & -1 \\ 0 & 1 & 2 \\ 0 & 0 & 0 \end{pmatrix}=\begin{pmatrix} 1 & 0 & -2 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \end{pmatrix}\boxed{\begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 3 \\ 0 & 0 & 1 \end{pmatrix}}=X_2\boxed{T}$$

Let me explain how I found such $$T$$:

• Because the first two columns of $$X_1$$ and $$X_2$$ are identical, we can then put the first two columns of $$T$$ to be simply $$(1,0,0)^T$$ and $$(0,1,0)^T$$.

• Now since $$T$$ is supposed to be non-singular, I can put the last column to be of the form $$(x,y,1)^T$$ (here $$1$$ of course can be replaced by other real numbers). Then by solving linear systems, I got $$x=1$$ and $$y=3$$.

As a result, such $$T$$ is not necessarily unique, so it is possible for you to find different solutions.

Anyway, now we may let

$$T_B^E:=S_1^{-1}S_2=\begin{pmatrix} -5/3 & 2/3 & 0 \\ 4/3 & -1/3 & 0 \\ 1 & -2 & 1 \end{pmatrix}^{-1}\begin{pmatrix} 1/4 & 1/2 & 0 \\ -1/8 & 1/4 & 0 \\ -1/4 & -1/2 & 1 \end{pmatrix}=\boxed{\begin{pmatrix} 0 & 1 & 0 \\ 3/8 & 13/4 & 0 \\ 1/2 & 5 & 1 \end{pmatrix}}$$

and

$$T_E^A:=T=\boxed{\begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 3 \\ 0 & 0 & 1 \end{pmatrix}}.$$

As noted above, we now have

$$M_B^A=S_1^{-1}S_2M_E^ET=T_B^EM_E^ET_E^A.$$

P.S. Here are some theories: Let $$A\in M_{m,n}(\mathbb{R})$$ be of rank $$r$$. Then there exist non-singular matrices $$P\in M_m(\mathbb{R})$$ and $$Q\in M_n(\mathbb{R})$$ such that $$A=P\begin{pmatrix} I_r & 0_{r\times(n-r)} \\ 0_{(m-r)\times(n-r)} & 0_{(m-r)\times(n-r)} \end{pmatrix}Q.$$ Here $$P$$ can be obtained by performing elementary row operations to $$A$$ to find rref, and $$Q$$ can be obtained by continuing with elementary column operations.

If $$B\in M_{m,n}(\mathbb{R})$$ represents the same linear transformation as $$A$$ with respect to different bases, then the rank of $$B$$ is also equal to $$r$$, and certainly, we can find $$P\in M_m(\mathbb{R})$$ and $$Q\in M_n(\mathbb{R})$$ such that \begin{align*} B&=P'\begin{pmatrix} I_r & 0_{r\times(n-r)} \\ 0_{(m-r)\times(n-r)} & 0_{(m-r)\times(n-r)} \end{pmatrix}Q' \\ &=P'(P^{-1}AQ^{-1})Q'=\boxed{(P'P^{-1})}A\boxed{(Q^{-1}Q')}. \end{align*}