Finding a linear combination of a linear combination of vectors

linear algebravectors

Problem

Assume $\vec x, \ \vec y$ are linearly independent.

Let $\vec a = 3\vec x + 6\vec y$ and $\vec b = 9 \vec x + 21\vec y$.

Find an expression for $\vec x + \vec y$ as a linear combination of $\vec a, \vec b$.

I.e., find $c_1, \ c_2 \ \in \ \mathbb R$ such that $\vec x + \vec y = c_1\vec a + c_2\vec b$.

Progress

I have two different answers from two different methods, and I'm not sure which one is right (if any).

Method 1

(Assume all variables are vectors so I don't have to type \vec a bajillion times.)

We have the equations

$$\begin{align}
3x + 6y &= a \\
9x + 21y &= b
\end{align}$$

This gives us the coefficient matrix

$$\begin{bmatrix}
3 & 6 & a \\
9 & 21 & b
\end{bmatrix}$$

whose reduction I've found to be

$$\begin{bmatrix}
1 & 0 & -\frac53a + \frac23b \\
0 & 1 & -a + \frac13 b
\end{bmatrix}$$

Adding the two rows, we get the equation

$$x+y = -\frac83a + b$$

which is my first attempt.

Method 2

This time I used the initial equations

$$\begin{align}
\vec a &= 3x + 6y \\
\vec b &= 9x + 21y\end{align}$$

and found $3a = 9x + 18y$ so that $b-3a = 3y \ \Rightarrow \ y = -a + \frac13b$ by eliminating the $x$ term

and then doing the same with the $y$ term by adding $-\frac72$ of the first equation to the second, giving $x = \frac73 a – \frac32 b$.

Now

$$x+y = \frac43a – \frac76 b$$

which is different from the result of method 1.

Question

One (or both) of these must be wrong.

  1. Is there a way to verify a potential solution here like we do with regular systems of equations?

  2. Which of my methods went awry? I smell careless mistakes in both of them to be honest.

Best Answer

Eliminate the $x$ term in row two by replacing row two with (row two minus three times row one). $$ \boxed{\begin{align*} 3x + 6y &= a \\ (9x + 21y) - 3(3x + 6y) &= (b) - 3(a) \end{align*}} \implies \boxed{\begin{align*} 3x + 6y &= a \\ 3y &= -3a + b \end{align*}} $$ Conveniently, the coefficients of $x$ and $y$ will match if we just replace row one with (row one minus row two). $$ \boxed{\begin{align*} (3x + 6y) - (3y) &= (a) - (-3a + b) \\ 3y &= a - 3b \end{align*}} \implies \boxed{\begin{align*} 3x + 3y &= 4a - b \\ 3y &= a - 3b \end{align*}} $$ Finally, scale row one by a factor of a third to obtain: $$ \boxed{\begin{align*} \frac{1}{3}(3x + 3y) &= \frac{1}{3}(4a - b) \\ 3y &= a - 3b \end{align*}} \implies \boxed{\begin{align*} x + y &= \frac{4}{3}a - \frac{1}{3} b \\ 3y &= a - 3b \end{align*}} $$ We can check by substitution: \begin{align*} \frac{4}{3}a - \frac{1}{3} b &= \frac{4}{3}(3x + 6y) - \frac{1}{3} (9x + 21y) \\ &= (4x + 8y) + (-3x + -7y) \\ &= x + y \end{align*}

Related Question