chapter3

advertisement
Chapter 3: Linear Algebra
I. Solving sets of linear equations
ex: solve for x, y, z.
3x + 5y + 2z = -4
2x
+ 9z = 12
4y + 2z = 3
(can solve longhand)
More commonly:
 3 5 2   x   4 
 2 0 9   y   12 

   
0 4 2   z   3 
3 5 2
2 0 9

0 4 2
4 
12 
3 
(can solve same problem
using matrix algebra tricks)
ex: Boas- see transparency.
Allowed Moves: “Row operations”
1)
2)
3)
Exchanging two rows (not columns!)
Multiply or divide a row by a nonzero constant.
Add or subtract one row from another.
ex: Pre-class assignment
ex: Circuit- see transparency and pg. 2
ex: Circuit: Find i1, i2, i3.
(Halliday and Resnick, Ch. 28, 33P)
ex: Circuit (continued)
II. Determinants
(only works for square matrices)
Notation: a11 a12
a21 a22
a13
a23
a31 a32
a33
We can extract much useful information from a matrix by boiling it down to
one number called a determinant.
A. To find the determinant:
1) 2x2 matrix:
a b
c d
 ad  bc
2) 3x3 matrix:
a11 a12
a21 a22
a31 a32
a13
11
a22
a23  ( 1) a11
a32
a33
a23
a33
1 2
 ( 1) a12
a21 a23
a31 a33
1 3
 ( 1) a13
You can do this with any row of column.
ex:
1 2 0
M  3 0 4 
0 2 1 
Find det(M)
*each person gets a different row or column*
a21 a22
a31 a32
3) 4x4 matrix: analogy to 3x3.
And so on…
Useful facts: transparency
Do examples illustrating each – base on previous example.
Can use these to simplify finding determinants.
ex:
1 2 0


same M  3 0 4 
0 2 1 
Preclass Q1
B. Cramer’s Rule
Say we have a system of equations:
 a1 b1 c1 
a b c 
2
2
 2
(e.g. 2 equations and 2 unknowns.)
The solutions for x and y are:
x
det(M1 )
det(M )
y
det(M2 )
det(M )
Where
 c b1 
 a1 b1 
 a1 c1 
M1   1
M

M

2
3

a b 
a c 
2
c2 b2 
 2
 2 2
(this generalizes any n equations with n unknowns.)
ex:
3 0 2 1 
0 2 3 4 


3 6 7 12 
Preclass Q2
find?
III. Matrix Operations
3 2
 1 2
 1 3  , M  3 1  , M   1 2 3 
M

Let 1 
2
3
3 1 2 





 4 5 
2 2
1) Dimension:
(# rows) x (# columns)  dim (M1) = 3x2 , dim(M3) = 2x3
2) Equality:
 a11


am1
a1n   b11
b1n 


 

amn  bm1
bmn 
iff aij  bij  i & j
Note:
a) Matrices must be same size (same dimension).
b) This is really a set of mxn equations (aij=bij).
c) Row reduction does not give equal matrices.
3) Transpose:
(Exchange rows and columns.)
Then
3 1 4 
M 

2
3
5


T
1
4) Multiplying by a scalar:
ex:
6 4 
2M1   2 6 
8 10 
5) Adding matrices:
ex:
4 4
M1  M2   4 4 
 6 7 
Note: can’t add M1 and M3 because they aren’t the same dimension.
6) Multiplying Matrices: (nxm matrix) x (mxn matrix) = (nxn matrix)
3 2
 9 8 13 
1 2 3 

M1  M3   1 3  

10
5
9
 

3
1
2


 4 5 
19 13 22 
ex:
ijth element [M1M3]ij = Multiply row i by column j and add up terms.
7) Special Matrices:
• Unit matrix: All diagonal terms are 1, and all others are 0.
1
0
I
0

0
0
1
0
0
0
0
1
0
0
0 
U
0

1
(square nxn matrix)
Note: I·M=M·I=M for any matrix M of the same dimension as I.
• Diagonal matrix:
1 2 3

0
4
5


0 0 6 
Lower diagonal:  1 0 0 
2 3 0


 4 5 6 
