You are on page 1of 38

MATH1180 Computational

Methods and Numerical


Techniques
Teaching Week 04: Further Vectors and Matrices
Contents
Linear Dependence & Independence
Concept of Spanning
Basis Theorem
Standard Basis
Linear Independence
Consider vectors 𝒖𝒖, 𝒗𝒗, and 𝒘𝒘 which are linearly combined
𝛼𝛼𝒖𝒖 + 𝛽𝛽𝒗𝒗 + 𝛾𝛾𝒘𝒘
to form a vector. Here 𝛼𝛼, 𝛽𝛽, and 𝛾𝛾 are real numbers.

The linear combination may or may not result to a ZERO


vector.
What happens when 𝛼𝛼, 𝛽𝛽, and 𝛾𝛾 are zeros?
What happens when not all 𝛼𝛼, 𝛽𝛽, and 𝛾𝛾 are zeros?
𝟏𝟏 𝟐𝟐
By observation: the two vectors and depend on each
𝟑𝟑 𝟔𝟔
other. This is because

𝟐𝟐 𝟏𝟏
= 𝟐𝟐 ×
𝟔𝟔 𝟑𝟑

𝟐𝟐
So the second vector is not needed – redundant.
𝟔𝟔
Similarly, suppose we have the set of three vectors
𝟐𝟐 𝟏𝟏 𝟕𝟕
𝒖𝒖 = , 𝒗𝒗 = and 𝒘𝒘 =
𝟏𝟏 𝟑𝟑 𝟏𝟏𝟏𝟏

𝒘𝒘 can be created by taking 2𝒖𝒖 + 3𝒗𝒗

So again the third vector is a linear combination of the other


two.
Such a set of vectors (where one can be created from the
others, so is redundant) is called linearly dependent
It isn’t always so obvious in 3 dimensions.
Consider the following set of vectors:

𝟐𝟐 −𝟏𝟏 𝟏𝟏
𝒖𝒖 = −𝟏𝟏 , 𝒗𝒗 = 𝟐𝟐 and 𝒘𝒘 = 𝟏𝟏𝟏𝟏
𝟑𝟑 −𝟏𝟏 𝟓𝟓

Is the third vector linearly dependent on the other two?


Can you make it as a combination of the first and second
vectors?
In fact you can create the third vector from the linear
combination 4𝒖𝒖 + 𝟕𝟕𝒗𝒗.
Such a set of vectors (where one can be created from the
others, so is redundant) is called linearly dependent
Now consider another set of vectors

𝟐𝟐 −𝟏𝟏 𝟏𝟏
𝒖𝒖 = −𝟏𝟏 , 𝒗𝒗 = 𝟐𝟐 and 𝒘𝒘 = 𝟏𝟏𝟏𝟏
𝟑𝟑 −𝟏𝟏 𝟔𝟔

It is not possible to combine the first two vectors together


to make the third vector

They are known as being linearly independent


Note that if we have, say 𝛼𝛼𝒖𝒖 + 𝛽𝛽𝒗𝒗 = 𝒘𝒘 for three dependent vectors,
this can be rearranged as 𝛼𝛼𝒖𝒖 + 𝛽𝛽𝒗𝒗 − 𝒘𝒘 = 𝟎𝟎. Here 𝛼𝛼 or 𝛽𝛽 may be non zero.
What this means is that we can combine together the three
vectors to get the zero vector in a non-trivial way.

Formal definition of linear independence:


A set of vectors u1….. un is said to be linearly
independent if the only solution to the
equation α1u1 + …. αnun = 0 is the solution
α1 = … = αn = 0. If a non-zero solution exists
then the set is said to be linearly dependent.
How can we show a set of vectors is linearly dependent or
independent?
Consider the set of vectors:
𝟐𝟐 −𝟏𝟏 𝟏𝟏
𝒖𝒖1 = −𝟏𝟏 , 𝒖𝒖2 = 𝟐𝟐 and 𝒖𝒖3 = 𝟏𝟏𝟏𝟏
𝟑𝟑 −𝟏𝟏 𝟓𝟓

To be linearly independent, the only solution to the system


