# Explicit Linear Transformations from $\mathbb{R}^n$ to $\mathbb{R}^m$

I'm learning Linear Algebra from Hoffman's book and I really love the abstract treatment and focus on the theory and proofs rather than computation, but I am having trouble with a few questions that actually require some sort of explicit calculations.

For an example of the style I am having trouble with (I know this is really easy):

Is there a linear transformation $T: \mathbb{R}^3 \rightarrow \mathbb{R}^2$ such that: $T(1,-1,1)=(1,0)$ and $T(1,1,1)=(0,1)$?

For this one I am not really sure where to start as the book gives no hint at an actual example. All i can think of is giving some general definition like let $\alpha \in \mathbb{R}^3$, then $T \alpha = \lambda_{1} \beta_{1} + \lambda_{2} \beta_{2}$, where $\beta_{1}, \beta_{2} \in \mathbb{R}^2$. How can I actually relate $(1,-1,1)$ to $(1,0)$ in any way?

As for another example,

If $\alpha_{1}=(1,-1), \alpha_{2}=(2,-1), \alpha_{3} =(-3,2)$ and $\beta_{1}=(1,0), \beta_{2}=(0,1), \beta_{3}=(1,1)$, is there a linear transformation $T: \mathbb{R}^2 \rightarrow \mathbb{R}^2$ such that $T\alpha_{i} = \beta_{i}$, where $1 \leq i \leq 3$?

I'm just at a loss for how to start such a question with actual computations and numbers, we have only done proofs about general theory throughout the entire course and I seem to be good at understanding how concepts interact "in the abstract", but unfortunately I don't know how to start these basic questions. A nudge in the right direction or a solution to either one of these problems would be very helpful; these aren't for homework I just want to make sure I can actually do some calculations, but apparently I don't know how.

-

Suppose you are given $k$ vectors $v_1, \dots, v_k$ in $\mathbb{R}^m$ and $k$ vectors $w_1, w_2, \dots, w_k$ in $\mathbb{R}^n$. Here are two problems:

• Determine whether or not there is a linear map $T: \mathbb{R}^m \to \mathbb{R}^n$ satisfying $T(v_j) = w_j$ for all $1 \leq j \leq k$. (Note: the answer to this is simply yes or no, not a linear transformation.)

• When the answer to the previous question is yes, to determine all linear transformations $T$ with this property, or at least one of them.

Both can be answered via a routine matrix calculation. There are lots of ways of doing this, actually, but here is one way to organize the work.

• Let $M$ denote the $j \times (m + n)$ matrix whose $j$th row is the entries of the vector $v_j$ followed by the entries of the vector $w_j$.

• Using elementary row operations, turn $M$ into a matrix $R$ in row echelon form.

The matrix $R$ is what you use to answer the above two questions.

• If there a row of $R$ whose first $m$ entries are zero, but has nonzero entries later on, then the answer to the first question above is "no". Otherwise the answer to the first question is yes.

• In this case, do the following:

