3: Vector Spaces, Linear Independence and Spanning sets.

Topics for this lecture:

As a vector equation, this is the question of whether we can solve the following:
/ 1 \ / 1 \ / -1 \ / 0 \ / 1 \
| 1 | x + | 0 | y + | 1 | z + | 0 | w = | 2 |
| 0 | | 1 | | -1 | | 1 | | 3 |
\ 0 / \ 1 / \ 0 / \ 1 / \ 4 /

Remember that (1,1,0,0)4=4(1,1,0,0)=(4,4,0,0), and (1,1,0,0)x=x(1,1,0,0)=(x,x,0,0), so the above means that
/ x \ / y \ / -z \ / 0 \ / 1 \
| x | + | 0 | + | z | + | 0 | = | 2 |
| 0 | | y | | -z | | w | | 3 |
\ 0 / \ y / \ 0 / \ w / \ 4 /

Next, rememember how to add vectors, eg (1,2,3)+(3,4,5)=(1+3,2+4,3+5)=(4,6,8). So we get:
/ x + y - z \ / 1 \
| x w | = | 2 |
| y - z + w | | 3 |
\ y + w / \ 4 /

Next, two vectors are equal only if corresponding entries are all equal. Eg (a,b,c)=(1,2,3) means a=1, b=2, c=3. So we get:
x + y - z = 1
x w = 2
y - z + w = 3
y + w = 4

This is a linear system, so to solve it, we write an augemented matrix, and reduce to echelon form:
/ 1 1 -1 0 | 1 \
| 0 0 0 1 | 2 |
| 0 1 -1 1 | 3 |
\ 0 1 0 1 | 4 /

Multiplication of a matrix and a vector: the equation Ax=b


The new notation for the above problem is the following:
/ 1 1 -1 0 \ / x \ / 1 \
| 0 0 0 1 | | y | = | 2 |
| 0 1 -1 1 | | z | | 3 |
\ 0 1 0 1 / \ w / \ 4 /

In this notation, the vector tells you what the entries in each column represent. So this tells you that the first column means "x"s, the second column means "y"s, the third column means "z"s, and the fourth column means "w"s. So when you multiply a matrix by a vector, the number of columns of the matrix is the same as the number of rows of the vector. The vector it's equal to must tell you the result of each row of the matrix, so it has the same number of rows as the number of rows of the matrix.
Compare the above matrix vector equation with the augmented matrix. The main difference is that you can see what the columns represent in the matrix notation. This means it's easier to change what they represent, and change the amounts of x, y, z, w, to get a different result. This is starting to view a linear system as a transformation.
The title of this section of the book is "The equation Ax=b". A is a matrix, and b and x are vectors, ie, strings of numbers, not just single numbers. In the example here,
A = / 1 1 -1 0 \ ,x = / x \ and b = / 1 \
| 0 0 0 1 | | y | | 2 |
| 0 1 -1 1 | | z | | 3 |
\ 0 1 0 1 / \ w / \ 4 /

This is not very good notation in this case, since the x that means the whole vector is definitely not the same as the x inside the vector.

example: mining company


This is example 2.1 27 in the text book.
The following table shows how much copper and silver a mining company can get from it's two mines in one working day.
One day's opperation of: Amount of copper (tonnes) amount of silver(kg)
mine 1 20 550
mine 2 30 500
If we define the vectors v1 and v2 by
v1 = / 20 \ , v2 = / 30 \
\ 550 / \ 500 /

So v1 gives the output of mine one in one day, and v2 gives the output of mine two in one day. 3v2=3(30,500)=(90,1500) gives the output of v2 over 3 days.
ProblemHow can we get 150 tonnes of copper and 2825 kg of silver?
This is represented by the vector equation:
/ 20 \ x + / 30 \ = / 150 \
\ 550 / \ 500 / \ 2825 /
To solve, we write the augmented matrix:
/ 20 30 | 150 \
\ 550 500 | 2825 /
and row reduce until you get the answer.
The vector notation is nice, since it makes you think of how the problem is about adding together the stuff from mine one over a certain number of days to the stuff from mine two over a certain number of days.
As a matrix equation, it looks like:
/ 20 30 \ / x \ = / 150 \
\ 550 500 / \ y / \ 2825 /

