# Find a Matrix that Maps Given Vectors to Given Vectors

## Problem 44

Suppose that a real matrix $A$ maps each of the following vectors
$\mathbf{x}_1=\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}, \mathbf{x}_2=\begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix}, \mathbf{x}_3=\begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}$ into the vectors
$\mathbf{y}_1=\begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix}, \mathbf{y}_2=\begin{bmatrix} -1 \\ 0 \\ 3 \end{bmatrix}, \mathbf{y}_3=\begin{bmatrix} 3 \\ 1 \\ 1 \end{bmatrix},$ respectively.
That is, $A\mathbf{x}_i=\mathbf{y}_i$ for $i=1,2,3$.
Find the matrix $A$.

(Kyoto University Exam)

Contents

We will give two solutions.

## Solution 1

By the condition that $A\mathbf{x}_i=\mathbf{y}_i$, we have a matrix equality $A[\mathbf{x}_1 \mathbf{x}_2 \mathbf{x}_3]=[\mathbf{y}_1 \mathbf{y}_2 \mathbf{y}_3]$.
Explicitly we have
$A\begin{bmatrix} 1 & 0 & 0 \\ 1 &1 &0 \\ 1 & 1 & 1 \end{bmatrix} =\begin{bmatrix} 1 & -1 & 3 \\ 2 &0 &1 \\ 0 & 3 & 1 \end{bmatrix}.$ To find the matrix $A$, we find the inverse matrix of $\begin{bmatrix} 1 & 0 & 0 \\ 1 &1 &0 \\ 1 & 1 & 1 \end{bmatrix}$ and multiply on the right by it.

We use Gauss-Jordan elimination to transform the augmented matrix $[A|I]$ into $[I|A^{-1}]$.
We have
\begin{align*}
\left[\begin{array}{rrr|rrr}
1 & 0 & 0 & 1 &0 & 0 \\
1 & 1 & 0 & 0 & 1 & 0 \\
1 & 1 & 1 & 0 & 0 & 1 \\
\end{array}\right] \xrightarrow[R_3-R_1]{R_2-R_1}
\left[\begin{array}{rrr|rrr}
1 & 0 & 0 & 1 &0 & 0 \\
0 & 1 & 0 & -1 & 1 & 0 \\
0 & 1 & 1 & -1 & 0 & 1 \\
\end{array}\right]\\
\xrightarrow{R_3-R_2}
\left[\begin{array}{rrr|rrr}
1 & 0 & 0 & 1 &0 & 0 \\
0 & 1 & 0 & -1 & 1 & 0 \\
0 & 0 & 1 & 0 & -1 & 1 \\
\end{array}\right].
\end{align*}

Thus the inverse matrix is
$\begin{bmatrix} 1 &0 & 0 \\ -1 & 1 & 0 \\ 0 & -1 & 1 \\ \end{bmatrix}.$ Hence we have
\begin{align*}
A &=\begin{bmatrix}
1 & -1 & 3 \\
2 &0 &1 \\
0 & 3 & 1
\end{bmatrix}
\begin{bmatrix}
1 &0 & 0 \\
-1 & 1 & 0 \\
0 & -1 & 1 \\
\end{bmatrix}
=
\begin{bmatrix}
2 & -4 & 3 \\
2 &-1 &1 \\
-3 & 2 & 1
\end{bmatrix}.
\end{align*}

## Solution 2

Note that in general $A$ is a matrix whose $i$-th column is the image of the $i$-th unit vector $\mathbf{e}_i$.
For given vectors $\mathbf{x}_i$, it is easy to see that
\begin{align*}
\mathbf{e}_1 &=\mathbf{x}_1-\mathbf{x}_2 \\
\mathbf{e}_2 &=\mathbf{x}_2-\mathbf{x}_3 \\
\mathbf{e}_3 &=\mathbf{x}_3.
\end{align*}

Thus we have
\begin{align*}
A\mathbf{e}_1=A\mathbf{x}_1-A\mathbf{x}_2=\mathbf{y}_1-\mathbf{y}_2=\begin{bmatrix}
2 \\
2 \\
-3
\end{bmatrix}.
\end{align*}
Similarly, we obtain
\begin{align*}
A\mathbf{e}_2=\begin{bmatrix}
-4 \\
-1 \\
2
\end{bmatrix},
\text{ and }
A\mathbf{e}_3=\begin{bmatrix}
3 \\
1 \\
1
\end{bmatrix}.
\end{align*}

Therefore we have
$A=[A\mathbf{e}_1 \, A\mathbf{e}_2 \, A\mathbf{e}_3]= \begin{bmatrix} 2 & -4 & 3 \\ 2 &-1 &1 \\ -3 & 2 & 1 \end{bmatrix}.$ Of course, this agrees with the answer of Solution 1.

## Comment.

This is a typical problem in linear algebra, but if you noticed the second approach then you could save time in the exam.

Once you obtained the matrix $A$, you can check whether you computed right by calculating $A\mathbf{x}_i$ with your $A$ and see if it is equal to the vector $\mathbf{y}_i$.

### 2 Responses

1. Bastien Girschig says:

Hi! Thanks for the nice problem and explanations, however I think there is a mistake in solution 2.

Shouldn’t it say:
e1=y1−y2
e2=y2−y3
e3=y3

e1=x1−x2
e2=x2−x3
e3=x3

• Yu says:

Dear Bastien Girschig,

I rechecked the solution and it is correct. Let me clarify here.
Since $\mathbf{x}_1=\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}, \mathbf{x}_2=\begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix}$ and $\mathbf{e}_1 = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}$, we have
$\mathbf{e}_1 = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} – \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix} =\mathbf{x}_1 = \mathbf{x}_2.$
The rest are similar. I hope this helps.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

##### Find All Matrices Satisfying a Given Relation

Let $a$ and $b$ be two distinct positive real numbers. Define matrices \[A:=\begin{bmatrix} 0 & a\\ a & 0 \end{bmatrix},...

Close