of equations
𝛼𝛼1 𝒖𝒖1 + 𝛼𝛼2 𝒖𝒖2 + 𝛼𝛼3 𝒖𝒖3 = 𝟎𝟎 must be 𝛼𝛼1 = 𝛼𝛼2 = 𝛼𝛼3 = 0.
This means we need to check solutions to
𝟐𝟐 −𝟏𝟏 𝟏𝟏 𝟎𝟎
𝛼𝛼1 −𝟏𝟏 + 𝛼𝛼2 𝟐𝟐 + 𝛼𝛼3 𝟏𝟏𝟏𝟏 = 𝟎𝟎
𝟑𝟑 −𝟏𝟏 𝟓𝟓 𝟎𝟎
That means we have the system of equations
2α1 – α2 + α3 = 0
-α1 + 2α2 + 10α3 = 0
3α1 – α2 + 5α3 = 0
Go ahead…solve by Gaussian Elimination!
Or calculate the determinant of the matrix of coefficients.
No non-zero (only zero) solution if 𝑑𝑑𝑑𝑑𝑑𝑑 ≠ 0.
Non-zero solution if 𝑑𝑑𝑑𝑑𝑑𝑑 = 0.
The augmented matrix is
 2 −1 1 0 
 
 − 1 2 10 0 
 3 −1 5 0
 
Doing R3 → R3 + 3R2 gives

 2 −1 1 0
 
 − 1 2 10 0 
 0 5 35 0 
 
Doing R2 → R2 + (1/2)R1 gives  2 −1 1 0
 
 0 3 / 2 21 / 2 0 
0 5 35 0 
 
You could take factors out, or just do  2 − 1 1 0
R3 → R3 - (10/3)R2 to get  
 0 3 / 2 21 / 2 0 
0 0 0 0 
 
The augmented matrix has left with two rows of non zero
coefficients (rank only 2)
This means that there are infinitely many possible solutions.
These are non-zero solutions: the three vectors must be linearly
dependent as the system α1u1 + α2u2 + α3u3 = 0 has non-zero
solutions.
Now consider the set of vectors:
𝟐𝟐 −𝟏𝟏 𝟏𝟏
𝒖𝒖1 = −𝟏𝟏 , 𝒖𝒖2 = 𝟐𝟐 and 𝒖𝒖3 = 𝟏𝟏𝟏𝟏
𝟑𝟑 −𝟏𝟏 𝟔𝟔
The Gaussian elimination leads to the augmented matrix
 2 −1 1 0
 
 0 3 / 2 21 / 2 0 
0 0 1 0 
 
You can see (by back-substituting) that the only possible solution to
this system of equations is α1 = α2 = α3 = 0 Hence, these three vectors
are linearly independent
To check whether a set of vectors are linearly independent you can
always just follow this procedure.
Summary
 To check for linear independence, write the equation
α1u1 + …. αnun = 0 as an augmented matrix
 Use Gaussian Elimination on this matrix
 If there are infinitely many solutions, the vectors are linearly
dependent
 If the only solution is α1 = … = αn = 0, the vectors are linearly
independent
Concept of Spanning
Given a set of linear independent vectors we can ask one
question:
Is possible to create any vector in the “vector space” as a
linear combination of vectors from the set of linear
independent vectors?
If so the linear independent set of vectors is known as the
“spanning set”.
Note: We have not defined vector space. In simple terms,
one can image in 2-D case it is the space formed by x- and
y-planes in which vectors are defined and in 3-D case it is
the space formed by the x-, y- and z-planes in which
vectors are defined.
𝟏𝟏 𝟎𝟎
Consider the two vectors and
𝟎𝟎 𝟏𝟏
Is it possible to create any 2-dimensional vector from these
two vectors?
𝒓𝒓
Suppose we are trying to create any vector
𝒔𝒔
We want to know if we can write
𝟏𝟏 𝟎𝟎 𝒓𝒓
𝑎𝑎 + 𝑏𝑏 =
𝟎𝟎 𝟏𝟏 𝒔𝒔
Solving the system it is obvious that 𝑎𝑎 = 𝑟𝑟 and 𝑏𝑏 = 𝑠𝑠.
Since 𝒓𝒓 and 𝒔𝒔 are any real numbers therefore we can create
every vector from these two vectors, and so they span two
dimensional space 𝐑𝐑2 .
𝟏𝟏 𝟐𝟐
Consider the two vectors and
𝟐𝟐 𝟒𝟒
Is it possible to create any 2-dimensional vector from these
two vectors?
𝒓𝒓
Suppose we are trying to create the vector
𝒔𝒔
We want to know if we can write
𝟏𝟏 𝟐𝟐 𝒓𝒓
𝑎𝑎 + 𝑏𝑏 =
𝟐𝟐 𝟒𝟒 𝒔𝒔
Try it – use Gaussian Elimination!
𝟏𝟏 𝟐𝟐 𝒓𝒓
The augmented matrix is
𝟐𝟐 𝟒𝟒 𝒔𝒔