We can write out other problems, eg, how to get 50 tonnes of copper and 1050kg silver:
/ 20 30 \ / x \ = / 50 \
\ 550 500 / \ y / \ 1050 /

Or we can ask questions like "what do we get if we run mine one for 1 day and mine 2 for 2 days?":
/ 20 30 \ / 1 \ = / c \
\ 550 500 / \ 2 / \ s /

We can easily change what the problem is about by changing the vectors involved.
Questions
Calculate the following, and say what the result means:
/ 20 30 \ / 2 \
\ 550 500 / \ 2 /
/ 20 30 \ / 3 \
\ 550 500 / \ 1 /
/ 20 30 \ / 1 \
\ 550 500 / \ 0 /

How to calculate Ax=b


The following gives the formular for 2 by 2 matrices (2 rows, 2 columns):
/ a b \ / x \ = / ax+by \
\ c d / \ y / \ cx+dy /

The vector (x,y) tells you what the columns of the matrix represent.
we've already talked about how matrix vector multiplication works. See the text book for a precise definition for arbitrary matrices.
Example
/ 1 0 0 1 1 \ / x \ / x+w+t \
| 2 1 0 5 1 | | y | = | 2x+y+5w+t |
| 3 1 0 0 1 | | z | | 3x+y+t |
\ 4 7 1 9 0 / | w | \ 4x+7y+z+9w /
\ t /

So the (x,y,z,w,t) vector means that the rows of the matrix represent x,y,z,w,t. Eg, the first row of the matrix has So it represent x+w+t.
Next we're going to take some specific values for x,y,z,w,t, eg, x=0,y=0,z=1,w=1,t=0. Then in that case, the first row gives x+w+t=0+1+0=1. And the whole matrix gives:
/ 1 0 0 1 1 \ / 0 \ / 1 \
| 2 1 0 5 1 | | 0 | = | 5 |
| 3 1 0 0 1 | | 1 | | 0 |
\ 4 7 1 9 0 / | 1 | \ 10 /
\ 0 /

Multiplying matices and vectors like this is important, so make sure you get enough practice. Make them up and random, and test yourself using MatLab.
Examples:Multiply the following:
/ 1 2 \ / 1 \
| 3 4 | \ 2 /
\ 1 0 /
[ 1 2 3 ] / 1 \
| 3 |
\ 2 /

Note, the following is Not possible:
/ 1 2 3 \ / 1 \
\ 0 4 5 / \ 3 /
This is not possible since the number of columns in the matrix is not the same as the number of rows in the vector, so it's not telling you what all the columns mean.

Homogeneous and Non homogeneous systems.


A solution to Ax=0 will either give only the point (0,0), or (0,0,0) (or more zeros in a higher dimensional space), or else it will give a line, or a plane, or something of large dimension, which goes through the origin.
This kind of linear system is called homogeneous
Any linear system gives a point or a line or a plane, or whatever, which is got from shifting a point, line or plane etc, through the origin.
If we want to solve Ax=b for some matrix A and some vector b, say we have a solution x1, with
Ax1=b
and a vector x2
Ax2=0

Then x1+x2 is a solution to Ax=b. So we can get all the solutions by adding a particular one to the solution that comes from a point, line, or plane, (etc) though the origin.
homogenous and nohomogeneous, graph

Dimension of vector spaces


Motivation


How do we really know that the space we live in is three dimensional?
You might say that it's because there are three directions you can move in, (up down), (left, right), and (back, forth). (I'm going to use a nice Escher picture to illustrate this idea.)
Moving in these three directions, we can get anywhere in space.
But is it enough to say there are three directions?
Would North, West, and North East do? Can we get everywhere in space by going in those directions? (To make these into vectors, we really need to say "one unit North, one unit West, etc.)
Why not?
The thing about these three vector is that one of them is linearly dependent on the others. We could say that North East can be defined in terms of North and West; but we could define West in terms of North and North East. So instead of saying one depends on the other, since they are all equally guilty, we say the set of these three vectors is linearly dependent.
Now how come the first three were enough to get everywhere? When this happens, that some vectors can get us everywhere in a vector space, we say that they span the space. The span of a collection of vectors is all the vectors you can get to using them. Eg, the span of North, West, and North East is "the ground", or all points with height zero. They are three vectors, but they only span a two dimensional space.
We will find out how to see when some strings of numbers are linearly independent, and how to see when they span the vector space.
We will look at the geometric interpretation, and at the meaning of linear independence and spanning for linear systems of equations.
We will look at the meaning of linear independence in some detail and see several examples of it's application.


Homework

Before working on the assignment problems, make sure you understand the material.
Email me if you have any problems with this.

Assignment


This is to be handed in to be marked on Tuesday 20th May.

Solutions


Solutions to the assignment questions are now (from 22nd May) available on reserve from third floor of straufer library.


What will be on the quiz


On Thursday 15th of May there will be a quiz, with a question like the following:
part 1 Is the vector (1,2) in the span of (2,-2) and (-1,2)?
Write the problem as
Draw a graph showing how (1,2) is in the span of (2,-2) and (-1,2)
Is this solution unique?
part 2 Are (1,2,1), (2,-2,1) and (-1,2,3) linearly independent?

Solution


part 1 Is the vector (1,2) in the span of (2,-2) and (-1,2)?
To solve this, row reduce the augmented matrix:
/ 2 -1 | 1 \ / 2 -1 | 1 \ R1+R2 / 2 0 | 4 \ R1/2 / 1 0 | 2 \
\ -2 2 | 2 / R2+R1 \ 0 1 | 3 / \ 0 1 | 3 / \ 0 1 | 3 /
So the solution is x=2, y=3, and
(1,2)=2(2,-2)+3(-1,2)

This is illustrated in the graph below: The solution is unique, since when we reduced to echelon, the matrix had two leading ones, which means the variables x and y are determined uniquely.
part 2 Are (1,2,1), (2,-2,1) and (-1,2,3) linearly independent?
This means is there a (non trivial) way to get a linear combination of these vectors to be zero.
Can a(1,2,1,)+b(2,-2,1)+c(-1,2,3)=(0,0,0)
One way to solve this is to write a vector equation:
/ 1 \ / 2 \ / -1 \ / 0 \
| 2 | a + | -2 | b + | 2 | c = | 0 |
\ 1 / \ 1 / \ 3 / \ 0 /

and then an augmented matrix:
/ 1 2 -1 | 0 \
| 2 -2 2 | 0 |
\ 1 1 3 | 0 /
Which we get to reduced echelon form to show whether a=0, b=0, c=0 is the only solution or not.
But we can also notice that these vectors have top half the same as in part 1 of this question. So since:
/ 1 \ / 2 \ / -1 \ / 0 \
| 2 | a + | -2 | b + | 2 | c = | 0 |
\ 1 / \ 1 / \ 3 / \ 0 /
We also have:
/ 1 \ a + / 2 \ b + / -1 \ c = / 0 \
\ 2 / \ -2 / \ 2 / \ 0 /
But we had a solution to this: a=1, b=-2, c= -3. And this was unique (though now we can multiply each coeffience by some fixed number and get a new solution). So we can take a=1 , b=-2 , c=-3. We have:
/ 1 \ / 2 \ / -1 \ / 0 \
| 2 | - 2 | -2 | - 3 | 2 | = | 0 |
\ 1 / \ 1 / \ 3 / \ -10 /

We don't get zero like this, so there's no way to get zero, so these vectors must be linearly independent.