Chapter 2 and More MATRICES - avon-schools.org B... · Chapter 2 and More MATRICES Chapter 2, Day...

21
Discrete Math B Chapter 2 + Supplements: MATRICES 1 Chapter 2 and More MATRICES Chapter 2, Day 1: Matrices, Basic Matrix Operations (Lessons 2.3 & 2.4 pg 86 107) A matrix is a rectangular array of numbers like: This matrix has _____ rows and _____ columns. When we want to describe a particular entry in an m-by-n matrix, we use the notation , ij a where (, ) ( , ) ij row column position. For example, in the matrix above: 1,2 a = 2,3 a = The number -1 is in the _________ position. Adding/Subtracting Matrices If two matrices are the same size (mxn) then you can add or subtract them by combining corresponding elements. Example 1: Add or subtract the following matrices. Write “undefined” for expressions that are undefined. a. 2 4 3 0 5 9 4 8 b. 3 4 2 9 5 6 4 8 7 8 2 3 9 10 1 11 c. 3 4 1 5 1 0 7 8 1 7 3 6 4 d. 2 4 8 x x x x x x x x 3 5 1 2 4 7

Transcript of Chapter 2 and More MATRICES - avon-schools.org B... · Chapter 2 and More MATRICES Chapter 2, Day...

Discrete Math B Chapter 2 + Supplements: MATRICES 1

Chapter 2 and More MATRICES

Chapter 2, Day 1: Matrices, Basic Matrix Operations (Lessons 2.3 & 2.4 pg 86 – 107)

A matrix is a rectangular array of numbers like: This matrix has _____ rows and _____ columns.

When we want to describe a particular entry in an m-by-n matrix,

we use the notation ,i ja where ( , ) ( , )i j row column position.

For example, in the matrix above:

1,2a = 2,3a =

The number -1 is in the _________ position.

Adding/Subtracting Matrices If two matrices are the same size (mxn) then you can add or subtract them by combining corresponding elements. Example 1: Add or subtract the following matrices. Write “undefined” for expressions that are undefined.

a. 2 4 3 0

5 9 4 8

b.

3 4 2 9

5 6 4 8

7 8 2 3

9 10 1 11

c.

3 4 15 1

0 7 81 7

3 6 4

d. 2 4 8x x x x x x x x

3 5 1

2 4 7

Discrete Math B Chapter 2 + Supplements: MATRICES 2

Multiplication by a Scalar Factor: Multiply each entry in the matrix by the factor

b c ab ac

ad e ad ae

Example 2: Simplify. Write undefined for any expression that may be undefined.

a. 3 8

7

x

y

z

b.

2 3

2 4 2 3

1 0 2

x x

x y y

x

Multiplying Matrices Let A be an m x n matrix Let B be an n x k matrix To find the product: Multiply each element in the row of A by the corresponding element in the column of B, then add these products. The product matrix AB is an m x k matrix. Example 3: Find the product

22 4 6

31 3 0

4

SAMPLE: Find the product AB

2 3 1

4 2 2A

1

8

6

B

A is 2 x 3 B is 3 x 1 AB will be 2 x 1 Step 1: Multiply the elements of the first row of A and the corresponding elements in the column of B. 2(1) + 3(8) + -1(6) = 20 Step 2: Multiply the elements of the second row of A and the corresponding elements in the column of B. 4(1) + 2(8) + 2(6) = 32 Step 3: Write your solution as a 2 x 1 matrix.

20

32

Discrete Math B Chapter 2 + Supplements: MATRICES 3

Example 4: Find the product. Write “undefined for expressions that are undefined.

a) 2 1 3

5 8 2

b)

0 22 2 1

1 43 0 1

0 2

c) 2 1 1 0 4

3 6 5 2 0

d)

1 1 2 2 3

3 2 1 3 2

4 5 2 4 5

Discrete Math B Chapter 2 + Supplements: MATRICES 4

Example 4 (continued): Find the product. Write “undefined for expressions that are undefined.

e) 2 5 3 1 2 3

7 4 6 3 2 1

