Ch 13 Notes File - Solanco School District Moodle

Download Report

Transcript Ch 13 Notes File - Solanco School District Moodle

Chapter 13 Matrices
UEQ: How do you create and perform operations with matrices?
13-1 Organizing Data in a Matrix
EQ: How can matrices assist in organizing data?
13-2 Adding and Subtracting Matrices
EQ: How do you add and subtract matrices
Organizing Data in a Matrix
• Any data that is organized in columns and rows can
be represented as a matrix. Matrices are used to
represent real-world data such as the habits, or traits
of a population of people.
• In order to identify an entry in a matrix, we simply
write a subscript of the respective entry's row followed
by the column.
• In a matrix, we write a23 to denote the entry in the
second row and the third column.
When are matrices used
• One example of how matrices can be used is with
encryption. When a programmer encrypts or codes a
message, he can use matrices and their inverse. The internet
function could not function without encryption, and neither
could banks since they now use these same means to
transmit private and sensitive data.
• Matrices are also used in graphs and statistics for doing
scientific studies in many other different fields.
• Matrices are also sometimes used in computer animation.
Matrices
• A matrix is a rectangular array of numbers.
• The dimensions of a matrix are the number of
rows (horizontal) by the number of columns (vertical).
Ex.
1
2 3
1x3
 1
 0
 
 6 
3x1
210 2  7
 8  12  1


2x3
Addition and Subtraction
Can only be done on matrixes of the same size, as matching parts are
added or subtracted.
A=  6 5 
 4  3


B= 3 2 
1  3


C=  2 3
 5 4


B+A=3 2  +  6 5  = 3  (6) 2  5  =  3 7 
1  3  4  3  1  4
 5  6
- 3  - 3

 
 


Addition and Subtraction
3 2 
1  3


+
 6 x 
 y  3


=
 3 5 
 8  6


Additive Inverse of a Matrix
• Means that you add two matrices together and get a
matrix filled with zeros
• Find the additive inverse of the matrix below
3 2  +  3 w  x2 = 0 0
1  3  




   1 y 3z 
0 0 
• Simply multiply each item by -1 to find the additive
inverse
Homework
Pg 575 2- 22 evens
13-4 Matrix Multiplication
EQ: How do you multiply matrices?
Key question:
How do you perform arithmetic operations with matrices on the calculator?
Scalar Multiplication
• Scalar Multiplication—means multiplying each number
in the matrix by the number outside the matrix
• GIVEN:
A=
6 5
4 3
FIND:
 6 5   6  2 5  2   12 10 
2A = 2 
 =  4  2  3  2 =  8
4

3
 6

 
 
-4A = -4 6 5  = 6  4 5  4 = 24  20
 4  3  4  4  3  4  16 12 

 
 

Matrix Multiplication
• When multiplying matrices, the inner dimensions must be
equal
• That is the columns in the first matrix must equal the
number of rows in the second
Matrix Multiplication and Answer Matrices
Matrix A = m x n and Matrix B = n x p, then the product of these
matrices will result in a matrix of the dimensions m x p.
Let Matrix A = 2 x 3 Matrix B = 3 x 4
Matrix C = 3 x 2
What are the dimensions of the resulting matrix when:
A*B =2x3*3x4
B*C=3x4*3x2
matrix is 2 x 4
can’t be done
C * A = 3 x 2 *2 x 3
matrix is 4 x 3
Is C * A = A * C? Justify answer.
2x3*3x2
Matrix Multiplication
A=
1 8
•
•
•
•
•
•
•
•
B=
6 5
4 3
Can you multiply A X B
Can you multiply B X A
Can you multiply B x C
Can you multiply C X B
Can you multiply B X D
Can you multiply D X B
Can you multiply A X D
Can you multiply D X A.
C=
0 4
4 0
D=
 1 10  8
3 6 9
Matrix Multiplication
• Challenging to complete by hand.
• You must multiply each entry of the each row of the
first matrix by each entry of each columns of the
second matrix
-1
10
-8-8
0 -4
C=
FIND:
4 0
D=
3
1. C * D = 2x2 and 2x3 gives a 2 x 3 answer
0*-1+ -4*3
0*10+ -4*6
0*-8 +-4*-9
4*-1+0*3
4*10+0*6
4*-8 + 0* -9
6
-9-9
Entering Matrices in the Calculator
A=
3 4
7 5
0 2
To Enter Matrix A:
Enter the elements one row at a time pressing
Press
to return to the main screen.
after each element.
Matrices and the calculator
Let A = 1 8
B=
6 5
4 3
C=
0 4
4 0
Place Matrix A, Matrix B and Matrix C into the calculator. Answer the following.
If you receive an error, justify why this could have happened?
1. B + C =
3. B – C
5. 3B – 5C
2. A + B =
4. C - B
6. B x C
Matrix Multiplication
A=
1 8
B=
6 5
4 3
C=
0 4
4 0
D=
 1 10  8
