* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download MATH 1046 Introduction to Linear Algebra
Derivation of the Navier–Stokes equations wikipedia , lookup
Calculus of variations wikipedia , lookup
Maxwell's equations wikipedia , lookup
Euler equations (fluid dynamics) wikipedia , lookup
Schwarzschild geodesics wikipedia , lookup
Navier–Stokes equations wikipedia , lookup
Equations of motion wikipedia , lookup
Exact solutions in general relativity wikipedia , lookup
MATH 1046 Introduction to Systems of Linear Equations (Sections 2.1 and 2.2) Alex Karassev Example: Error in scale • Alex is using a scale that is known to have a constant error. A can of soup and a can of tuna are placed on this scale, and it reads 720 grams. Four identical cans of soup and three identical cans of tuna are placed on an accurate scale, and a weight of 2.4 kg is recorded. If two cans of tuna weigh 540 grams on this bad scale, what is the amount of error in the scale and what is the correct weight of each type of can? Mathematical Model • • • • 4 cans of soup and 3 cans of tuna on good scale equals 2.4 kg A can of soup and a can of tuna on bad scale equals 720 g 2 cans of tuna on bad scale equals 540 g Let x, y, and z be the weights of a can of soup, a can of tuna, and the error of the scale in grams, respectively. Then we obtain the following system of linear equations: x y z 720 2400 4 x 3 y 2 y z 540 Example: Logging • A logging company has a contract to provide 1000 m³ of pine, 800 m³ of spruce, and 600 m³ of fir logs per month. There are three regions available for logging. The following table gives the species mix, and timber density for each region. Region Volume/hectare % Pine % Spruce % Fir West 330 m³ 70 % 20 % 10 % North 390 m³ 10 % 60 % 30 % East 290 m³ 5% 20 % 75 % • How many hectares should one log in each operating region listed above to deliver exactly the required volume of logs? Mathematical Model Region West North East Volume/hectare 330 m³ 390 m³ 290 m³ % Pine 70 % 10 % 5% % Spruce 20 % 60 % 20 % % Fir 10 % 30 % 75 % • We need: 1000 m³ pine, 800 m³ spruce, and 600 m³ fir • Let w, n, e be the number of hectares logged in West, North, and East regions respectively. Then: 330(.7) w 390(.1)n 290(.05)e 1000 330(.2) w 390(.6)n 290(.2)e 800 330(.1) w 390(.3)n 290(.75)e 600 Modern applications of linear systems • Linear systems with hundreds (or more!) unknowns: Applications in economics (linear optimization (programming), transportation problem, linear models) Computer graphics Optimization Traffic flow How to solve linear systems? • Straightforward approach: express one of the variables form one of the equations and substitute in the rest of equations • Continue until you get to one equation with one variable Error in scale: solution • From last equation: z = 540 – 2y x y z 720 • Substitute in the first, we get x+ y + (540 – 2y) = 720 2400 4 x 3 y • So, we get two equations: 2 y z 540 x – y = 180 4x + 3y = 2400 • Now from the first equation x = 180 + y and therefore 4(180 + y) + 3y = 2400 • Thus, 7 y = 1680, so y = 240 • Now x = 180 + 240 = 420 and z = 540 – 2y = 60 Problem with straightforward approach • It is not efficient (e.g. computationally) when the number of equations is large What can we do with systems of equations? • Example • Divide all by 10 • Divide 2nd by 2 330(.7) w 390(.1)n 290(.05)e 1000 330(.2) w 390(.6)n 290(.2)e 800 330(.1) w 390(.3)n 290(.75)e 600 33(.7) w 39(.1)n 29(.05)e 100 33(.2) w 39(.6)n 29(.2)e 80 33(.1) w 39(.3)n 29(.75)e 60 33(.7) w 39(.1)n 29(.05)e 100 33(.1) w 39(.3)n 29(.1)e 40 33(.1) w 39(.3)n 29(.75)e 60 What can we do with systems of equations? • Example • Subtract 2nd from 3rd • Change the order of 1st and 2nd 33(.7) w 39(.1)n 29(.05)e 100 33(.1) w 39(.3)n 29(.1)e 40 33(.1) w 39(.3)n 29(.75)e 60 33(.7) w 39(.1)n 29(.05)e 100 33(.1) w 39(.3)n 29(.1)e 40 29(.65)e 20 33(.1) w 39(.3)n 29(.1)e 40 33(.7) w 39(.1)n 29(.05)e 100 29(.65)e 20 What can we do with systems of equations? • Example 33(.1) w 39(.3)n 29(.1)e 40 33(.7) w 39(.1)n 29(.05)e 100 29(.65)e 20 • Multiply 1st by 7 and subtract from 2nd • Add 3rd to 2nd 33(.1) w 39(.3)n 29(.1)e 40 - 39(2)n 29(.65)e 180 29(.65)e 20 33(.1) w 39(.3)n - 39(2)n 29(.1)e 40 160 29(.65)e 20 Matrix form • Coefficient matrix x y z 720 2400 4 x 3 y 2 y z 540 • Augmented matrix 1 1 1 720 4 3 0 2400 0 2 1 540 1 1 1 4 3 0 0 2 1 Matrix form • General 3x3 system a11 x1 a12 x 2 a13 x 3 b1 a21 x1 a22 x 2 a23 x 3 b 2 a x a x a x b 31 1 32 2 33 3 3 a11 a21 a 31 a12 a22 a32 a13 b1 a23 b 2 a33 b 3 So, we can: • Change the order of equations • Multiply an equation by a nonzero number • Add a multiple of one equation to another equation Note: all this operations are invertible, i.e. the system can be returned to its original form by applying the same types of operations Elementary row operations on augmented matrix • Switch two rows • Multiply a row by a nonzero number • Add a multiple of one row to another row Note: all this operations are invertible, i.e. the matrix can be returned to its original form by applying the same types of operations Notations • Switch 1st and 2nd rows: R1 R2 • Multiply 1st row by a nonzero number: aR1 • Add a multiple of 1st row to the 2nd row What are their inverses? “Direct” and “Inverse” operations • Direct Switch 1st and 2nd rows: R1 R2 Multiply 1st row by a nonzero number: aR1 Add a multiple of 1st row to the 2nd row: R2 → R2 + bR1 • Inverse Switch 1st and 2nd rows: R1 R2 Multiply 1st row by a nonzero number: (1/a)R1 Add a multiple of 1st row to the second row: R2 → R2 + (-b)R1 Goal of the operations • If possible, reduce the augmented matrix to the form: 1 0 0 r1 0 1 0 r2 0 0 1 r 3 • Then x1=r1, x2=r2, x3=r3 is the (unique) solution Linear systems and geometry • Systems of linear equations can be used to find intersections of planes and lines • Exercise Find the point at which the following planes intersect x+y+z=3, x+2y-z=3, 2x+3y+z=1