• Let $A$ denote the $j \times m$ block of $R$ consisting of the first $m$ columns of $R$, and for $1 \leq j \leq n$ let $b_j$ denote the $m+j$th column of $R$, thought of as a column vector.
• Use the standard algorithm you hopefully know to find the general solution to $Ax = b_j$, with $x$ unknown, and write this general solution (with its free variables in them; use different free variables for each $j$) as a row vector $r_j$. Make these row vectors the rows of a matrix $C$. (If you aren't interested in the most general $T$ that does the job, but just want one of them, you could, for example, assign the value $0$ to any free variable that pops up in the calculation.)
• The matrix $C$ you've just made is the matrix of the most general linear transformation $T$ from $\mathbb{R}^m$ to $\mathbb{R}^n$ satisfying $T(v_j) = w_j$ for $1 \leq j \leq k$. (If $C$ has no free variables in it, then there is a unique $T$; otherwise, you get a different $T$ for each assignment of values to all those free variables.)

You should hopefully be able to see at a glance that the first step of the algorithm (producing the answer "yes" or "no") corresponds to an algorithmic version of what Henning was talking about where you are given too many vectors for a basis, and checking that any linear relations satisfied by the $v_j$'s are also satisfied by the $w_j$'s. The situation where the algorithm produces "no" is precisely when the $v_j$'s satisfy some nontrivial linear relationship that is not satisfied by the $w_j$'s.

If you want to understand why the algorithm works more formally, I will leave the details to you (it is very helpful to think these things over for oneself, if you want to understand matrix calculation). But as a series of steps to understanding the algorithm: note that finding matrix solutions $C$ to the system of vector equations $C v_j = w_j$, $1 \leq j \leq k$, is the same thing as finding matrix solutions $C$ to the matrix equation $C (v_1 | \dots | v_k) = (w_1 | \dots | w_k)$, and if you transpose both sides, this is the same as finding matrix solutions $C$ to the equation $(v_1 | \dots | v_k)^T C^T = (w_1 | \dots | w_k)^T$, and this in turn equivalent to finding the most general vector solution $x$ to each of the matrix equations $(v_1 | \dots | v_k)^T x = (\text{the$j$th column of$(w_1 | \dots | w_k)^T$)}$, for $1 \leq j \leq n$ (having done that for each $j$, put the solutions side by side to make the columns of the matrix $C^T$). If you unravel all of that in your mind, and feed it into your understanding of how you solve matrix equations $Ax = b$, it should make sense.

Here is the method in action with $k = 2$, $v_1 = (1,-1,1)$, $v_2 = (1,1,1)$, and $w_1 = (1,0)$ and $w_2 = (0,1)$. We have $$M = \begin{pmatrix} 1 & -1 & 1 & 1 & 0 \\ 1 & 1 & 1 & 0 & 1 \end{pmatrix}.$$ If I put $M$ in reduced row echelon form I get $$R = \begin{pmatrix} 1 & 0 & 1 & \frac{1}{2} & \frac{1}{2} \\ 0 & 1 & 0 & -\frac{1}{2} & \frac{1}{2} \end{pmatrix}$$ Using the standard algorithm to solve $\begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} = \begin{pmatrix} \frac{1}{2} \\ -\frac{1}{2} \end{pmatrix}$ for $x$, I find that the general solution has the form $(\frac{1}{2} - t_1, -\frac{1}{2}, t_1)$, with $t_1$ a free variable. (Note that as per the algorithm I am thinking of this solution as a row vector.)

Using the standard algorithm to solve $\begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} = \begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}$ for $x$, I find that the general solution has the form $(\frac{1}{2} - t_2, \frac{1}{2}, t_2)$, with $t_2$ a free variable. (Note that as per the algorithm I am thinking of this solution as a row vector.)

So the matrix of the most general linear transformation $T$ that does what we want is $$\begin{pmatrix} \frac{1}{2} - t_1 & -\frac{1}{2} & t_1 \\ \frac{1}{2} - t_2 & \frac{1}{2} & t_2 \end{pmatrix},$$ with $t_1$ and $t_2$ arbitrary.

In action with your second example, with $k = 3$ and $v_1 = (1, -1)$, $v_2 = (2, -1)$, and $v_3 = (-3, 2)$, and $w_1 = (1,0)$, $w_2 = (0,1)$, and $w_3 = (1,1)$, you have $$M = \begin{pmatrix} 1 & -1 & 1 & 0 \\ 2 & -1 & 0 & 1 \\ -3 & 2 & 1 & 1 \end{pmatrix}$$ which can be row reduced to $$R = \begin{pmatrix} 1 & 0 & 0 & 2 \\ 0 & 1 & 0 & 3 \\ 0 & 0 & 1 & 1 \end{pmatrix}$$ and we can see from this third row (it begins with two zeros, but has nonzero stuff after) that the answer in this case is "no".