3 6 9
Place each in the calculator then perform the operation.
1. A * B =
2. B * C =
3. C * D =
Homework
Pg 587 2- 20 even
13-3 Determinants
EQ: How can find the determinant of a matrix?
13-5 Multiplicative Inverses
EQ: How can find the multiplicative inverse of a matrix?
Determinants
• Of a two by two
3 2 
1  3


3 * -3 -
1*2
• Notation of the determinant is |A|
= -11
Determinants
• Of a three by three
a b
d e

 g h
c
f 
i 
• aei + bfg + cdh – ceg – fha - ibd
• Notation of the determinant is |A| or det(A)
Determinants
• Example:
0 3
2
  1 1 5


 2  3 6
Multiplicative Inverse of a Matrix
• Means that you multiply two matrices together and get
a matrix filled with 1’s along the main diagonal
• Find the multiplicative inverse of the matrix below
3 2 
1  3 ·


w x
1 0
 y z  = 0 1 




• Simply multiply the items in the first matrix by
1
| A|
Find the Multiplicative Inverse of this Matrix
• Example
3 2 
1  3


1 3 2 


 11 1  3
|A| = -9 – 2 = -11
3
 11

1

 11
 2
11 
3 

11 
Homework
Find the determinant
Pg 580 2, 4, 16, 18
Find the multiplicative inverse
Pg 592 6 to 16 even
13-6 Systems and Matrices
EQ: How can you use matrices to solve a system of equations?
Activation
Solve the system:
x+ y= 5
x – 2y = -4
x+ y= 5
-x + 2y = 4
3y = 9
y=3
x+3=5
x
=2
Solve the following system
-2w + x + y
= -2
-w + 2x – y + z = -4
-2w + 3x + 3y + 2z = 2
w + x + 2y + z = 6
Do you really want to do this by hand?
Do you see a relationship between the equations and the matrix?
x
x+ y= 5
x – 2y = -4
y
ans
1
5
1
1  2  4


What would the following matrix mean?
x
y ans
0
2
1
0

1
3

Using the calculator to solve systems
Enter the matrix
then press matrix arrow over to math
select rref (reduced row echelon form)
press matrix
select matrix A
pressx-1 enter
Example
5
1 1
1  2  4


example
-2w + x + y
= -2
-w + 2x – y + z = -4
-2w + 3x + 3y + 2z = 2
w + x + 2y + z = 6
 2
 -1

-2

 1
1 1
2 -1
3 3
1 2
0 - 2
1 - 4
2 2

1 6
What size is this matrix?
4x5
remember to use the coefficients of all of the variables each time
1 0 0 0 2
What is the final result?
0

0

0
1
0
0
0
1
0
http://www.bluebit.gr/matrix-calculator/linear_equations.aspx
0
0
1
0 
2