𝟏𝟏 𝟐𝟐 𝒓𝒓
Applying R2 → R2 – 2R1 gives
𝟎𝟎 𝟎𝟎 𝒔𝒔 − 𝟐𝟐𝟐𝟐

But in general s – 2r won’t be 0 so we have a contradiction.

Hence we cannot create every vector from these two


vectors, and so they do not span two dimensional space 𝐑𝐑2
Actually its fairly obvious that this will be the case, as the
two vectors are just multiples of each other, so lie on the
same line.
Hence, any linear combination of these two vectors is just
going to be on this line. We cannot create any vectors away
from this line.

Hence we cannot create every vector from these two


vectors, and so they do not span two dimensional space 𝐑𝐑2
𝟏𝟏 𝟐𝟐
Consider instead the vectors and
𝟐𝟐 𝟓𝟓
Is it possible to create any 2-dimensional vector from these
two vectors?
𝒓𝒓
Suppose we are trying to create the vector
𝒔𝒔
We want to know if we can write
𝟏𝟏 𝟐𝟐 𝒓𝒓 𝟏𝟏 𝟐𝟐 𝒂𝒂 𝒓𝒓
𝑎𝑎 + 𝑏𝑏 = or =
𝟐𝟐 𝟓𝟓 𝒔𝒔 𝟐𝟐 𝟓𝟓 𝒃𝒃 𝒔𝒔
21

𝟏𝟏 𝟐𝟐 𝒓𝒓
The augmented matrix is
𝟐𝟐 𝟓𝟓 𝒔𝒔

𝟏𝟏 𝟐𝟐 𝒓𝒓
Applying R2 → R2 – 2R1 gives
𝟎𝟎 𝟏𝟏 𝒔𝒔 − 𝟐𝟐𝟐𝟐

Hence we can take b = s - 2r and then back-substitute to


find a
Therefore we can create every vector from these two
vectors, and so they span two dimensional space 𝐑𝐑2 .
22

This time the two vectors are on different lines – you can
always create any vector by taking a combination of these
two vectors.

Therefore we can create every vector from these two


vectors, and so they span two dimensional space 𝐑𝐑2 .
I will leave you to check out the 3-dimensional examples
below.

𝟐𝟐 −𝟏𝟏 𝟏𝟏
• u1 = −𝟏𝟏 , u2 = 𝟐𝟐 and u3 = 𝟏𝟏𝟏𝟏 span 𝐑𝐑3
𝟑𝟑 −𝟏𝟏 𝟔𝟔

𝟐𝟐 −𝟏𝟏 𝟏𝟏
• but u1 = −𝟏𝟏 , u2 = 𝟐𝟐 and u3 = 𝟏𝟏𝟏𝟏 do not span 𝐑𝐑3
𝟑𝟑 −𝟏𝟏 𝟓𝟓
Bases
We have two important properties of a set of vectors
• We want them to be linearly independent so that we
aren’t “wasting” any vectors
• And we want them to span so that we can create every
vector
A set of vectors that is both linearly independent and spans
is called a basis.

The number of vectors inside a basis is known as the


dimension of the vector space.
Basis Theorem

If a set of n vectors are “linearly independent” in 𝐑𝐑𝑛𝑛


then they also span 𝐑𝐑𝑛𝑛 and hence form a basis for 𝐑𝐑𝑛𝑛
Standard basis
The standard basis for two dimensional space 𝐑𝐑2 consists of
𝟏𝟏 𝟎𝟎
the two vectors and . (We had one example in Slide
𝟎𝟎 𝟏𝟏
16.)