-

This is self-study? In an actual introductory LA course, you would most certainly have done a lot of Gaussian elimination as homework. It's worth it constructing some exercises for yourself to get some proficiency (and it's not hard to construct some initial examples: just write down some systems of linear equations with random coefficients and have at it! Then figure out how to deliberately construct some nontrivial examples of systems with less than maximal rank).

That said:

In the first question, you don't actually need to do any nontrivial calculations. You know (or should know) that you can specify a linear transformation $V\to W$ completely by giving the image of every element of a basis for $V$, and the each ordered set of elements of $W$ give rise to a linear transformation. So if you can extend $(1,-1,1)$ and $(1,1,1)$ to a basis for $\mathbb R^3$ then it doesn't matter what the exercise wants you to do with them: you know it can be done. And they can be extended to a basis because they are linearly independent (a set of two vectors is independent if they are not parallel).

If you wanted to write the transformation down explicitly, the systematic approach would start by choosing a third vector to complete a basis. This is more a trial-and-error matter than a systematic procedure because most other vectors will work. (In fact one of the standard basis vectors will always work (why?)). In this case we see that our two vectors have the same first and last components, so this will be the case for any vector in their span. So if we choose any vector with different first and last component, we can open up the span to cover all of $\mathbb R^3$. So our basis consists of, for example $(1,-1,1)$, $(1,1,1)$ and $(1,0,0)$. Thus the matrix to converting from our new basis to the standard basis is $P=\pmatrix{1&1&1\\-1&1&0\\1&1&0}$. Its inverse converts from the standard basis to our chosen one. Compute it by Gaussian elimiation.

Now, decide where in $\mathbb R^2$ our third basis vector will map to. The choice is immaterial, but for computational convenience we can take it to be $(0,0)$. Thus, the matrix from the chosen basis for $\mathbb R^3$ to $\mathbb R^2$ is $Q=\pmatrix{1&0&0\\0&1&0}$, and we can now compute the matrix for the entire transformation as $QP^{-1}$.

In the second part, you have specifications for the images of too many vectors in $\mathbb R^2$ to be a basis, so there you do have to calculuate. The general plan would be to arbitrarily declare two of the $\alpha_i$s to be a basis for $\mathbb R^2$, figure out how the third is a linear combination of the two first, and then see if the $\beta_i$s fit together in the same linear combination. If they do, all is well; if they don't the three $(\alpha_i\mapsto\beta_i)$ pairs cannot possibly fit together into a linear transformation.

However, this particular exercise happens to be easier to do in reverse: Since $\beta_1$ and $\beta_2$ span the entire $\mathbb R^2$, you know that $T$, if it exists, must have rank $2$ and therefore is a bijection. So we can ask instead if its inverse can exist. What makes this easier is that it is very easy to se a linear relation between the $\beta_i$s, namely $\beta_1+\beta_2=\beta_3$. So if $T$ exists and has an inverse, then $T^{-1}(\beta_1)+T^{-1}(\beta_2)=T^{-1}(\beta_3)$ or in other words $\alpha_1+\alpha_2=\alpha_3$. But that is most definitly not the case, so $T$ cannot exist here.

-
Oh. Beat me to it! – user21436 Feb 25 '12 at 23:45
Thank you for the explanation, it is very helpful. If I wanted to describe an explicit linear transformation for question 1, how would I do it? I'm still not sure how I would actually write it out or determine what it would be. (This is additional to the fact that it simply exists). – Samuel Reid Feb 25 '12 at 23:54
@SamuelReid: The standard way of specifying a linear transformation $\mathbb R^n\to\mathbb R^m$ is by writing down its matrix. I have added a description of how to construct an appropriate matrix. – Henning Makholm Feb 26 '12 at 0:07
@HenningMakholm: Thank you very much for this explanation! My understanding of linear transformations, change of basis, and related concepts has really been cleared up. :) – Samuel Reid Feb 26 '12 at 0:13