Presentation is loading. Please wait.

Presentation is loading. Please wait.

Math Module 2 Lines.

Similar presentations


Presentation on theme: "Math Module 2 Lines."— Presentation transcript:

1 Math Module 2 Lines

2 Application Example Suppose we are writing software to control a robot. In particular, our robot has an Ultrasonic Sensor that produces a raw value that is (hopefully) related to its distance from the nearest obstruction. You need to determine the actual distance from the sensor to the obstruction. In this problem we want to use the raw value to determine this distance. The measured distance is a function of the raw value. The raw value is the independent variable (r). The measured distance is the dependent variable (d). Thus d is a function of r. Your jobs is to find a formula (if there is one) for d(r).

3 Application Example Raw Value Distance cm 1360 10 1890 20 2197 26 3283
The following table contains some raw values and their associated measured distances. Try to find a formula that describes the relationship between the raw values and the distance. Raw Value Distance cm 1360 10 1890 20 2197 26 3283 44 3827 59 4163 60 5201 82

4 Ordered Pairs and Points
An ordered pair (also called a point) is a pair of numbers with a specific ordering. The first number is usually called the x coordinate and the second number is usually called the y coordinate. Example: (3, 4) is an ordered pair with an x coordinate of 3 and a y coordinate of 4. We often graph ordered pairs using the rectangular coordinate system. Two number lines crossing at right angles Crossing at the 0 point of both lines, the origin The x axis is the horizontal line The y axis the vertical line

5 Rectangular Coordinates
We divide the system into quadrants based on the sign of the coordinates.

6 XY Coordinate Pegboard
We can represent the rectangular coordinate system using an XY Coordinate Pegboard as a manipulative.

7 XY Coordinate Pegboard Axes
Slide the x and y axes so they evenly divide the pegboard into 4 equal quadrants. Pin them down at the ends and at the origin with blue pegs.

8 Graphing Ordered Pairs
Ordered pairs are graphed by drawing a vertical line through the first coordinate on the x axis and a horizontal line through second coordinate on the y axis. The lines cross at the point associated with the ordered pair. Example: Graph (5, −3) by putting a red peg in the hole corresponding to the point.

9 Graphing Ordered Pairs
Example: Using red pegs, graph the following points and determine the quadrant or axis of each (3, 2), (3, −1), (−4, 0), (−2, 1), (−6, −4), (0, 6).

10 Linear Equations An equation that can be written in the form Ax + By = C where A and B are not both 0 is called a linear equation. Solutions are ordered pairs (x, y) that make the equation true. For example find solutions of -2x + 4y = 4 x y 6 4 1 -6 -2

11 Graphing Lines We can then put a red peg at each solution.

12 Graphing Lines We can then graph the line by putting a rubber band around the red pegs. Notice that any point inside the rubber band also solves the equation. For example: (2,2), (-2,0), (3, 2.5)

13 Intercepts It can be helpful to know when a graph crosses the x or y axis. When it crosses the y axis we have a y intercept; the x coordinate is 0. When it crosses the x axis we have an x intercept; the y coordinate is 0. The x intercept of our line is x = -2 and the y intercept is y = 1.

14 Slope We are often interested in how steep a line is.
We measure this by calculating its slope. To calculate the slope we need to determine the following: The vertical rise: how much the line increases over an interval. The horizontal run: the width of the interval. The slope is the rise divided by the run. Example: What is the slope of the roof?

15 Slope Formula In a formula form, if a line goes through the points (x1,y1) and (x2,y2) then rise = y2 − y run = x2 − x1 so

16 Slope Formula Example: Set up the line with the points (2,4) and (6,2) on the pegboard. Calculate the slope. Slope = -2/4 = -1/2

17 Line Facts Lines with positive slopes increase from left to right.
Lines with negative slopes decrease from left to right. Lines with slopes that are larger in absolute value are steeper. Lines with slopes that are smaller in absolute value are less steep. Horizontal lines have slope 0. Vertical lines have undefined slope.

18 Slope Facts Two lines are parallel if they have no points in common (do not cross). Parallel lines are either both vertical (slope undefined) or they have the same slope. Two lines are perpendicular if they cross at right angles. A line with slope m1 and another line with slope m2 are perpendicular if m1m2 = −1 which can also be written m2 = −1/m1 A vertical line (undefined slope) and a horizontal line (slope 0) are also perpendicular.