𝟏𝟏 𝟎𝟎 𝟎𝟎
Linearly independent – if we have a +b = then
𝟎𝟎 𝟏𝟏 𝟎𝟎
immediately a = b = 0
As they are two linearly independent vectors in 2-
dimensional space, they must form a basis
This means they must span, and so every vector can be
created as a linear combination of the two vectors. (See slide
16.)
You can consider r and s to be the “co-ordinates” of the
vector with respect to this basis
This is really just the standard x and y axes that we are all
familiar with!
However, there is nothing stopping us taking a different basis
– in a sense redefining our axes and our co-ordinate system.
𝟐𝟐 𝟒𝟒
For example, consider the two vectors and
𝟏𝟏 𝟓𝟓
Firstly check these are linearly independent – over to you!
Proceeding exactly in the usual way, the augmented matrix is
𝟐𝟐 𝟒𝟒 𝟎𝟎
𝟏𝟏 𝟓𝟓 𝟎𝟎
𝟐𝟐 𝟒𝟒 𝟎𝟎
R2 → R2 – (1/2)R1 gives
𝟎𝟎 𝟑𝟑 𝟎𝟎
It is now immediate from the last line (and then back-
substituting) that these must be linearly independent – the
only way you can combine them together to get the zero
vector is to have all scalar multiples zero.

Hence, because there are two linearly independent vectors in


2-dimensional space, they must form a basis. What this
means is that every vector can be written in terms of these
two vectors.
𝟐𝟐
For example, how could you write the vector as a linear
−𝟓𝟓
𝟐𝟐 𝟒𝟒
combination of these two vectors and ? Try it!
𝟏𝟏 𝟓𝟓

𝟐𝟐 𝟒𝟒 𝟐𝟐
We need to solve a +b =
𝟏𝟏 𝟓𝟓 −𝟓𝟓
This can be done by Gaussian Elimination – the augmented
𝟐𝟐 𝟒𝟒 𝟐𝟐
matrix is
𝟏𝟏 𝟓𝟓 −𝟓𝟓
You should be able to solve this to get a = 5 and b= -2
𝟐𝟐 𝟐𝟐 𝟒𝟒
Hence =5 -2
−𝟓𝟓 𝟏𝟏 𝟓𝟓
𝟐𝟐 𝟐𝟐 𝟒𝟒
Given =5 -2 you might say that 5 and -2 are the
−𝟓𝟓 𝟏𝟏 𝟓𝟓
𝟐𝟐
co-ordinates of with respect to this new basis
−𝟓𝟓
All we are really doing here is redefining our co-ordinate
system. Instead of measuring a vector via the x and y axes as
“standard”, we are measuring it in terms of multiples of
these basis vectors instead.
A 3-D example:
𝟏𝟏 −𝟏𝟏 𝟐𝟐
Show that −𝟐𝟐 , 𝟑𝟑 and 𝟏𝟏 are linearly independent and
𝟒𝟒 −𝟐𝟐 3.
𝟑𝟑
hence form a basis for 𝐑𝐑
−𝟑𝟑
Then express the vector 𝟒𝟒 as a linear combination of
−𝟏𝟏
these three vectors.
You should, if you do the Gaussian Elimination correctly,
after checking linear independence, get the solution
−𝟑𝟑 𝟏𝟏 −𝟏𝟏 𝟐𝟐
𝟒𝟒 = 𝟐𝟐 −𝟐𝟐 + 𝟑𝟑 𝟑𝟑 − 𝟏𝟏
−𝟏𝟏 𝟒𝟒 −𝟐𝟐 𝟑𝟑

Hence the co-ordinates with respect to this basis are 2, 3


and -1
Summary
• There are formal axioms that define a vector space. We
have skipped these, but we used the 2-D and 3-D
physical space to visualise the respective vector space.
• A set of vectors spans a vector space if it is possible to
express any vector as a linear combination of the set of
vectors.
• The normal “spanning set” is the usual Cartesian vectors,
𝟏𝟏 𝟎𝟎 𝟎𝟎
such as 𝟎𝟎 , 𝟏𝟏 and 𝟎𝟎 in three dimensions.
𝟎𝟎 𝟎𝟎 𝟏𝟏
Summary
• There are other spanning sets.
• A basis is a set of vectors that spans the whole space,
but is also linearly independent.
𝟏𝟏 𝟎𝟎 𝟎𝟎
• The standard basis e.g. 𝟎𝟎 , 𝟏𝟏 and 𝟎𝟎 .
𝟎𝟎 𝟎𝟎 𝟏𝟏
School of Computing and Mathematical Sciences
Faculty of Engineering and Science

University of Greenwich is a charity and company limited by guarantee, registered in England (reg. no. 986729).
Registered office: Old Royal Naval college, Park Row, Greenwich, London SE10 9LS

You might also like