Given a matrix with an unspecified column and its REF form, how do I find the unspecified column? I'm trying to prepare for my final exams in linear algebra, and I came across the following problem:


*

*In this problem you are given the matrix A = [a1 a2 a3 a4 a5 a6], with the fourth column
unspeciﬁed, and its reduced echelon form R:
       1  -7  4  a  5  2
      -1   7  2  b  2 -1
       2 -14  3  c  3  2
       3 -21 -2  d  1  6

and 
          1 -7  0  -3  0  1
          0  0  1   2  0 -1
          0  0  0   0  1  1
          0  0  0   0  0  0

(Sorry about the formatting, I don't know how else to write the matrix on the computer).
The question asks "what is a4? (That is, find a,b,c, and d).
I tried row-reducing A and solving for a,b,c, and d afterwards, but I feel like there should be an easier way. How else can I do this?
 A: Linear relations between the columns of a matrix and the columns of its reduced row echelon form are preserved. More specifically, let $A$ be some matrix with echelon form $R$. Let $\{\mathbf{a}_i\}$ denote the set of columns of $A$ and $\{\mathbf{r}_i\}$ denote the columns of $R$. Then for any set of scalar coefficients $\{c_i\}$ we have
$$c_1\mathbf{a}_1 + c_2\mathbf{a}_2 + \cdots + c_n\mathbf{a}_n = \mathbf{0} \iff c_1\mathbf{r}_1 + c_2\mathbf{r}_2 + \cdots + c_n\mathbf{r}_n = \mathbf{0}$$
Using this fact, your problem admits a simple solution. Notice that in your reduced row echelon form, the fourth column is $-3$ times the first column plus $2$ times the second column, i.e.
$$-3\mathbf{r}_1 + 2\mathbf{r}_3 - \mathbf{r}_4 = \mathbf{0}$$
From our previous discussion, this happens if and only if
$$-3\mathbf{a}_1 + 2\mathbf{a}_3 - \mathbf{a}_4 = \mathbf{0}$$
in your original matrix. In particular, this means that
$$\begin{pmatrix}a \\ b \\ c \\ d\end{pmatrix} = -3\begin{pmatrix}1 \\ -1 \\ 2 \\ 3\end{pmatrix} + 2\begin{pmatrix}4 \\ 2 \\ 3 \\ -2\end{pmatrix} = \begin{pmatrix}5 \\ 7 \\ 0 \\ -13\end{pmatrix}$$