19 Graphing Using Slope One method for graphing linear equations is to use one point on the line and the slope. Example: Graph the line that passes through the point (−2, 6) and has the slope -3/4. Plot the point (−2, 6) using a red peg. Write the slope as a ratio. We will choose (−3) / 4 (but we could also use 3 / (-4 )). rise = −3 and run = 4 (or rise = 3 and run = -4) Start at the plotted point and move down 3 units and right 4 units and plot a new point using another red peg. Connect these plotted points with a line. You can repeat this to generate more points on the line. e.g. (0, 6) and (- 6, 9).

20

21 Slope Intercept Form If a linear equation is solved for y and simplified, the equation is then in slope-intercept form. Forms for Linear Equations: General form: Ax + By = C Slope-intercept form: y = mx + b where m = slope and b = y intercept. Vertical lines do not have a slope and so cannot be written in slope-intercept form.

22 Graphing Using Slope Intercept Form
Example: Find the slope and y intercept of the line x − 2y = 4 and graph it. First solve for y to get the line into slope-intercept form y = 3/2 x – 2 Slope = 3/2 and y-intercept = -2. Put a red peg at (0,-2). Next go up 3 and over 2 and put a red peg at (2, 1). You can repeat this process to generate other points on the line. e.g. (4,4), (-2,-5), etc. Use these points to draw the line.

23

24 Finding the Formula of a Line
You can reverse this process to find the formula of a line. Example: Find the equation of the following line in slope intercept form.

25 Finding the Formula of a Line
y intercept: b = 4 Pick any other point. We will pick (4, −4). The slope is The line is y = -2x + 4.

26 Finding the Formula of a Line Using Two Points
We can also find the equation of a line if we know any two points on the line. Example: Find the equation of the line through the points (−2, 3) and (4, −1). First find the slope. We pick (x1, y1) = (−2, 3) and (x2, y2) = (4, −1) to find the slope.

27 Finding the Formula of a Line Using Two Points
Now find the y intercept. Since the slope is m = −2/3 we know the equation of the line is y = −2/3x + b Plug in either point (we pick (−2, 3)) and get = −2/3(−2) + b which we will solve to get b =5/3. We now know that the equation for the line is y = −2/3x + 5/3.

28 Application Example Suppose we are writing software to control a robot. In particular, our robot has an Ultrasonic Sensor that produces a raw value that is (hopefully) related to its distance from the nearest obstruction. We need to determine the actual distance from the sensor to the obstruction. We need to use some appropriate units of measure. In this problem we want to use the raw value to determine the distance. The measured distance is a function of the raw value. The raw value is the independent variable (r). The measured distance is the dependent variable (d). Thus d is a function of r. We want to find a formula for d(r). If the relationship is linear we can write this d(r) = m r + b.

29 Application Example Slope
Suppose our sensor reports a raw value of 1360 when the obstruction is 10 cm away and a raw value of 1890 when the obstruction is 20 cm away. Notice that this gives us two points (1360, 10) and (1890, 20). We list the raw value first because it is our independent variable. The slope will be a rate since it a proportion where the numerator and denominator have different units.

30 Application Example y Intercept
Slope = We can now use one of the points to find the y intercept. d(r) = m c + b = r +b = (1360) + b b = The equation for the line that converts the raw value to cm is d(r) = r – 15.66 We should test this with our other point d(1890) = (1890) – = cm

31 Application Example Verification
We can always find a line connecting two point so we should also test this with some other measurements to verify that the pattern holds. Suppose we make a third measurement with a raw value of We would expect a measured distance of d(2197) = (2197) – = cm If we measure the distance and see something that is not consistent then we may need to discard our model and try something more complicated. We do expect small inconsistencies in measured values.

32 Modeling Graphing When we try to fit a model to real world data we usually expect it to only be an approximation, but how good is “good enough”? Graphing can be very helpful in trying to determine what type of equation should be used when trying to model real data.

33 Linear/Not Linear Models
With our Ultrasonic Sensor, if we saw the following results over a series of measurements what would we expect would be a good model? (linear/not linear)

34 Linear/Not Linear Models
A linear model might not be the best choice but could still be useful.

35 Linear/Not Linear Models
With our Ultrasonic Sensor, if we saw the following results over a series of measurements what would we expect would be a good model? (linear/not linear)

36 Linear/Not Linear Models
A linear model would probably be quite reasonable.


Download ppt "Math Module 2 Lines."

Similar presentations


Ads by Google