f)

3

2 2 4 6 1

1

Discrete Math B Chapter 2 + Supplements: MATRICES 5

Chapter 2, Day 2: Determinants A determinant is a special number associated with a square matrix. The determinant has several useful applications in algebra and other advanced mathematics courses. Notation:

Matrix Notation (square brackets) 2x2 a b

c d

3x3

a b c

d e f

g h i

Determinant Notation (straight brackets) 2x2 a b

c d 3x3

a b c

d e f

g h i

(This notation represents “find the determinant of the matrix”) Also: det(A) or detA represents “the determinant of matrix A” 2x2 Matrices The determinant of a 2 x 2 matrix is found as follows: Example 1: Find the determinant of each 2 x 2 matrix

a) 3 4

5 6

b) 1 3

6 7

Example 2: Find each determinant.

a) 2 3

5 10

b)

2 7

3 5

c)

7 8

x x

Discrete Math B Chapter 2 + Supplements: MATRICES 6

3x3 Matrices The determinant of a 3x3 matrix is found as follows: This is easier to find using a little trick called “The Rule of Sarrus”: 1. Copy the first two columns next to column 3. 2. Multiply the three “southeast” (downward)diagonals. Find the sum. 3. Multiply the three “northeast” (upward) diagonals. Find the sum. 4. Determinant = (SE sum) – (NE sum) bottom – top Example 3: Find the determinant of each matrix.

a)

1 3 5

2 1 3

4 5 2

b)

2 3 1

4 2 3

2 2 1

Watch out! Example 4: Evaluate

1 2 3

1 2 3

3 2 1

Discrete Math B Chapter 2 + Supplements: MATRICES 7

Chapter 2, Day 3: Cramer’s Rule Matrices can be used to solve systems of linear equations. Remember that a system of equations is two or more equations. A solution is any ordered pair (or higher) that satisfies the equation. A system of equations has three potential solution types:

Cramer’s Rule is a method of solving systems of linear equations using matrices instead of the methods you learned in Algebra (Substitution/Elimination/Graphing). Example 1: Solve using Cramer’s Rule

Step 1: Write the system of equations as a coefficient matrix and an answer matrix.

Step 2: Find the determinant of the Step 3: Replace the “x” column of Step 4: Replace “y” column of coefficient matrix. This is called “D”. the coefficient matrix with the coefficient matrix with answer column. Find deter- answer column. Find deter- minant. This is called Dx. minant. This is called Dy.

Step 5: , Dx Dy

x yD D

Step 6: Check your answer!!!

4 5 17

3 2 7

solution: 3, 1

x y

x y

4 5 17

3 2 7

x y

x y

Discrete Math B Chapter 2 + Supplements: MATRICES 8

Example 2: Solve using Cramer’s Rule a) b) c)

Discrete Math B Chapter 2 + Supplements: MATRICES 9

Example 2 (Continued) : Solve using Cramer’s Rule d) e)

Discrete Math B Chapter 2 + Supplements: MATRICES 10

Chapter 2, Day 4: Using Technology

Working with Matrices in the TI 83/TI83plus/TI84 Graphing Calculator

TI-83 Matrix Menu

Note: Some TI 83 models do not require you to “shift” to access the matrix menu.

BASIC OPERATIONS Use the graphing calculator to perform the following operations: 1. 2.

2 4 3 0

5 9 4 8

2 4 3 0

5 9 4 8

3. 2 4 1

5 9 4

4. 2 4

55 9

5.

3

2 2 4 6 1

1

6. 2 5 3 1 2 3

7 4 6 3 2 1

MATRX 2nd x-1

About the Matrix (MATRX) menu:

NAMES – used to paste the name of a matrix into the home screen or into a program.

MATH – contains all the operations that can be done with a matrix.

EDIT – where you set the size of the matrix and enter the elements.

Discrete Math B Chapter 2 + Supplements: MATRICES 11

DETERMINANTS In the matrix menu, use the EDIT screen to enter your matrix. Use 2nd (MODE) to quit to the main screen. In the matrix menu, use the MATH screen to paste det( into your home screen and the NAMES screen to paste the name of the matrix. Close ) and hit enter

