Download presentation
Presentation is loading. Please wait.
Published byShanna Woods Modified over 6 years ago
1
Matrices When data from a table (or tables) needs to be manipulated, easier to deal with info in form of a matrix. Fresh Soph Jun Sen A 3 4 2 B 7 C 1 6 D F
2
Terminology Order: If a matrix has m rows and n columns, then the matrix has an order of Entry: The individual pieces of data in the matrix are called entries. The entry in the ith row and jth column is: The diagonal entries occur when i = j. From previous matrix:
3
Special Matrices Square: A matrix with m=n.
Zero: A matrix with all entries = 0. Identity: A square matrix with 1 for each diagonal entry and 0 for each non-diagonal entry. (written as I)
4
Special Matrices – continued
Row: A matrix of order 1 by n, also called a row vector. Column: A matrix of order m by 1, also called a column vector.
5
Operations Add two matrices of the same order.
Subtract two matrices of the same order. Multiply a matrix by a non-zero constant.
6
Example 1 Balance of trade: A-B, exports - imports
A: US oil and coal exports to Canada, Germany, and France B: US oil and coal imports from Canada, Germany, and France
7
Example 2 Create two matrices, A and B, with the following entries:
Power to influence: in a flow of information, who is the key? Create two matrices, A and B, with the following entries:
8
Example 2 – continued Compute A+B. The row sum that is greatest in matrix A+B corresponds to person with most influence.
9
Matrix Multiplication
What does this say? ! What does this say?
10
Product of matrices If one matrix has m rows and p columns and a second matrix has p rows and n columns, then the matrix resulting from their product will be of order The entry in the ith row and jth column of this new matrix is a result of the sum of the product of entries in row i of the first matrix and column j of the second matrix: Essentially, each row of the first matrix is paired with each column in the second matrix.
11
More examples
12
More, more examples
13
Application 1 McDonald’s has sales of its Big Mac, McFish and McChicken sandwiches in Hawaii and Alaska. Matrix X stores info about how many were sold and matrix Y keeps the sales price per item. What is XY and what does it mean?
14
Application 2 n o w o r n e v e r 14 15 23 27 15 18 27 14 5 22 5 18
Encode the phrase “now or never” with the given code matrix: n o w o r n e v e r
15
Gauss-Jordan Elimination
More efficient to use matrices to solve systems of equations Augmented matrix: coefficients plus right-hand side values Use operations as before, only now on the rows of the matrix Systematic way to turn coefficient matrix into identity matrix Swap two rows Multiply row by non-zero constant Add a multiple of one row to another row
16
System of equations in matrix form
Coefficient matrix Augmented matrix Goal:
17
Example 1
18
Example 2
19
Example 3
20
Example 4
21
Matrix Inverses The (multiplicative) inverse of 3 is since or
For square matrices, A and B are inverses of each other if or And we write:
22
Example
23
2 by 2 Inverses In general, if A is a 2 by 2 matrix:
If ad - bc = 0, then A has no inverse.
24
Application to decoding messages
Multiply message by A to encode: Multiply by A inverse to decode:
25
Example 1 Decode the message that was encoded with the following matrix:
26
Example 2 Decode the message that was encoded with the following matrix:
27
Leontief Input–Output Model
Look at interrelationships between industries in a given economy. A sector of the economy will use resources from itself and other sectors in its production run. Open model: production uses some commodities, the rest not used are considered surplus. Closed model: production uses 100%, all inputs/outputs are part of the economy, no surplus
28
Two models Gross production, a column vector
Technology (or consumption) matrix, describes relationship between inputs/outputs Surplus, another column vector Open Model Closed Model
29
Example 1 Given an economy made of Agriculture and Manufacturing.
Technology matrix describes inputs (rows) needed for outputs (columns). 1 unit of Agr. requires units of Agr. and units of Man. 1 unit of Man. requires units of Agr. and units of Man. If 100 units of each is produced, what is left in surplus? units of Agriculture and units of Manufacturing are left in surplus.
30
Example 1 – cont. Produce units of Agr. and units of Man.
If a surplus of 80 Agr. units and 540 Man. units is desired, what should be produced? Produce units of Agr. and units of Man.
31
Example 2 Given a closed economy, find the budgets(outputs) for government, industry and households. Here the first column represents: 1 unit of Gov. requires units of Gov., units of Ind. and units of House.
32
Example 2 – continued
33
Linear Inequalities Solution to inequality in one variable – interval on number line Solution to inequality in two variables – points in the plane Graph equation Use solid line or curve if ≤ or ≥. Use dashed if < or >. Test a point to see if it belongs or not. Shade appropriate region. Solution to system of inequalities in two variables – overlap Do above steps for each inequality. The shaded overlap is the solution, all points that satisfy all inequalities.
34
Example 1 4 2 2 6 Does (0, 0) satisfy the inequality?
35
Example 2 Intersections? Does (0, 0) satisfy first inequality?
4 2 2 6 Does (0, 0) satisfy first inequality? So every point in the region with (0, 0) is Does (0,0) satisfy second inequality?
36
Example 3 Intersection? 80 60 40 Corner Points: 20 80 100
37
Example 4 Intersections? 8 6 4 Corner Points: 2 8 10
38
Example 5 Intersection? Corner Points: 60 50 40 30 20 10 20 40 60 80
100
39
Linear Programming Operations Research – Engineering and Math
Management Sciences – Business Modeling situations in a linear environment Linear inequalities (constraints), restrictions Linear objective function, goal to be optimized Minimum cost, Maximum revenue, Maximum profit Goals for this section Write the linear programming problem Solve the problem graphically
40
Linear Program (LP) Characteristics
LP: optimize objective subject to constraints generates feasible region, collection of all possible solutions Need to find the solution(s) in the feasible region that is best. feasible region is closed and bounded: max & min values exist feasible region is not closed and bounded: max only, min only, or no solution If LP has a solution, then optimal value can be found at a corner point. If two corner points are optimal, then any point on the line connecting them is optimal. (infinitely many optimal solutions)
41
Example 1 Apple Pie: 3/4 cup of sugar, 1 egg, $2.5 in profit
Peach Cobbler: 1 ½ cups of sugar, 1 egg, $3 in profit With only 60 eggs and 80 cups of sugar available, how many of each pie should you make in order to maximize your profits? Formulate an LP for this problem.
42
Example 1 – continued Corner Points, Profit 60 50 40 30 20 10 20 40 60
(0,0) 20 40 60 80 100
43
Example 2 Based on the table, that gives mg per
serving for three nutrients, how many servings of each food is required to meet the minimal needs and keep the amount of nutrient C to a minimum? Formulate an LP for this problem.
44
Example 2 – continued Intersection? Corner Points, C 20 16 12 8 4 2 4
10
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.