1 / 50

ENGG2013 Unit 3 RREF and Applications of Linear Equations

ENGG2013 Unit 3 RREF and Applications of Linear Equations. Jan, 2011. A motivating example. A TRAFFIC FLOW PROBLEM. A Traffic flow problem. A round-about connecting 5 roads The traffic within the circle is counter-clockwise. Question: model the traffic in each section of the round-about.

ipaula
Télécharger la présentation

ENGG2013 Unit 3 RREF and Applications of Linear Equations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ENGG2013Unit 3 RREF and Applications of Linear Equations Jan, 2011.

  2. A motivating example A TRAFFIC FLOW PROBLEM ENGG2013

  3. A Traffic flow problem • A round-about connecting 5 roads • The traffic within the circle is counter-clockwise. • Question: model the traffic in each section of the round-about http://www.beyond.ca/how-to-navigate-a-traffic-circle-roundabout/210.html ENGG2013

  4. Modeling a round-about 100 200 150 400 x1 100 x5 300 x2 x4 The unit is numberof vehicles perhour. 50 x3 50 150 100 Can we find x1, x2, x3, x4 and x5? ENGG2013

  5. In-flow = out-flow 100 200 150 400 x1 100 x5 x2 300 x4 50 x3 50 150 100 ENGG2013

  6. We need to solve … x1 x2 x3 x4 x5 Representationusing augmented matrix ENGG2013

  7. Last time: Gaussian elimination • Step 1: Try to transform the matrix into upper triangular form • Step 2: Backward substitution ENGG2013

  8. Row operations (5)  (5)+(1) (5)  (5)+(2) (5)  (5)+(3) (5)  (5)+(4) Equation 5 is redundant ENGG2013

  9. Choose a free variable • In this example, we can pick any variable as the “free variable”. • Let’s pick x5 as the free variable for example. • Expressed in terms of x5, we get: But x1 to x5 are trafficflow in the round-aboutand cannot be negative.This restricts the value ofx5 to be at least 150. x4 = x5 – 100  0 x3 = (x5 – 100)+ 50 = x5 – 50  0 x2 = (x5 – 50)– 100 = x5 – 150  0 x1 = (x5 – 150)+ 50 = x5 – 100  0 ENGG2013

  10. General solution System of linear equations: Solution: where f is a real numberlarger than or equal to 150 This is called the general solutionbecause all possible solutionscan be put in this form ENGG2013

  11. Discussions • The system of linear equations is underdetermined. • A car endlessly going around the circle without exiting is undetectable in this model. • We cannot determine the traffic flow uniquely • There are infinitely many solutions. • How to remove redundant equalities in general? • The variables in this example are subject to non-negativity constraint. • In many applications, the variables cannot be negative. ENGG2013

  12. REDUCED ROW ECHELON FORM ENGG2013

  13. Pivot • Example from last time (3)  (3) + (2)/2 pivot (2)  (2) – (1) pivots ENGG2013

  14. Sometimes we cannot find pivot (2)  (2) – 2(1) (3)  (3) – 3(1) Cannot find a pivotin the second column ENGG2013

  15. Row Echelon Form (REF) • A leading entry in a row means the first nonzero entry from the left. • A rectangular matrix is in row echelon form if • All nonzero rows are above any all-zero row. • All entries below a leading entry are zeros. • In any pair of adjacent nonzero row, say row i and row i+1, the leading entry in row i is to the left of the leading entry of row i+1. • Examples (triangles indicate the leading entries) ENGG2013

  16. Non-examples of REF • All nonzero rows are above any all-zero row. • All entries below a leading entry are zeros. • In any pair of adjacent nonzero row, say row i and row i+1, the leading entry in row i is to the left of the leading entry of row i+1. ENGG2013

  17. Reduced Row Echelon Form (RREF) • All nonzero rows are above any all-zero row. • All entries above and below a leading entry are zeros. • In any pair of adjacent nonzero row, say row i and row i+1, the leading entry in row i is to the left of the leading entry of row i+1. • All leading entries are equal to 1. The concept of RREF appliesto all matrices in general, not just augmented matrix. Examples ENGG2013

  18. Non-examples of RREF ENGG2013

  19. Theorem • By applying the three types of elementary row operations, we can reduce any rectangular matrix to a matrix in reduced row echelon form (RREF).(In other words, any matrix is row equivalent to a matrix in RREF) • Furthermore, the RREF of a matrix is unique. ENGG2013

  20. A row reduction algorithm • Scan the columns from left to right. • Start from the 1st column. • If this column contains a pivot (a nonzero entry), move the pivot to the top by exchanging rows ENGG2013

  21. Algorithm (cont’d) • Make all entries below and above the pivot equal to 0. • Move to the next column and try to locate a nonzero entry which is not in any row already containing a pivot. • Repeat step 5 until you can find such column. ENGG2013

  22. Algorithm (cont’d) • Repeat step 3 to step 6 until we reach the right-most column. • Finally, normalize all leading entries to 1. The RREF of is ENGG2013

  23. SOLVING LINEAR EQUATIONS USING RREF ENGG2013

  24. Parametric representation • How to represent a solution set? • Example: How to plot points on a straight line? We can solve for yin terms of xy = (2 – 2x) / 3 y 2x+3y=2 x x is a parameter whose value can be freely chosen. ENGG2013

  25. Parametric representation of circle • How about a circle x2+y2=1? We can also solve for yin terms of xy = (1 – x2)^(1/2) y x x is a parameter whose value can be freely chosen. ENGG2013

  26. There are many choices for parameters y y 2x+3y=2  x x We can pick y as the parameter We can pick  as the parameter x = (2 –3y)/2y = free x = cos  y = sin   between 0 and 2 ENGG2013

  27. Parametric representations of a plane • 2x + 3y – z = 5 If x and y are the parameters,the representation is x = free y = free z = 2x+3y–5 If y and z are the parameters,the representation is If x and z are the parameters,the representation is x = (5+z–3y)/2 y = free z = free x = free y = (5+z–2x)/3 z = free ENGG2013

  28. Parametric representation ofthe solutions to a linear system • First row reduce the system of linear equations to a reduced row echelon form. Solve Transform to RREF ENGG2013

  29. Pick the free variable(s) • Pick the variable(s) which is/are not associated with a column with pivot as “free variable”. x y z Pick z as a free variable ENGG2013

  30. Solve for the non-free variables • Express the “non-free” variables in terms of the “free” variables. ENGG2013

  31. General solution • The general solution to can be represented parametrically as General solution means1) All solutions can bewritten in this form2) Every (x,y,z) in thisform is a solution. ENGG2013

  32. The solutions in set notation stands for the set of all triples with real numbers as components means “belong to” ENGG2013

  33. How to plot the solutions? z is the parameter We get (0,3,-2), (1,1,-1), (2,-1,0) etc, as solutions to ENGG2013

  34. Solution Set The solutions form a straightline in the 3-D space. ENGG2013

  35. Application 1 A PRODUCTION MODEL IN ECONOMICS ENGG2013

  36. A production model in economics • Consider a close economy • one steel plant • one coal mine • To produce 1 ton of steel, 0.5 ton of coal is consumed by the steel plant. • To produce 1 ton of coal, 0.1 ton of steel is used. Steel Plant Coal mine 100 tons of coal 50 tons of coal 100 tons of steel 10 tons of steel ENGG2013

  37. Question • We want to produce 400 tons of steel and 300 tons of coal. 400 To produce 1 ton of steel, we need 0.5 ton of coal. To produce 1 ton of coal, we need 0.1 ton of steel. 200 Does not work! 30 300 ENGG2013

  38. Formulation as a linear system • Suppose that the total output of steel plant is xS and the total output of coal mine is xC. 400 Total output ofthe steel plant 0.1 xC goes tothe coal mine 400 tonsare exported 0.1 xC 0.5 xS Total output ofthe coal mine 0.5 xS goes tothe steel plant 300 tonsare exported 300 ENGG2013

  39. Solve a system of two equations In augmented matrix form Solution:xS = 452.63 xC = 526.32 ENGG2013

  40. Internal consumption xS = 452.63 Steel Plant 400 tons of steel 226.32 tonsof coal 52.63 tons of steel Coal mine 300 tons of coal xC = 526.32 The red links indicate internal consumption ENGG2013

  41. Leontief’s input-output model • Proposed by Prof. Wassily Leontief (1905~1999) from Harvard. • He modeled the economy of USA using linear algebra. • From wikipedia: “Around 1949, Leontief used the primitive computer systems available at the time at Harvard to model data provided by the U.S. Bureau of Labor Statistics to divide the U.S. economy into 500 sectors. Leontief modeled each sector with a linear equation based on the data and used the computer, the Harvard Mark II, to solve the system, one of the first significant uses of computers for mathematical modeling”. • Nobel prize in economics (1973) http://en.wikipedia.org/wiki/Wassily_Leontief ENGG2013

  42. Application 2 EQUILIBRIUM PRICE IN AN ECONOMY ENGG2013

  43. An example of three industries 0.1 of the total output fromcoal industry goes to thesteel industry, and 0.7 ofthe total output goes to the electric power industry. Steel 0.1 0.6 0.1 0.5 0.4 of the total output fromthe electric power industrygoes to the coal mines, and0.5of the total output goesto the steel plants 0.1 0.3 0.4 Electric Power 0.7 0.6 of the total output from the steel industry goes to the electric powerindustry, 0.3of the output goes to the coal industry. 0.2 Coal ENGG2013

  44. Distribution of outputs Steel 0.1 0.1 0.6 Electric Power 0.5 0.1 0.3 0.4 0.7 0.2 Coal ENGG2013

  45. Question • Can we find the prices of steel, coal, power, such that the cost to each industry is balanced with the income – can we find an equilibrium price ? ENGG2013

  46. Balancing income and expenditure • Let the price, or value, of steel, coal and electric power be Ps, Pc and Pe respectively. • From “Expenditure = Income”, we get three equations ENGG2013

  47. Solve the system of equations Short-hand notationusing augmented matrix ENGG2013

  48. Find the solutions from reduced row echelon form Choose Pe as the free variable Ps = 44/69 Pe Pc = 17/23 Pe Pe = any positive real number Transform to RREF Pivots free Ps Pc Pe ENGG2013

  49. The equilibrium price • There are infinitely many solutions. • Any constant multiple of them is also a solution. • For example, if Pe =1, we have • Ps = 44/69 = 0.64 • Pc = 17/23 = 0.74 • Pe = 1 (electric power is the most valuable in this example) • If Pe =100, the equilibrium prices are • Ps = 44/69 = 64 • Pc = 17/23 = 74 • Pe = 100 • There is no unique solution. It depends on the currency, RMB, Yen, USD etc. ENGG2013

  50. Summary • In many problems, the solutions are not unique. • Reduced row echelon form is a useful in solving for the general solution, especially when the system of linear equations is under-determined. • Linear algebra has applications in economics, for example in finding equilibrium. ENGG2013

More Related