Use the graphing calculator to find the determinant of each of the following matrices.

7.

2 3

5 10

8.

1 3 5

2 1 3

4 5 2

9.

1 2 3

1 2 3

3 2 1

CRAMER’S RULE Solve using Cramer’s Rule: Be sure to show the values of D, Dx, Dy, and Dz (if applicable) 10. 11.

Discrete Math B Chapter 2 + Supplements: MATRICES 12

Chapter 2, Day 5: Row Operations and The Gauss-Jordan Method Row Operations We will be using “Row Operations” to manipulate matrices to help us solve systems and canvas. What you are allowed to do: 1. INTERCHANGE TWO ROWS

Example: Interchange 1 2 and R R

2. MULTIPLY THE ELEMENTS OF A ROW BY A NONZERO REAL NUMBER

Example: 1 13 R R

3. ADD A NONZERO MULTIPLE OF THE ELEMENTS OF ONE ROW TO THE CORRESPONDING ELEMENTS OF A NONZERO MULTIPLE OF SOME OTHER ROW.

Example: 3 1 12 R R R

Gauss-Jordan Method Strategy: 1. Write the system of equations as an augmented matrix 2. Use Row Operations to transform the matrix into a matrix with whole numbers on the main diagonal, but 0’s elsewhere. 3. Use Row Operations to transform the matrix into an “identity” matrix. (1’s on diagonal, 0’s elsewhere) 3. Final solution = numbers in the “answer” column of the matrix.

Example: 15

31 0

0 1

Example:

1 0 0 4

0 1 0 2

0 0 1 3

Meaning: Meaning:

2 1 1 2

1 3 2 1

1 1 1 2

2 1 1 2

1 3 2 1

1 1 1 2

2 1 1 2

1 3 2 1

1 1 1 2

Discrete Math B Chapter 2 + Supplements: MATRICES 13

Example : Use the Gauss-Jordan Method to solve each system of equations

a) 2 4 2

3 5 0

x y

x y

b) 3 4 1

5 2 19

x y

x y

Make it happen: Your Goal:

1 0

0 1

#

#

or

1 0 0

0 1 0

0 0 1

#

#

#

Using legal row operations:

0

# # #

# #

0

0

# #

# #

1 0

0 1

#

#

0

0

# # # #

# # #

# # #

0

0

0 0

# # #

# # #

# #

0 0

0 0

0 0

# #

# #

# #

1 0 0

0 1 0

0 0 1

#

#

#

Discrete Math B Chapter 2 + Supplements: MATRICES 14

Example (Continued): Use the Gauss-Jordan Method to solve each system of equations

c) 2 2

3 6 5

x y

x y

d)

3

2 3 7 0

3 2 17

x y z

x y z

x y z

Discrete Math B Chapter 2 + Supplements: MATRICES 15

Example (Continued): Use the Gauss-Jordan Method to solve each system of equations

e)

2 5 4 8

2 2 4

2 2

x y z

x z

x y z

f)

5 6

3 3 10

3 2 5

x y z

x y z

x y z

Discrete Math B Chapter 2 + Supplements: MATRICES 16

5 2 5

3 3 3 9

2 4 6

x y z

x y z

x y z

Working with Matrices in the TI 83/TI83plus/TI84 Graphing Calculator

Reduced Row Echelon Form (Gauss Jordan Result) Using the TI83 Graphing Calculator to solve a system of equations

You Try: Use the Graphing Calc to solve:

5 6

3 3 10

3 2 5

x y z

x y z

x y z

INSTRUCTIONS 1. In the matrix menu, use the EDIT screen to enter the augmented matrix that represents your system.

2. Quit to the home screen.

