# Testing for linear combinations using matrices instead of vectors

I want to see if the matrix w = (1,0;0,1) is a linear combination of the matrices
v1 = (1,2;-2,1) and v2 = (3,2;-1,1) where ; denotes a new line in the matrix.

I know for example if w and v were 1xn matrices i.e vectors such as w = [1,1,1]
v1= [2,-1,3] v2=[1,1,2] then i setup a matrix with v1 and v2 as the columns and augment that with the vector w. Then row reduce to see if there is a solution. If there is a solution then w is a linear combination of v1 and v2

I don't know where to start in terms of putting the matrices v1 and v2 together and augmenting with w in order to get a system to solve..

Maybe I am going about it the wrong way? Is there a different method rather than using
w = c1v1 + c2v2 +c3v3 ... +cnvn and setting up a matrix?

Any help much appreciated

Mitch

Related Linear and Abstract Algebra News on Phys.org
Hi mitch_1211! The thing is, at this level there is no real difference between matrices and vectors. It's only the fact that matrices have a multiplication that makes matrices different from vectors.
What do I mean with this? Well, there is an 1-1 correspondance

$$\left(\begin{array}{cc} a & b\\ c & d\end{array}\right)\leftrightarrow (a,b,c,d)$$

which preserves addition and scalar multiplication. Thus for what you want to do, you can treat your matrices as vectors. For example, the matrix

$$\left(\begin{array}{cc} 1 & 0\\ 0 & 1\end{array}\right)$$

will correspond to the vector (1,0,0,1) and so on. And once you translated the matrix problem into a vector problem, you can apply all the methods your familiar with!!

NOTE: maybe you'll want more rigourous language then what I described here. The point is that

$$\phi:M_2(\mathbb{R})\rightarrow \mathbb{R}^4:\left(\begin{array}{cc} a & b\\ c & d\end{array}\right)\rightarrow (a,b,c,d)$$

is an isomorphism of vector spaces. Thus linear dependence in $M_2(\mathbb{R})$ (= the 2x2-matrices) can be completely translated to linear dependence in $\mathbb{R}^2$.

The thing is, at this level there is no real difference between matrices and vectors.
Thank you for getting back to me so quickly! I was thinking that i could probably do that, but I wasn't 100% sure the vectors wouldn't get screwed up. That makes it very simple now!

Also I had one more question, when i create a matrix A whose columns are vectors that span a vector space, i know when i reduce this matrix the columns with the leading ones will correspond to the original vectors in A that form a basis for the vector space.

I remember (i think!) that there was a similar way to find out how a vector is a linear combinations of other vectors. i.e if i have found that w is a combination of v1 v2 v3 v4 is there a way, similar to the basis method, that will tell me how w can be written in terms of the vectors v1 v2 v3 v4?

Thank you for getting back to me so quickly! I was thinking that i could probably do that, but I wasn't 100% sure the vectors wouldn't get screwed up. That makes it very simple now!

Also I had one more question, when i create a matrix A whose columns are vectors that span a vector space, i know when i reduce this matrix the columns with the leading ones will correspond to the original vectors in A that form a basis for the vector space.

I remember (i think!) that there was a similar way to find out how a vector is a linear combinations of other vectors. i.e if i have found that w is a combination of v1 v2 v3 v4 is there a way, similar to the basis method, that will tell me how w can be written in terms of the vectors v1 v2 v3 v4?
Well, you'll need to find a,b,c,d such that

$$w=av_1+bv_2+cv_3+dv_4$$

this corresponds to a system of equations which can be put into a system:

$$(v_1~v_2~v_3~v_4~|~w)$$

if you reduce this matrix and then transform it back into a system and solve it, you'll see the values of a,b,c and d.

Maybe a small example. Take w=(1,3), v1=(1,4), v2=(0,5). We need to find a and b such that

$$(1,3)=a(1,4)+b(3,5)$$

This corresponds to a system

$$\left\{\begin{array}{c}a+3b=1\\ 4a+5b=3\end{array}\right.$$

Writing this system as a matrix, we get

$$\left(\begin{array}{cc|c} 1 & 3 & 1\\ 4 & 5 & 3\\ \end{array}\right)$$

(we see that this matrix has the form $(v_1~v_2~|~w)$. Reducing this matrix and solving the associated system gives you values for a and b.

Reducing this matrix and solving the associated system gives you values for a and b.
Of course. How could i have not realised that! The whole point of setting up the (v1,v2..vn|w) system is to solve for the coefficients. I have been to wrapped up in the simple fact of "is there a solution or not" that it totally slipped my mind that the solutions are actually the coefficients!!

Thank you so much for taking the time to explain all this to me, much appreciated.

Mitch