Matrices (Laplace Transform work will continue on Monday)

advertisement
Matrices
(Laplace Transform work will continue on Monday)
Matrices
Appendix II
Matrices
Part 1: Why we’ll care
Appendix II
Systems of Linear DiffEqs
Systems of Linear DiffEqs
8
dx
>
=
< dt
>
: dy
dt
5x
= 4x
y
y
Systems of Linear DiffEqs
8
dx
>
=
< dt
>
: dy
dt
5x
= 4x
y
y
Why is this linear again?
Systems of Linear DiffEqs
8
dx
>
=
< dt
>
: dy
dt
5x
= 4x
y
y
Only numbers multiplying x, y
Systems of Linear DiffEqs
8
dx
>
=
3x
+
4y
< dt
>
: dy
dt
= 5x
7y
Here’s another
Systems of Linear DiffEqs
8
dx
>
=
< dt
>
: dy
dt
2x + 101y
= 5.2x + y
And… another
Systems of Linear DiffEqs
8
dx
>
< dt = 3x + 4y
>
: dy
dt
= 5x
8
dx
>
< dt =
7y
>
: dy
dt
8
dx
>
< dt =
>
: dy
dt
2x + 101y
5x
= 4x
y
y
= 5.2x + y
What info do we really need to describe each?
Systems of Linear DiffEqs
8
dx
>
< dt =33x +44y
>
: dy
dt
8
dx
>
< dt = –55x –1y y
>
: dy
=55x –77y
dt
8
dx
>
101y y
< dt = –22x + 101
>
: dy
dt
= 5.2x
y 1y
101x+ +
The rest is always the same.
=44x –1y y
Systems of Linear DiffEqs
8
dx
>
< dt = 33x +44y
>
: dy
dt
=55x –77y
Systems of Linear DiffEqs
8
dx
>
< dt = 33x +44y
>
: dy
dt
=55x –77y
x y
x
y
Systems of Linear DiffEqs
0
@
x
y
1
A
Systems of Linear DiffEqs
0
@
x
y
1
A
Systems of Linear DiffEqs
0
@
x
y
1
A
Systems of Linear DiffEqs
0
@
x
y
1
A
3x + 4y
Systems of Linear DiffEqs
0
@
x
y
1
A
3x + 4y
5x + 7y
Systems of Linear DiffEqs
0
@
xx
yx
1
y
A
y
Systems of Linear DiffEqs
8
dx
>
< dt = 33x +44y
>
: dy
dt
=55x –77y
0
@
dx
dt
dy
dt
1
0
A=
@
Matrix
x
y
1
A
Systems of Linear DiffEqs
8
dx
>
< dt = 33x +44y
>
: dy
dt
=55x –77y
0
@
dx
dt
dy
dt
1
0
A=
@
Vectors
x
y
1
A
Systems of Linear DiffEqs
8
dx
>
< dt = –55x –1y y
>
: dy
dt
=44x –1y y
0
@
dx
dt
dy
dt
1 0
A=@
5
4
1
1
10
A@
x
y
1
A
Systems of Linear DiffEqs
8
dx
>
101y y
< dt = –22x + 101
>
: dy
dt
= 5.2x
y 1y
101x++
0
@
dx
dt
dy
dt
1 0
A=@
2
101
101
1
10
A@
x
y
1
A
Matrices
Part 2: Multiplying Matrices
Appendix II
Multiplying Matrices?
•
0
@
5
4
1
1
1
A
= ???
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
A
1
A
= ???
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
1
A
0
A=@
= ???
3x + 4y
5x + 7y
1
A
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
A
1
A
0
=@
0
1
= @
3x + 4y
5x + 7y
A
1
A
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
1
A
0
A=@
0
= @
3x + 4y
5x + 7y
3x5 + 4x4
1
A
1
A
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
1
A
0
A=@
0
= @
3x + 4y
5x + 7y
31
1
A
1
A
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
1
A
0
A=@
0
31
= @
??
3x + 4y
1
5x + 7y
A
1
A
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
1
A
0
A=@
0
= @
3x + 4y
5x + 7y
31
1
A
1
A
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
1
A
0
A=@
0
= @
31
5x5 + (–7)x4
3x + 4y
5x + 7y
1
A
1
A
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
1
A
0
A=@
0
= @
3x + 4y
5x + 7y
31
–3
1
A
1
A
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
1
A
0
A=@
0
= @
3x + 4y
5x + 7y
31
–3
1
A
??
1
A
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
1
A
0
A=@
0
= @
3x + 4y
5x + 7y
31
–3
1
A
1
A
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
1
A
0
A=@
0
= @
3x + 4y
5x + 7y
1
31 3(–1)+4x1
–3
1
A
A
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
1
A
0
A=@
0
= @
3x + 4y
5x + 7y
31
–3
1
A
1
1
A
Multiplying Matrices
•
0
@
0
@
5
1
4
x
•
y
1
1
1
A
0
A=@
0
= @
3x + 4y
5x + 7y
31
–3
1
A
1
–12
1
A
You do it
✓
4
3
7
5
◆✓
•
9
6
2
8
◆
You do it
✓
4
3
7
5
◆✓
•
=
9
6
✓
2
8
◆
78 48
57 34
◆
Is this thing commutative?
✓
4
3
7
5
◆✓
•
9
6
2
8
Nope
◆
Couple more
✓
4
3
◆✓
7
1
5
0
◆
0
1
Couple more
✓
◆✓
◆
1 0
4 7
0 1
3 5
The 1 Matrix (aka the Identity Matrix)
I=
✓
◆
1 0
0 1
The 1 Matrix (aka the Identity Matrix)
I=
✓
◆
1 0
0 1
A·I =I ·A=A
Matrices
Part 3: Dividing Matrices
Appendix II
Dividing Matrices
Analogue: dividing numbers
Dividing Matrices
To divide by a number is equivalent to multiply by its
inverse.
Analogue: dividing numbers
Dividing Matrices
So I need to find x so that 3x=1 if I want to divide by 3.
Analogue: dividing numbers
Dividing Matrices
Can I find a matrix B so that
0
@
3
5
4
7
1
A·B =I
Analogue: dividing numbers
?
Dividing Matrices
If so, then we call
0
3
B=@
5
4
1
1
A
7
Analogue: dividing numbers
Dividing Matrices
In general we can. For numbers, division by zero only is
impossible. There is a general class of matrices that can’t
be divided, just like the number zero. Let’s look at them.
Dividing Matrices
We’ll work with
0
1
@
3
2
6
1
A
Dividing Matrices
If it had an inverse B, then
0
@
1
3
1
0
2
1
A·B =@
6
0
1
0
A
1
Dividing Matrices
Let’s try this for B
0
@
1
3
1 0
2
a
A·@
6
c
1
0
b
1
A=@
d
0
1
0
A
1
You do it. Multiply the two matrices.
Dividing Matrices
Let’s try this for B
0
a + 2c
@
3a + 6c
1
0
b + 2d
1
A=@
3b + 6d
0
1
0
A
1
Do yo use the problem?
Dividing Matrices
Let’s try this for B
0
a + 2c
@ x3
3a + 6c
1
0
b + 2d
1
A=@
x3
3b + 6d
0
1
0
A
1
This will never happen.
Dividing Matrices
Why do you think this matrix is “like 0”?
0
1
@
3
2
6
1
A
Dividing Matrices
Why do you think this matrix is “like 0”?
0
1
@ x3
3
2
6
1
A
Right. Linearly dependent.
Dividing Matrices
We can check for this by taking the determinant. (You
weird Wronskian people: your time finally arrived!)
0
1
@
3
2
6
1
A
Dividing Matrices
0
1
1 2
1
A=
det @
3 6
3
2
6
Dividing Matrices
0
1
1 2
1
A=
det @
3 6
3
2
6
Dividing Matrices
0
1
1 2
1
A=
det @
3 6
3
2
6
=1⇥6
3⇥2=0
Dividing Matrices
0
1
1 2
1
A=
det @
3 6
3
2
6
=1⇥6
3⇥2=0
This matrix doesn’t have an inverse
Matrices
Part 4: 3x3 Matrices
Appendix II
Systems of Linear DiffEqs
1 0 1
80x0 1 0 3
4
5
x
dx
>
C= 3x
B + 4y + 5z C B C
<B
dt
Bdy0 C B
C B C
By C==5x
B 5 7y 7 2z 2C · By C
Bdt C B
C B C
>
A @ A
:@dz A @
x + 2y + 3z
dt0 =
z
1
2
3
z
3x3 Matrices
0
3
B
B
B5
B
@
1
4
7
2
1 0
1
C B
C B
B
2C
C · B2
A @
3
0
5
0
3
2
1
1
C
C
0C
C
A
1
3x3 Matrices
0
3
B
B
B5
B
@
1
4
7
2
5
1 0
1
C B
C B
B
2C
C · B2
A @
3
0
0
3
2
1 0
1
C B
C B
B
0C
C=B
A @
1
1
C
C
C
C
A
3x3 Matrices
0
3
B
B
B5
B
@
1
4
7
2
5
1 0
1
C B
C B
B
2C
C · B2
A @
3
0
0
3
2
1 0
1
C B
C B
B
0C
C=B
A @
1
?
1
C
C
C
C
A
3x3 Matrices
0
3
B
B
B5
B
@
1
4
7
2
5
1 0
1
C B
C B
B
2C
C · B2
A @
3
0
0
3
2
1 0
1
C B
C B
B
0C
C=B
A @
1
?
1
C
C
C
C
A
3x3 Matrices
0
3
B
B
B5
B
@
1
4
7
2
5
1 0
1
C B
C B
B
2C
C · B2
A @
3
0
0
3
2
1 0
3+8+0
1
C B
C B
B
0C
C=B
A @
1
1
C
C
C
C
A
3x3 Matrices
0
3
B
B
B5
B
@
1
4
7
2
5
1 0
1
C B
C B
B
2C
C · B2
A @
3
0
0
3
2
1 0
1
11
C B
C B
B
0C
C=B
A @
1
1
C
C
C
C
A
3x3 Matrices
0
3
B
B
B5
B
@
1
4
7
2
5
1 0
1
C B
C B
B
2C
C · B2
A @
3
0
0
3
2
1 0
1
11
C B
C B
B
0C
C=B
A @
1
?
1
C
C
C
C
A
3x3 Matrices
0
3
B
B
B5
B
@
1
4
7
2
5
1 0
1
C B
C B
B
2C
C · B2
A @
3
0
0
3
2
1 0
1
11
C B
C B
B
0C
C=B
A @
1
?
1
C
C
C
C
A
3x3 Matrices
0
3
B
B
B5
B
@
1
4
7
2
5
1 0
1
C B
C B
B
2C
C · B2
A @
3
0
0
3
2
1 0
1
11
C B
C B
B
0C
C=B
A @
1
17
1
C
C
C
C
A
3x3 Matrices
0
3
B
B
B5
B
@
1
4
7
2
5
1 0
1
C B
C B
B
2C
C · B2
A @
3
0
0
3
2
1 0
1
11
C B
C B
B
0C
C=B
A @
1
17
1
C
C
C
C
A
etc.
3x3 Determinants?
1
0
2
3
0
2
1
0
1
3x3 Determinants?
1
0
2
3
0
2
1
0
1
3x3 Determinants?
1
0
2
3
0
2
1
0
1
3x3 Determinants?
1
2
0
0
3
2
1
0
1
3
=1⇥
2
0
1
+…
3x3 Determinants?
1
2
0
0
3
2
1
0
1
3
=1⇥
2
0
+…
1
(this determinant is called the cofactor of the 1 entry)
3x3 Determinants?
1
2
0
0
3
2
1
0
1
3
=1⇥
2
0
1
+…
3x3 Determinants?
1
2
0
0
3
2
1
0
1
3
=1⇥
2
0
1
–
2
0⇥
0
+…
0
1
3x3 Determinants?
1
2
0
0
3
2
1
0
1
3
=1⇥
2
0
1
–
2
0⇥
0
+…
0
1
Notice the – !!!!!!
3x3 Determinants?
1
2
0
0
3
2
1
0
1
3
=1⇥
2
0
1
–
2
0⇥
Signs go +, – ,+
0
+…
0
1
3x3 Determinants?
1
2
0
0
3
2
1
0
1
3
=1⇥
2
0
1
–
2
0⇥
0
+…
0
1
3x3 Determinants?
1
2
0
0
3
2
1
0
1
3
=1⇥
2
0
1
–
0⇥
2
0
0
1
2
+ ( 1) ⇥
0
3
2
3x3 Determinants?
1
2
0
0
3
2
1
0
1
3
=1⇥
2
0
1
–
0⇥
2
0
0
1
2
+ ( 1) ⇥
0
3
2
3x3 Determinants?
1
0
2
3
0
2
1
0
=1⇥3
1
=7
0 ⇥ 2 + ( 1) ⇥ ( 4)
3x3 Determinants?
1
0
2
3
0
2
1
0
=1⇥3
0 ⇥ 2 + ( 1) ⇥ 6
1
=7
Not 0 means matrix has an inverse
3x3 Determinants
5 3
1
6 3
19
0 0
1
You do it.
Matrices
Part 5: Adding Matrices
Appendix II
Adding Matrices?
0
+ @
2
101
101
1
1
A
= ???
Adding Matrices
0
+ @
2
101
101
1
1
A
=
0
@
3+(–2)
1
A
Adding Matrices
0
+ @
2
101
101
1
1
A
=
0
@
3+(–2) 4+101
1
A
Adding Matrices
0
+ @
2
101
101
1
1
A
=
0
@
3+(–2) 4+101
5+101
1
A
Adding Matrices
0
+ @
2
101
101
1
1
A
=
0
@
3+(–2) 4+101
1
A
5+101 (–7)+1
Adding Matrices
0
1
0
1
3
0
t2 @ 1 A + t @ 7 A
0
5
Adding Matrices
0
1
0
1
0
1
0
1
3
0
3t2
0
t2 @ 1 A + t @ 7 A = @ t2 A + @ 7t A
0
5
0
5t
Adding Matrices
0
1
0
1
0
1
0
1
3
0
3t2
0
t2 @ 1 A + t @ 7 A = @ t2 A + @ 7t A
0
5
0
5t
0
2
1
3t
= @ t2 + 7t A
5t
Two Important Matrices
Download