3. Go to MATRX and MATH. Scroll down and hit ENTER to select B: rref( 4. Go to MATRX and NAMES. Hit ENTER to paste [A] to your home screen. Close the parenthesis.

5. Press ENTER and read the solution from the matrix.

Discrete Math B Chapter 2 + Supplements: MATRICES 17

Chapter 2, Day 6: Modeling and Solving Using Matrices Set up an augmented matrix to represent the problem. Use Cramer’s Rule, Gauss Jordan, or a graphing calculator to solve the system of equations and answer the given question. Example 1: (ex. 6 pg 78-80) A convenience store sells 23 sodas one summer afternoon in 12-oz, 16-oz, and 20-oz cups (small, medium, and large). The total volume of soda sold was 376 oz. Suppose the prices for a small, medium, and large soda are $1, $1.25, and $1.40, respectively, and that the total sales were $28.45. How many of each size did the store sell? Example 2: (exercise #45 pg 83) A knitting shop orders yarn from three suppliers in Toronto, Montreal, and Ottawa. One month the shop ordered a total of 100 units of yard from these suppliers. The delivery costs were $80, $50, and $65 per unit for the orders from Toronto, Montreal, and Ottawa, respectively, with a total delivery cost of $5990. The shop ordered the same amount from Toronto and Ottawa. How many units were ordered from each supplier?

Discrete Math B Chapter 2 + Supplements: MATRICES 18

Example 3: (exercise #46 pg 83) An electronics company produces three models of stereo speakers, models A, B, and C, and can deliver them by truck, van, or station wagon. A truck holds 2 boxes of model A, 2 of model B, and 3 of model C. A van holds 3 boxes of model A, 4 boxes of model B, and 2 boxes of model C. A station wagon holds 3 boxes of model A, 5 boxes of model B, and 1 box of model C. a) If 25 boxes of model A, 33 boxes of model B, and 22 boxes of model C are to be delivered, how many vehicles of each type should be used so that all operate at full capacity?

Discrete Math B Chapter 2 + Supplements: MATRICES 19

Chapter 2, Day 7: Geometric Transformations using Matrices

We can use matrices to represent geometric figures:

A transformation is a change made to a figure. The original figure is called the preimage, while the transformed figure is called the image.

TRANSLATION When we slide a figure without changing the size or shape of the figure, it is said to be a translation. By using matrix addition, we can translate the vertices of a figure. Example 1: Given a triangle ABC where A(-4,1), B (-2,5), and C(0,2), translate the preimage 5 units right and 3 units down. Then sketch the image Preimage Matrix + Translation Matrix = new image Example 2: Given a quadrilateral ABC where A(3,0), B(5,2), C(5,4), and D(2,4). Translate the preimage six units left and 2 units up. Then sketch the image.

x

y

x

y

Discrete Math B Chapter 2 + Supplements: MATRICES 20

DILATION A dilation is a transformation that changes the size of the preimage. Dilation factor x preimage matrix = new image Example3: Given a triangle ABC where A(-2,0), B(0,4) and C(2,1), increase the triangle by a factor of 1.5. Then sketch the image. REFLECTIONS (FLIPS) A reflection, or flip, is a transformation that creates symmetry on the coordinate plane. A reflection maps a point or figure in the coordinate plane to its mirror image using a specific line as its line of reflection. Usually we use the following lines of reflection:

Reflection Matrix x Preimage Matrix = New Image Example 4: Given quadrilateral A(2,1), B(8,1), C(8,4), and D(5,5), find the coordinates of the image after a reflection: a) Across the y-axis b) Across y = x

x

y

Discrete Math B Chapter 2 + Supplements: MATRICES 21

ROTATIONS (SPINS) A rotation turns a figure around a fixed point. We usually consider the rotation to be clockwise around the origin as the fixed point.

Rotation Matrix x Preimage Matrix = New Image Example 5: Rotate the triangle with vertices A(1,1), B (5,2), and C(-2,3) by the stated amount. Give the vertices of the new image. a) 90 degrees b) 180 degrees Example 6: A triangle has vertices A(1,1), B(5,2), and C(-2,3). The triangle is rotated 90 degrees. Then the triangle is reflected across the y-axis. Then the triangle is translated right 3 units and down 4 units. What are the FINAL coordinates of the image?