math 3 week 4 lecture slides [compatibility mode]
TRANSCRIPT
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
1/48
Linear Algebra
Review of matrices
ystems o near a ge ra c equat ons =Finding solution(s) by row operations
Inverse of a s uare matrix A
Finding inverse by row operations
Determinant of a square matrix ACalculating determinant by row operations
In between, we will look at vector space and linearly independentvectors
a r x e genpro em
Diagonalisation problem
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
2/48
Review on matrices
An MNmatrix is an array of MNnumbers enclosed within apair of brackets and arranged in Mrows and Ncolumns.
1
2 1 3 6 9
Examples:
( 3 ) 21 2 2 3 92
5 6
The numbers making up a matrix are referred to as elementsof the matrix.
,columns.
We use bold capital letters such as A, B, P and Q to denote. . .
1 2 3
4 5 6
A
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
3/48
Notation
Let A be an MNmatrix.
enote t e e ement n t e -t row an -t
column of A by aij. Then we can write:
11 12 1
21 22 2
N
N
a a a
a a a
ij
a a a
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
4/48
Equality of matrices
ij ij .
, , , ij ij.
E.g. 3a b c c
, 3, ,a b c c c d a b b
on o ma r ces
If A+B = C then C=(cij) is MNand cij= aij+ bij.
1 2 3 7 8 9 1 7 2 8 3 9
E.g.
4 5 10 11 12 4 10 5 11 12
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
5/48
Multiplication of a number to a matrix
If A = (aij) and cis a number then cA = (caij) andcA has the same order as A.
E.g. 1 2 2 423 4 6 8
We write (1)A as A. So BA = B + (A).
E.g.2 3 1 2 2 1 3 2
4 4 3 2 4 3 4 2
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
6/48
The trans ose of a matrix A is denoted b AT
.1 2 3 1 4 7
7 8 9 3 6 9
= T
1 1
3 0 6 3 0 6 T
A A
5 6 9 5 6 9
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
7/48
Product of matrices
Let A=(aij) and B=(bij) be MNand PQmatricesrespectively.
= , we can orm t e pro uct matr x .
If AB is denoted b C= c then C is MQand the
element ckp is calculated using the k-th row of A and p-th
column of B as follows.
kc
1
2
1 2
p
p
k k kN
ba a a
1 1 2 2k p k p kN Np
a b a b a b
A typo here in the 238page document (p56)
Npb Nk n n ja b
What is the condition for forming the product BA?
What is the order ofBA if it can be formed?
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
8/48
Example:
2 4
5 1 2 23 4
3 3 1 2
P Q
3 2
We can form PQ but not QP.
1 2 11 7 4 6
5 1 2 2
2 4
3 2 3 4
3 3 1 25 6 43 23 16 22
, ,BA can be formed, AB may or may not be equal to BA.
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
9/48
Identit matrices
An NNmatrix (cij) such that c11 = c22 = c33== cNN=1 and cij= 0for inot equal tojis called an identity matrix.
1 0 0 01 0 0
Examples:
0 1 00 1 0 0 1 0
0 0 1 0 0 0 1
Whats special about identity matrices?
.If the product IA can be formed then IA = A.
, .
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
10/48
Lets start on linear algebra now
A good starting point is to look at asystem of linear algebraic equations.
Whats a linear algebraic equation?
Many simultaneous linear algebraic equationsform a system.
How can we solve a system of linearalgebraic equations?
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
11/48
Whats a linear algebraic equation?
An example of a linear algebraic equation in
one unknown x is: 2 1 0x
Thesolution of the above linear algebraicequation is:
2
x
is an equation of the form:
If we let y=0 then x= 3. So (x,y)=(3,0) is a solution of the above equation.
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
12/48
Whats a linear algebraic equation?
near a ge ra c equa on n un nowns x1, x2,
,xNand xNis an equation of the form:
1 1 2 2...
N N N c x c x c x d
Why bother
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
13/48
Many problems in engineering and
p ys ca sc ences are ormu a e nterms of a systemof linear algebraicequa ons.
This tem eratureprofile in the human
eye was obtained from
method by solving asystem of 470 linear
algebraic equations in470 unknowns.
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
14/48
Heres a system ofNlinear algebraicequations inNunknowns.
11 1 12 2 13 3 1 1
21 1 22 2 23 3 2 2
...
...
N N
N Na x a x a x a x b
1 1 2 2 3 3... N N N NN N N a x a x a x a x
ij is the (constant) coefficient of the unknown xjin the i-th equation.
-i
.
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
15/48
The system can be written in matrixform AX =B, where:11 12 1
...N
a a a Example:
12 22 2...
Na a a
A
2 3 1 0x y 1 2 N N NN
1
2
x
x
2 3 10x
Nx
1 1 0y
1
2
b
b B
2 3 10x y
Nb
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
16/48
Solutions of a linear al ebraic e uationConsider a single linear algebraic equation
1 1 2 2...
N N N
1 1x is said to be a solution of the above linear
2 2
x
a ge ra c equat on t e o t e equat onequals its RHS when we replace x1, x2, , xN
by 1, 2, , Nrespectively.
Example: We can find many other solutions easily.
2 0 x y z 1x 2x
3
y
z
s a so u on u s no .
3z
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
17/48
Solution of a system of linearalgebraic equations
1 1x
2 2x
If is a solution ofN Nx
each and ever linear al ebraic
equation in the system then it is.
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
18/48
It is possible that a system of linearalgebraic equations has no solution.
Example:
5
x y
x
.
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
19/48
has more than one solutions.
xamp e:
1 0x y
2 2 2 0x y 10x y
The system really contains only one linear algebraicequation in 2 unknowns!
.
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
20/48
If a consistent system of linear algebraice uations has onl one solution we sa
the system has a unique solution.
To summarise, a system of linear algebraic
equations can either be consistent or inconsistent.If it is consistent, it can have either a uniquesolution or infinitely many solutions.
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
21/48
Given a system of linear algebraicequations AX = B, how do we know
whether it is consistent or not?
,its solutions?
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
22/48
Reduce the system AX = B to asimpler but equivalent systemUX = C.
AX = B and UX = C are equivalent if they haveexact y t e same so ut on s .
If we can work out the solution(s) of UX = C,= .
If the square matrix U is an upper triangular
, =enough for us to work out its solution(s) (if any).
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
23/48
a s an upper r angu ar ma r x
1 4 5 6 E.g.
0 1 6 8
0 0 2 0
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
24/48
To solve AX = B, reduce it to an
equ va en sys em = , w ereU is an upper triangular matrix.
How can this be done?
Write AX = B in tableau form A | B.
2 3 4 6 x y z 2 3 4 6
E.g.E.g.
3 5 2 7
10 5 9
x y z
x y z
1 10 5 9
Use legitimate row operations in a systematic
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
25/48
There are 2 types of legitimate rowoperations.
R R Interchange i-th andj-th rows.
i i j R R R Use rowj to change row i tobecome Ri +R .Important. The constant is not allowed to be zero.
Why? WhyR1 R3 (say) is not allowed?
A simple rule to observe.
In changing a tableau by the second type of rowoperation, keep one row fixed. Use the fixed row
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
26/48
Example:
2 3 2 x y z w
2 4 1 x y z
8 y z w
1 1 2 3 2
1 1 1 1 5
0 2 2 1 R R R 0 1 -2 3
2 1 4 0 1 0 3 3 12 R R R -3 8 -6 -3
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
27/48
1 1 2 3 2 0 0 1 2 3 0 1 1 1 8 2 4R R
0 1 1 1 8
0 0 1 2 3
1 1 2 3 2
0 1 1 1 8
0 1 1 1 8
0 0 11 3 21
0 0 0
0 0 1 2 30 3 3 23 R R R 11 -3 21
0 -19 12
4 4 311 R R R
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
28/48
x y z w
1 1 2 3 2
0 1 1 1 8
8z w
2 3 2 x y z w
0 0 11 3 21 11 3 21 (21 3 ) /11 33/19 z w z w w w
e on y so u on o e sys em s
9/19x
131/19
33/19
y
z
12/19w
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
29/48
Linear Algebra
- Review of matrices
ystems o near a ge ra c equat ons =Finding solution(s) by row operations
Inverse of a s uare matrix A
Finding inverse by row operations
Determinant of a square matrix ACalculating determinant by row operations
a r x e genpro em
Diagonalisation problem
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
30/48
Review
We were looking at solving a systemf lin r l r i i n .
A X = B a system of linearAX Blegitimate row i jR R
UX C( 0)i i j R R R
UX = C equivalent systemupper triangular matrix
xamp e on p
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
31/48
Example
2 3 6 x y z 1 2 3 6
8 9 10 0
x y z
x y z
8 9 1 0 0
1 2 3 6
0
2 2 1
3 3 18 R R R 7 14 48
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
32/48
1 2 3 6
0 4 8 22
0 7 14 48
1 2 3 6
0 4 8 22 0 0
3 3 24 7 R R R 0 38
The last row gives a nonsensical statement!
.
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
33/48
Example x y z
2 3 8
5 6 7 24
x y z
x
1 2 3 8
0 4 8 16
8 9 10 36 x y z 0 0 0 0
There is nothing wrong with the last row. It tells that
there are only 2 independent equations. The system.
Let z= s(sis any arbitrary real number). x s
y s y s 2(4 2 ) 3 8 x s s x s
4 2y s
z s
Read note at the bottom of p70.
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
34/48
Example x y z w
1 2 3 2 1
0 1 0 0 2
2 3 2 1
2 5 6 4 0
x y z w
x y z w
0 0 0 0 0
0 0 0 0 0
3 7 9 6 1
3 3 2 1
x y z w
x y z w
There are only two independent equations here.
We can let two of the unknowns be any valuesbut second row in the final tableau tells us thaty= 2.
1 22( 2) 3 2 1 x t t
e = 1 an w= 2.
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
35/48
The Bi Picturoriginal system
le itimate rowoperations
UX C simpler but equivalentsystem
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
36/48
A homogeneoussystem of linear
a11x1 + a12x2 + +a1(N1)xN 1 +a1NxN= 0
a21x1 + a22x2 + +a2(N 1)xN 1 +a2NxN= 0=
aN1x1 + aN2x2 + +a N 1 xN 1 +a NxN= 0
In matrix form, it can be written as AX = 0
where 0 = .0
0
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
37/48
A homogeneous system AX=0 is
always consistent.
1
2 0 x is a solution, no matter what A is.
0N
x
trivial solution
A | 0 U | 0
Depending on what A is, the homogeneous systemAX=0 has either only one (unique) solutiongiven byX=0 or infinitely many solutions(one of which is X=0).
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
38/48
n a so ut ons o t e omogeneous system
2 3 0 x y z 1 2 3 0
5 6 7 0
8 9 10 0
x y z
z z z
8 9 1 0 0
1 2 3 0
0 5 R R R -4 -8 00
3 3 18 R R R -7 -14 0
2y t
0 4 8 0 x t
infinitely many
0 3 3 2so u ons
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
39/48
A | B U | C
We can make the following general observations:
a t e agona e ements o are not zero,
the system AX=B has only one solution.For a homo eneous s stem this means X=0
is the only solution.)
,the system AX=B has either no solution orinfinitely many solutions.
or a omogeneous system, t s means t atthere are infinitely many solutions, one ofwhich is X=0.
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
40/48
Review
Solving a system of linear algebraici n :
A X = B a system of linearAX Blegitimate row
i jR R
UX C( 0)i i j R R R
UX = C equivalent systemupper triangular matrix
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
41/48
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
42/48
Example: 5
3
1 3
,4
and .
0
1
,
0 1 3
If possible, finda, band csuch that
3 0 3ba
-3 =-4
1 0 10 1 3
+ b + ca
++ 3
cb c
= a
If possible, solve: a + 3b+0c= 5a + 0b+ c= 3
0a + b+3c= 4
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
43/48
Write the equations in tableau form:
1 3 0 5
a b c1 3 0 5
1 0 1 3
0 1 3 4
0 1 3 4
2 2 1
1 3 0 5
3b+(2) = 8 b= 2
0 3 1
0 0
8 3 R R R 10 20
a+3(2) = 5 a = 1
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
44/48
5
1 3
,4
and
0
1
,
0 1 3
Specifically, we find that:
3 ( 1) 1 2 0 ( 2) 1
4 0 1 3
More examples: Problems 5 and 6 on page 86
Li l i d d t t
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
45/48
Linearly independent vectors
1, 2, , P1 P ,N elements.
independent vectors if we cannot find any oneof these vectors to be a linear combination ofthe other vectors.
How do we check if w1, w2, , wP1 and wParelinearly independent
Form the homogeneous system
c1 w1 + c2 w2 + + cP1 wP1 + cPwP= 0If c1 = c2 = = cP1 = cP = 0 is the only solutionof the system then the vectors are linearly
independent. Why does this work?
H d h k if d
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
46/48
How do we check if w1, w2, , wP1 and wPare
Form the homogeneous system
1 1 2 2 P1 1
If c1 = c2 = = cP1 = cP = 0 is the only solution
independent. Why does this work?
, 1 we can write:
32 Pcc c
1 2 3
1 1 1
P
c c c
That is, we can express w1 as a linear combination of w2 , w2 , ,wP1 an wP , ence e vec ors are no near y n epen en .
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
47/48
p77
Are
1 2 1
1 , 1 , 0
linearly independent?
1 1 2 0c1 c2 c3
1 2 30 1 1 0
1 1 1 0
c c c
1 1 2 00 1 1 0
-1 -1 -1 0
Is c1 = c2 = c3 = 0 the onlysolution?
0 1 1 0Vectors are linearly independent.
1 2 1 What about ?
-
8/2/2019 Math 3 Week 4 Lecture Slides [Compatibility Mode]
48/48
1 , 2 , 2 What about ?
2 4 3
1 2 31 2 2 02 4 3 0
c c c
1 2 2 02 4 3 0
1 2 1 0
0 0 1 0
c1=c2=c3=0 is not the only solution.
A possible non-trivial solution is:
1 = , 2 = 3 = .
1 2 1 0 2 1
Vectors are not linearlyinde endent.
2 4 3 0 4 2