# How to determine if b is a linear combination of a1,a2,a3 and the columns of matrix A?

a) Determine if $b$ is a linear combination of $a_1, a_2, a_3$, the columns of the matrix $A$

$A = \begin{bmatrix}4&-4&-16\\2&-1&-6\\-1&-1&2\end{bmatrix}$ and $b =\begin{bmatrix}28\\9\\-1\end{bmatrix}$

YES, it is a linear combination <-- my answer

b) If it is a linear combination, determine a non-trivial linear relation - (a non-trivial relation is three numbers which are not all three zero.) Otherwise, enter 0's for the coefficients.

___ $a_1$ + ____ $a_2$ + ____ $a_3 = b$

I got the augmented matrix after putting it in REF form, I got:

my answer --> $\begin{bmatrix}4&-4&-16&28\\0&-2&-4&10\\0&0&-8&24\end{bmatrix}$

so I got the vector equations and solved and got $x_1 = -4, x_2 = 1, x_3 = -3$

So I can't figure out what coefficents they are looking for.. Wouldn't it be $-4,1,-3$ ??

UPDATE:

Now I've gone further and took my matrix from REF (Row Eche Form) to RREF (Reduced Row Ech Form)

and got

$\begin{bmatrix}1&-1&-4&7\\0&1&2&-5\\0&0&1&-3\end{bmatrix}$ so therefore $x_1 = -4, x_2 = 1, x_3 = -3$

• If those work, then yes. If not, no. Do they? – Semiclassical Jun 15 '16 at 21:51
• Nope, says it's incorrect when I try to put them in. – Shammy Jun 15 '16 at 21:52
• You've made a mistake somewhere. You can see why if you actually add up the three vectors with your proposed coefficients. The last entry adds to $-3$ whereas it should be $-1$. – Alex R. Jun 15 '16 at 21:56
• So the answer you give works for the REF, but not for the initial matrix. Hence, check your work... – Semiclassical Jun 15 '16 at 21:57
• I didnt put it in RREF form , just in REF form. So when you say check my work do you mean that I need to put it in RREF form? – Shammy Jun 15 '16 at 22:01

I get different results.

Solution via inverse:

>> A = [ 4,-4,-16; 2,-1,-6; -1, -1, 2]
A =

4   -4  -16
2   -1   -6
-1   -1    2

>> det(A)
ans =  8
>> b = [28;9;-1]
b =

28
9
-1

>> inv(A)* b
ans =

-2
-1
-2


Solution via Gauss elimination:

>> M = [A, b]
M =

4   -4  -16   28
2   -1   -6    9
-1   -1    2   -1

>> rref(M)
ans =

1   0   0  -2
0   1   0  -1
0   0   1  -2

• Where are the coefficients of $a_1, a_2, a_3$ – Shammy Jun 15 '16 at 22:12
• One gets $x = (-2,-1,-2)^T$ as solution vector. The components are the coefficients, as $A x = (a_1, a_2, a_3) x = b$. – mvw Jun 15 '16 at 22:15
• I see the problem now, I did not make sure that above my 1 leading entries were 0's! – Shammy Jun 15 '16 at 22:16
• @Shammy That should just make the calculation of $x_1$ and $x_2$ a bit more work, but still lead to the same numbers. I guess you made some other mistake during the elimination process. – mvw Jun 15 '16 at 22:22