0
Homework
Worksheet
Review
• worksheet
Cryptology
• What is cryptology or cryptography?
• Write one paragraph on the topic.
• http://www.unmuseum.org/cipher.htm
• http://home.cogeco.ca/~cipher/
http://rumkin.com/tools/cipher/playfair.php
http://cs.colgate.edu/faculty/nevison/Core139Web/tools/playfair.html
http://www.braingle.com/brainteasers/codes/playfair.php
Inverse Matrices and Cryptography
• Cryptology or code theory is a method of preparing
coded messages that can only be comprehended by
using the “key” to the message.
Inverse Matrices and Cryptography
• One of the most famous accounts of code theory comes from
World War II where a group of American Indians called the
Navajo Code Talkers directed the entire military operation at
Iwo Jima through orders communicated by the Code Talkers.
The Japanese were never able to break the code.
Code talker is a term used to describe people who talk using a coded language.
It is frequently used to describe Native Americans who served in the United
States Marine Corps whose primary job was the transmission of secret tactical
messages. Code talkers transmitted these messages over military telephone or
radio communications nets using formal or informally developed codes built upon
their native languages. Their service was very valuable since codes and ciphers
can be broken, but languages must be studied for a long time before being
understood.
The name code talkers is strongly associated with bilingual Navajo speakers
specially recruited during World War II by the Marines to serve in their standard
communications units in the Pacific Theater. Other Native American code talkers
were used by the United States Army in both World War I and World War II,
using Cherokee, Choctaw and Comanche soldiers. Soldiers of Basque ancestry
were used for code talking by the US Marines during World War II in areas
where other Basque speakers were not expected to be operating.
• We can use matrices to code communication and inverse
matrices to decode the communication.
Inverse Matrices and Cryptography
Encoding and Decoding messages—one method for sending messages that could be dangerous if they fell into the wrong hands
was to choose a 2x2 matrix that had an inverse
--translate the message into a series of numbers
--then group them into 1x2 matrices—if the message has an odd number of characters use a space at the
end
--each matrix is multiplied by the 2x2 matrix and a new series of 1x2 matrices is formed.
--The numbers are then shipped to their destination
--the person on the other end repeats the process by multiplying by the inverse matrix
--then writing the letter equivalent for each number produced.
One such code is:
0=space
1=A 2=B
9=I 10=J
17=Q 18=R
25=Y 26=Z
3=C
11=K
19=S
4=D
12=L
20=T
5=E
13=M
21=U
6=F
14=N
22=V
7=G
15=O
23=W
8=H
16=P
24=X
translate SEND MONEY
S E N D
19 5 14 4
__
0
(a typical message from college students to their parents)
M O N E Y
13 15 14 5 25
[19 5] [14 4] [0 13] [15 14] [5 25]
This code could be used with any two by two matrix that has an inverse:
Encoding with
- 1 2 
 2 - 3


Gives:
[19 5]- 1 2  [14 4]- 1 2  [0 13] - 1 2 
[15 14] - 1
 2 - 3
 2 - 3
 2 - 3
2







[-9 23]
[-6 16]
[26 -39]
therefore the message sent would be
-9 23 -6 16 26 -39 13 -12 45 -65
2
- 3
[5 25] - 1
[13 -12]
[45 -65]
and decoded with
3
2

2

2
1
2
- 3
Cryptography
Below is matrix E. Find the decoding matrix for this, if it exists.
E = 6 2
2 1 


Check (6)(1) – (2)(2) = 2 so it does exist.
Use the calculator and find E-1 =  .5  1
 1

3
Coding Practice
0=space
1=A 2=B
9=I 10=J
17=Q 18=R
25=Y 26=Z
3=C
11=K
19=S
4=D
12=L
20=T
Homework:
Use these original matrices:
 1 - 2
1.
2.
- 1 3 


to code: knock on wood
3.
5=E
13=M
21=U
5
3

6=F
14=N
22=V
7=G
15=O
23=W
8=H
16=P
24=X
2
1
to decode: 111, 40, 129, 48, 125, 50, 95, 37, 82, 32, 47, 16, 100, 40
Create a matrix that has an inverse as your coding matrix,
then code a school appropriate phrase of your own
Use the cryptology spreadsheet to read
your friends’ messages.
http://www.bluebit.gr/matrix-calculator/matrix_multiplication.aspx
10-6 Identity and Inverse Matrices
EQ: What is an inverse matrix and how could it be used in real life applications?
Identity Matrix
• A square matrix has the same number of columns as rows.
• The identity matrix is a square matrix with 1’s long it’s main
diagonal.
1 0
Identity Matrix usually named I = 

0
1


Inverse Matrix
• When a square matrix is multiplied by another square matrix
of the same size results in the identity matrix, you have
inverse matrices
• Note that not every square matrix has an inverse
a b 
Suppose A = 

c
d


The determinant of matrix A =ad – bc
If ad – bc ≠ 0, then A has an inverse
Example
To find the Inverse of a 2 x 2 Matrix
1 2
Suppose A = 

3
4


Enter the matrix
then press matrix
select matrix A
press x-1 and enter
Inverses
Check to identify if the following matrices have inverses. If
they have an inverse, use the calc to find it.
1 2
1. B = 

3
4


8
 6
2. C = 


3

4


http://www.bluebit.gr/matrix-calculator/
Homework
p. 203 - 204
2 – 20 evens and 34
If you still have questions on today’s lesson visit
www.PHSchool.com
web code: age 0775
chapter 4, lesson 5
Homework quiz
web code: aga 0405
REVIEW
p. 229 - 230
12 – 16 evens 22, 24
If you still have questions on today’s lesson visit
www.PHSchool.com
web code: age 0775