Chabot Mathematics §1.3 Lines, Linear Fcns Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu Chabot College Mathematics 1 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Review § 1.2 Any QUESTIONS About • §1.2 → Functions Graphs Any QUESTIONS About HomeWork • §1.2 → HW-02 Chabot College Mathematics 2 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx §1.3 Learning Goals Review properties of lines: slope, horizontal & vertical lines, and forms for the equation of a line Solve applied problems involving linear functions Recognize parallel (‖) and perpendicular (┴) lines Explore a Least-Squares linear approximation of Line-Like data Chabot College Mathematics 3 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx 3 Flavors of Line Equations The SAME Straight Line Can be Described by 3 Different, but Equivalent Equations • Slope-Intercept (Most Common) y mx b – m & b are the slope and y-intercept Constants • Point-Slope: y y1 mx x1 – m is slope constant – (x1,y1) is a KNOWN-Point; e.g., (7,11) Chabot College Mathematics 4 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx 3 Flavors of Line Equations 3. General Form: – Ax By C 0 A, B, C are all Constants Equation Equivalence → With a little bit of Algebra can show: mA B b y1 mx1 b C B Chabot College Mathematics 5 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Lines and Slope The slope, m , between two y2 y1 m points (x1,y1) and (x2,y2) x2 x1 is defined to be: A line is a graph for which the slope is constant given any two points on the line An equation that can be written as y = mx + b for constants m (the slope) and b (the y-intercept) has a line as its graph. Chabot College Mathematics 6 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx SLOPE Defined The SLOPE, m, of the line containing points (x1, y1) and (x2, y2) is given by Change in y m Change in x rise y2 y1 run x2 x1 Chabot College Mathematics 7 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Graph the line containing the points (−4, 5) and (4, −1) & find the slope, m SOLUTION Change in y m Change in x rise y2 y1 run x2 x1 1 5 6 m 4 4 8 Chabot College Mathematics 8 Change in y = −6 Example Slope City Change in x = 8 Thus Slope m = −3/4 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example ZERO Slope Find the slope of the line y = 3 SOLUTION: Find Two Pts on the Line (3, 3) (2, 3) • Then the Slope, m rise 33 m run 2 3 0 m 0 5 A Horizontal Line has ZERO Slope Chabot College Mathematics 9 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example UNdefined Slope Find the slope of the line x = 2 SOLUTION: Find Two Pts on the Line (2, 4) • Then the Slope, m rise 4 2 m run 22 6 m ?? 0 (2, 2) A Vertical Line has an UNDEFINED Slope Chabot College Mathematics 10 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Slope Symmetry We can Call EITHER Point No.1 or No.2 and Get the Same Slope (−4,5) Pt1 Example, LET • (x1,y1) = (−4,5) (4,−1) rise y2 y1 m run x2 x1 1 5 6 3 m 4 4 8 4 Chabot College Mathematics 11 Moving L→R Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Slope Symmetry cont Now LET (−4,5) • (x1,y1) = (4,−1) m rise y2 y1 run x2 x1 5 1 6 3 m 4 4 8 4 (4,−1) Pt1 Moving R→L Thus Chg in y y2 y1 y1 y2 m Chg in x x2 x1 x1 x2 Chabot College Mathematics 12 y2 y1 y1 y2 or x1 x2 x2 x1 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example Application The cost c, in dollars, of shipping a FedEx Priority Overnight package weighing 1 lb or more a distance of 1001 to 1400 mi is given by c = 2.8w + 21.05 • where w is the package’s weight in lbs Graph the equation and then use the graph to estimate the cost of shipping a 10½ pound package Chabot College Mathematics 13 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx FedEx Soln: c = 2.8w + 21.05 Select values for w and then calculate c. c = 2.8w + 21.05 • If w = 2, then c = 2.8(2) + 21.05 = 26.65 • If w = 4, then c = 2.8(4) + 21.05 = 32.25 • If w = 8, then c = 2.8(8) + 21.05 = 43.45 Tabulating the Results: Chabot College Mathematics 14 w 2 4 8 c 26.65 32.25 43.45 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx The cost of shipping an 10½ pound package is about $51.00 Chabot College Mathematics 15 Mail cost (in dollars) Plot the points. To estimate costs for a 10½ pound package, we locate the point on the line that is above 10½ lbs and then find the value on the c-axis that corresponds to that point $51 FedEx Soln: Graph Eqn 10 ½ pounds Weight (in pounds) Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx The Slope-Intercept Equation The equation y = mx + b is called the slope-intercept equation. The equation represents a line of slope m with y-intercept (0, b) Chabot College Mathematics 16 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example Find m & b Find the slope and the y-intercept of each line whose equation is given by 3 a) y x 2 b) 3x y 7 c) 4 x 5 y 10 8 Solution-a) Slope is 3/8 Chabot College Mathematics 17 3 y x2 8 InterCept is (0,−2) Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example Find m & b cont.1 Find the slope and the y-intercept of each line whose equation is given by 3 a) y x 2 b) 3x y 7 c) 4 x 5 y 10 8 Solution-b) We first solve for y to find an equivalent form of y = mx + b. y 3 x 7 Slope m = −3 Intercept b = 7 • Or (0,7) Chabot College Mathematics 18 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example Find m & b cont.2 Find the slope and the y-intercept of each line whose equation is given by 3 a) y x 2 b) 3x y 7 c) 4 x 5 y 10 8 Solution c) rewrite the equation in the 4 form y = mx + b. y x2 5 4 x 5 y 10 4 x 10 5 y 1 5 y 4 x 10 5 Chabot College Mathematics 19 Slope, m = 4/5 (80%) Intercept b = −2 • Or (0,−2) Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example Find Line from m & b A line has slope −3/7 and y-intercept (0, 8). Find an equation for the line. We use the slope-intercept equation, substituting −3/7 for m and 8 for b: 3 y mx b x 8 7 Then in y = mx + b Form Chabot College Mathematics 20 3 y x 8 7 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example Graph y = (4/3)x – 2 SOLUTION: The slope is 4/3 and the y-intercept is (0, −2) right 3 up 4 units We plot (0, −2) then move up 4 units and to the right 3 units. Then Draw Line We could also move down 4 units and to the left 3 units. Then draw the line. Chabot College Mathematics 21 (0, 2) down 4 (3, 6) left 3 4 y x2 3 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx (3, 2) Parallel and Perpendicular Lines Two lines are parallel (||) if they lie in the same plane and do not intersect no matter how far they are extended. Two lines are perpendicular (┴) if they intersect at a right angle (i.e., 90°). E.g., if one line is vertical and another is horizontal, then they are perpendicular. Chabot College Mathematics 22 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Para & Perp Lines Described Let L1 and L2 be two distinct lines with slopes m1 and m2, respectively. Then • L1 is parallel to L2 if and only if m1 = m2 and b1 ≠ b2 – If m1 = m2. and b1 = b2 then the Lines are CoIncident • L1 is perpendicular L2 to if and only if m1•m2 = −1. • Any two Vertical or Horizontal lines are parallel • ANY horizontal line is perpendicular to ANY vertical line Chabot College Mathematics 23 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Parallel Lines by Slope-Intercept Slope-intercept form allows us to quickly determine the slope of a line by simply inspecting, or looking at, its equation. This can be especially helpful when attempting to decide whether two lines are parallel These Lines All Have the SAME Slope Chabot College Mathematics 24 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example Parallel Lines Determine whether the graphs of the lines y = −2x − 3 and 8x + 4y = −6 are parallel. 8 x 4 y 6 SOLUTION • Solve General Equation for y • Thus the Eqns are – y = −2x − 3 – y = −2x − 3/2 Chabot College Mathematics 25 4 y 8 x 6 1 y 8 x 6 4 3 y 2 x 2 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example Parallel Lines The Eqns y = −2x − 3 & y = −2x − 3/2 show that • m1 = m2 = −2 • −3 = b1 ≠ b2 = −3/2 Thus the Lines ARE Parallel • The Graph confirms the Parallelism Chabot College Mathematics 26 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example ║& ┴ Lines Find equations in general form for the lines that pass through the point (4, 5) and are (a) parallel to & (b) perpendicular to the line 2x − 3y + 4 = 0 SOLUTION 2x 3y 4 0 • Find the Slope by ReStating the Line Eqn in Slope-Intercept Form Chabot College Mathematics 27 3y 2x 4 2 4 y x 3 3 m 2 3 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example ║& ┴ Lines SOLUTION cont. • Thus Any line parallel to the given line must have a slope of 2/3 • Now use the Given Point, (4,5) in the Pt-Slope Line Eqn Thus ║- Line Eqn 2 x 3 y 7 Chabot College Mathematics 28 y y1 m x x1 2 y 5 x 4 3 3y 5 2 x 4 3y 15 2x 8 3y 2x 7 0 2x 3y 7 0 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example ║& ┴ Lines SOLUTION cont. • Any line perpendicular to the given line must have a slope of −3/2 • Now use the Given Point, (4,5) in the Pt-Slope Line Eqn Thus ┴ Line Eqn y y1 m x x1 3 y 5 x 4 2 2 y 5 3x 4 2y 10 3x 12 3x 2y 22 0 3 x 2 y 22 Chabot College Mathematics 29 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Example ║& ┴ Lines SOLUTION Graphically Chabot College Mathematics 30 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Scatter on plots on XY-Plane A scatter plot usually shows how an EXPLANATORY, or independent, variable affects a RESPONSE, or Dependent Variable Shown Below is a Conceptual Scatter plot that could Relate the RESPONSE to some EXCITITATION Sometimes the SHAPE of the scatter reveals a relationship Chabot College Mathematics 31 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Linear Fit by Guessing The previous plot looks sort of Linear We could use a Ruler to draw a y = mx+b line thru the data But • which Line is BETTER? • and WHY? Chabot College Mathematics 32 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Least Squares Curve Fitting Numerical Software such as Scientific Calculators, MSExcel, and MATLAB calc the “best” m&b Almost All “Linear Regression” methods use the “Least Squares” Criterion • How are these Calculations Made? Chabot College Mathematics 33 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Least Squares Best Guess-y yL mxk b h y xk , y k data x yk b xL Best Guess-x m Chabot College Mathematics 34 To make a Good Fit, MINIMIZE the |GUESS − data| distance by one of yk b x xk m y h 2 mxk b yk 2 x y x y 2 2 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Least Squares cont. n Almost All Regression 2 J yk Methods minimize theSum k 1 of the Vertical Distances, J: §7.4 shows that for Minimum “J” mbest x y n xy x n x 2 2 x y x xy n x x 2 bbest 2 • What a Mess!!! – For more info, please take ENGR/MTH-25 Chabot College Mathematics 35 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx 2 DropOut Rates Scatter Plot Given Column Chart Read Chart to Construct T-table Year x = Yr-1970 1970 0 1980 10 1990 20 1996 26 1997 27 2000 30 2001 31 Chabot College Mathematics 36 y=% 15% 14.1% 12.1% 11.1% 11.0% 10.9% 10.7% Use T-table to Make Scatter Plot on the next Slide Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx SCATTER PLOT: % of USA High School Students Dropping Out 16% y (% USA HiSchool DropOuts) 14% 12% 10% 8% 6% Zoom-in to more accurately calc the Slope 4% 2% 0% 0 2 4 6 M55_§JBerland_Graphs_0806.xls Chabot College Mathematics 37 8 10 12 14 16 18 20 22 24 26 x (years since 1970) Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx 28 30 32 SCATTER PLOT: % of USA High School Students Dropping Out 16% Intercept 15.2% y (% USA HiSchool DropOuts) 15% (x1,y1) = (8yr, 14%) “Best” Line (EyeBalled) 14% 13% Rise 3% 12% 11% Run 20 yrs 10% 0 4 M55_§JBerland_Graphs_0806.xls Chabot College Mathematics 38 8 12 16 20 24 x (years since 1970) Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx 28 32 DropOut Rates Scatter Plot Calc Slope from Scatter Plot Measurements rise 3% m run 20 yrs m 0.15 % yr Read Intercept from Measurement b y x 0 15.2% Chabot College Mathematics 39 Thus the Linear Model for the Data in SLOPE-INTER Form 0.15% y x 15.2% yr To Find Pt-Slp Form use Known-Pt from Scatter Plot • (x1,y1) = (8yr, 14%) Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx DropOut Rates Scatter Plot Thus the Linear Model for the Data in PT-SLOPE Form y y1 mx x1 X for 2010 → x = 2010 − 1970 = 40 In Equation y2010 0.15% 40 yr 15.2% yr 6% 15.2% 0.15% x 8 yr y 14% y2010 yr y2010 9.2% Now use Slp-Inter Eqn to Extrapolate to DropOut-% in 2010 Chabot College Mathematics 40 The model Predicts a DropOut Rate of 9.2% in 2010 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx SCATTER PLOT: % of USA High School Students Dropping Out 16% y (% USA HiSchool DropOuts) 15% 14% 13% 12% 11% 10% 9% (Actually 7.4%) 9.2% 8% 0 5 M55_§JBerland_Graphs_0806.xls Chabot College Mathematics 41 10 15 20 25 30 x (years since 1970) Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx 35 40 Replace EyeBall by Lin Regress Use MSExcel commands for LinReg • WorkSheet → SLOPE & INTERCEPT Comands • Plot → Linear TRENDLINE By MSExcel Slope → Intercept → R2 → -0.0015 0.1518 -0.15% ← Slope in % 15.18% ← Intercept in % 0.9816 98.16% ←Goodness in % M15_Drop_Out_Linear_Regression_1306.xlsx Chabot College Mathematics 42 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Official Stats on DropOuts Status dropout rates of 16- through 24-year-olds in the civilian, noninstitutionalized population, by race/ethnicity: Selected years, 1990-2010 Race/ethnicity Native Year Total1 White Black Hispanic Asian Americans 1990 12.1 9.0 13.2 32.4 4.9! 16.4! 1995 12.0 8.6 12.1 30.0 3.9 13.4! 1998 11.8 7.7 13.8 29.5 4.1 11.8 1999 11.2 7.3 12.6 28.6 4.3 ‡ 2000 10.9 6.9 13.1 27.8 3.8 14.0 2001 10.7 7.3 10.9 27.0 3.6 13.1 2002 10.5 6.5 11.3 25.7 3.9 16.8 2003 9.9 6.3 10.9 23.5 3.9 15.0 2004 10.3 6.8 11.8 23.8 3.6 17.0 2005 9.4 6.0 10.4 22.4 2.9 14.0 2006 9.3 5.8 10.7 22.1 3.6 14.7 2007 8.7 5.3 8.4 21.4 6.1 19.3 2008 8.0 4.8 9.9 18.3 4.4 14.6 2009 8.1 5.2 9.3 17.6 3.4 13.2 2010 7.4 5.1 8.0 15.1 4.2 12.4 http://nces.ed.gov/fastfacts/display.asp?id=16 SOURCE: U.S. Department of Education, National Center for Education Statistics. (2012). The Condition of Education 2012 (NCES 2012-045. ! Interpret data with caution. The coefficient of variation (CV) for this estimate is 30 percent or greater. ‡ Reporting standards not met (too few cases). 1 Total includes other race/ethnicity categories not separately shown. Chabot College Mathematics 43 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx WhiteBoard Work Problem §1.3-56 Food Carb/oz (g) Prot/oz (g) I 3 2 II 5 3 • For the “Foodies” in the Class Mix x ounces of Food-I and y ounces of Food-II to make a Lump of Food-Mix that contains exactly: • 73 grams of Carbohydrates • 46 grams of Protein Chabot College Mathematics 44 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx All Done for Today USA HiSchl DropOuts Chabot College Mathematics 45 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Chabot Mathematics Appendix r s r s r s 2 2 Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu – Chabot College Mathematics 46 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Chabot College Mathematics 47 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Chabot College Mathematics 48 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Chabot College Mathematics 49 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Chabot College Mathematics 50 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Chabot College Mathematics 51 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx Chabot College Mathematics 52 Bruce Mayer, PE BMayer@ChabotCollege.edu • MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx