# About the matrix of two linear transformations

I have an exercise to answer, and I don't know if I've done it the right way. This is only a little part of the exercise, but I have to know if what I've done so far is correct. Here we go:

Let $V$ be a $K$-vector space and $\dim(V)=4$. Let $B_{1}=(u_1,u_2,u_3,u_4)$ be a basis of $V$. Let $W$ be a $K$-vector space and $\dim(W)=3$. Let $B_{2}=(v_1,v_2,v_3)$ be a basis of $W$.

Let $f,g$ be linear transformations such that:

\begin{equation*} f : V \rightarrow W ,\\ g : W \rightarrow W , \end{equation*}

defined by $f(\lambda_1u_1+\lambda_2u_2+\lambda_3u_3+\lambda_4u_4)=(2\lambda_1+4\lambda_2+5\lambda_3-\lambda_4)v_1+(-\lambda_1+\lambda_2-\lambda_3-\lambda_4)v_2+(\lambda_1+\lambda_2+2\lambda_3+a\lambda_4)v_3$

and

$g(\mu_1v_1+\mu_2v_2+\mu_3v_3)=(\mu_1+3\mu_2+2\mu_3)v_1+(2\mu_1+\mu_2+3\mu_3)v_2+(3\mu_1+2\mu_2+\mu_3)v_3$

with $a \in K$.

Now I have to find the matrix of $f$ with the basis $B_1$ on the start and $B_2$ on the end, this is:$M(f,B_1,B_2)$, and the matrix of $g$ with the basis $B_2$ on the start and $B_2$ on the end, this is:$M(g,B_2,B_2)$. and then, the matrix of $g \circ f$ on $B_1$ and $B_2$.

What I have done is, for example with $f$ (with $g$ I think that I have to do it the same way), to write it like this, using that $f$ is linear:

$\lambda_1f(u_1)+\lambda_2f(u_2)+\lambda_3f(u_3)+\lambda_4f(u_4)= \lambda_1(2v_1-v_2+v_3)+\lambda_2(4v_1+v_2+v_3)+\lambda_3(5v_1-v_2+2v_3)+\lambda_4(-v_1-v_2+av_3)$,

and then I saw the relation $f(u_1)=2v_1-v_2+v_3, f(u_2)=4v_1+v_2+v_3, \dots$

Is that right? Thank you!

## 1 Answer

You can find the matrix of the maps with respect to the bases by both ways: if you know how coordinates of the result can be obtained from the coordinates of an input, and if you know how elements of the basis in the domain are mapped to vectors in the codomain (that is what you have done).

This is a matter of convention though the convention is almost uniform. It is that a vector with coordinates is expressed as the row of the coordinates, for instance, $$\vec x=\left(\begin{matrix}\lambda_1\\\lambda_2\\\lambda_3\\\lambda_4\end{matrix}\right),\vec y=\left(\begin{matrix}\mu_1\\\mu_2\\\mu_3\end{matrix}\right)$$ and in order to get $\vec y$ from $\vec x$, you just multiply it by the matrix: $\vec y=A\vec x.$ The matrix has dimension of $3\times4$, so when you can multiply it by a $4$-row from the right to get a $3$-row.

The actual formula should be known, but I will write it down $$\mu_i=a_{i1}\lambda_1+a_{i2}\lambda_2+a_{i3}\lambda_3+a_{i4}\lambda_4,$$ where $i=1,2,3,4.$

The convention about the bases is different when you want to know how the bases are mapped you use the column of the elements of the bases and you multiply the matrix from the left: $$(v_1,v_2,v_3)=(u_1,u_2,u_3,u_4)A.$$ And the explicit formula is $$u_j=a_{1j}v_1+a_{2j}v_2+a_{3j}v_3.$$

Thus, the first method involving coordinates describes columns of the matrix by the coefficients before the coordinates. The second method shows rows as coordinates before the vectors of the basis.

• Thanks. Then, if I take the coordinates of $f(u_1), f(u_2), f(u_3), f(u_4)$, i.e. ${(2,-1,1),(4,1,1),(5,-1,2),(-1,-1,a)}$ and I put this coordinates in column, the matrix of the application is the correct one? Commented Mar 9, 2014 at 11:28