Upper diagonal: 
8) Inverse of a matrix: M-1 of a square matrix M is defined by M-1·M=1 and M·M-1=1.
Not all matrices M have an inverse M-1.
Finding M-1 is a trick! Mathematica or (tediously) by hand.
By hand:
M is square, so we can find det(M).
Then
M 1  det(1M ) CT
where C is the matrix of cofactors Cij of elements Mij.
defn: Cofactor Cij of Mij is
(-1)I+j •
determinant of matrix remaining
when row I and column j are
crossed out of M.
ex:
0 2 3 
M  3 0 2
 1 3 2
2
5 0
C23  ( 1)
 ( 1)( 2)  2
1 3
ex: Find M-1
0 2 1
M   1 0 2 
 1 1 2 
IV. Examples
1)
3 2 1  x   3 
3x + 2y + z = -3

   
x +
2z = 1   1 0 2  y    1 
2x + y
= 4
2 1 0   z   4 
A
We write Ax = b
To solve for x: Ax = b
A-1Ax = A-1b
x = A-1 b
x  b
ex: eliz’s project
laser 
Two positions: Measure Tsurf, Ths, Tamb at each.
Can write down equation for each slice relating 3 temps.  20 coupled equations!
Write in the form:




A
A
  P1   Ts1 
   

  

 P20  Ts 20 
P  Ts
AP = Ts  P = A-1Ts
(Matlab solves in 30 seconds.)
2) Geometry: Reflection
1 0  x    x 
 0 1  y    y 

   
y
(-x,y)
(x,y)
x
(reflects about x-axis)

  x  x 
 ?  y    y 

   
(reflects about the y-axis)
3) Geometry: Rotation of coordinates
y’
y
(x’,y’)
(x,y)
x’
θ
x
x   x cos  y sin
y    x sin  y cos
 cos

  sin
sin   x   x  
 



cos   y   y 
(rotates coordinates by θ)
ex: Say I reflect (3,2) about the x-axis and then the y-axis. Then what are it’s
coordinates if I use a new coordinate system rotate by /6?
4) Geometric Optics
θ2
θ1
y2
y1
Lens
(focal lenth f1)
d
Lens
(focal lenth f2)
Describe each ray by height y and angle θ.
Given (y1, θ1), what is (y2, θ2) at the output?
ex: Propagating through free space
y 2  y1  1d
1 d 
M

0 1 
θ2
θ1
d
y
d  y
2
2
 sin1
 y  d1
ex: Refraction at boundary
y2  y1
n1 sin1  n2 sin2
 n11  n22
n1
 2  1
n2
1 0 

M
n
1
0

n2 

y2
θ2
y1
θ1
V. Eigenvectors & Eigenvalues
For a given operator (matrix) M, are there any vectors that are left unchanged
(except for scaling the length) by M?
eg:
Mx   x
where λ is a constant
ex: Reflection at about the y-axis
1 0
M

0
1


Eigenvectors [K1,0] , [0,K2] where K1, K2 
Eigenvalues λ=-1 λ=1
(-x,y)
(x,y)
ex: Rotation
 cos
M
 sin
sin 
cos 
If θ = 180o, Eigenvectors: all [x,y], eigenvalue λ=-1
If θ = 360o, Eigenvectors: all [x,y], eigenvalue λ=1
If θ is any other value, there are no eigenvectors & eigenvalues
y
θ
(x,y)
x
More formally:
To find eigenvalues:
b 
a b  a  
M

 
d   
c d   c
Characteristic equation:
a
b
0
c
d 
 (a   )(d   )  bc  0
Solve for eigenvalues ; then you can get the eigenvectors
So, applying this to our examples:
ex: Reflection about y-axis
0 
1 0 1 
M



0
1
0
1



 

To find the eigenvalues:
Characteristic equation:
What are the eigenvectors?
ex: Rotation
 cos
M
 sin
Eigenvalues:
Eigenvectors:
sin  cos  
sin 


cos    sin
cos   
ex: Find eigenvalues and eigenvectors
5 0 2 
M  0 3 0 
 2 0 5 
Download