Transcript Lecture 07
MA 1128: Lecture 07 – 2/15/11
Graphing Linear
Equations and Functions
Graphing Linear Equations
An equation in two variables, say x and y, is linear if it has only x-terms (e.g.,
3x), y-terms (e.g., -7y), and constant terms (e.g., -2).
Remember that the terms of an expression are separated by additions (subtraction
is adding the negative).
For example, 3x + y = 2y – 7 is a linear equation,
since it has an x- and y-term on the left, a y-term and constant term on the right,
and no other kinds of terms.
The equation 3x2 = 7y + 2 is not a linear equation,
since 3x2 is an x2-term.
Graphing linear equations (in two variables) is easy,
because the graph is always a straight line.
We can draw the graph once we have the locations of two points on the line.
Next Slide
Example
Consider the linear equation 2x + 4y = 8.
We need two solutions.
We can pick any two values for x, and then find the corresponding y-values.
Let’s pick x = 0 and x = 2.
If x = 0, then 2(0) + 4y = 8.
Then 4y = 8, and y = 2.
So one solution is (0,2).
If x = 2, then 2(2) + 4y = 8.
Then 4 + 4y = 8, 4y = 4, and y = 1.
So another solution is (2,1).
Next Slide
Example (cont.)
We can plot these two points (0,2) and (2,1). (see the graph below).
There is only one line that passes through both points.
This is the graph of the equation (see the second graph below).
Next Slide
Practice Problems
For the equation 3x + 4y = 16.
1.
Find the y-values that correspond to x = 0 and x = 4.
2.
Plot these points, and draw the graph.
Click for answers:
1) y = 4 and y = 1. 2) Plot the points (0,4) and (4,1).
4
2
-2
2
-2
Next Slide
4
One Graphing Strategy
Pretty much, any two points we use will work.
Of course, we would like to find two easy points.
One strategy is to find the point with x-coordinate 0, and the point with ycoordinate 0.
For example, consider the equation 3x + 2y = 12.
If x = 0, then 3(0) + 2y = 12.
Then 2y = 12 and y = 6.
So one solution is (0,6).
If y = 0, then 3x + 2(0) = 12.
Then 3x = 12, and x = 4.
So another solution is (4,0).
Note that both of these were very easy to find.
Next Slide
Example (cont.)
The two points and the graph are shown below.
Note that (0,6) is on the y-axis. This is where the line crosses the y-axis, so we’ll
say that the y-intercept is 6.
The point (4,0) is on the x-axis, so the x-intercept is 4.
Next Slide
Example
Consider the equation 5x – 2y = 10.
You can make a little table to keep track of the intercepts.
For the first one, x is zero, so 5x is zero, and I just hold my hand over the x-term.
What times 2 is 10? y = 5. Keep going.
x
y
0
0
x
y
0
-5
2
0
Next Slide
Practice Problems
Consider the equation 3x + 4y = 12.
1.
Find the x- and y-intercepts.
2.
Plot the points and graph the line.
Click for answers:
1) The x-intercept is 4 (when y is zero), and the y-intercept is 3.
2)
4
2
-4
-2
2
-2
Next Slide
Special Cases
If we had an equation like 2y + 3x = 2y – 6,
we could subtract 2y from both sides to get
3x = 6,
and then x = 2.
The y has gone away, but this still is an equation in two variables.
What this means, essentially, is that y can be anything.
Therefore, points like (-2,0), (-2,-7), (-2,5), and (-2,-3/2) are all solutions.
All we need for these to satisfy the equations is for the x to be 2.
Next Slide
Example (cont.)
The four points, (-2,0), (-2,-7), (-2,5), and (-2,-3/2), are plotted below.
Clearly, the line that contains them is vertical.
Next Slide
Special Cases (cont.)
If we’re talking about lines, or we just know that there are supposed to be two
variables,
then linear equations like x = -2, x = 5, and y = 3 are just vertical or horizontal
lines.
For y = 3, since all of the y-coordinates have to be the same (y = 3 always), the
line must be horizontal (see the graph below).
It’s probably easiest to just remember these as special cases.
Next Slide
Practice Problems
1.
2.
Graph the line x = 3.
Graph the line y = 2.
Click for answers:
1)
2)
4
4
2
2
-2
2
4
-2
-2
2
-2
Next Slide
4
Slope
The most important aspect of the graph of a line is a quantity called the slope.
The slope is just a fraction telling us how much the y-coordinate changes divided
by how much the x-coordinate changes.
We’ll think of upward changes in y as positive, and downward changes as
negative.
We’ll also think of changes to the right in x as positive, and changes to the left as
negative.
With this in mind, the slope is (we’ll always use m for slope)
change in y
m
change in x
Next Slide
Example
In the picture below, if we start at a point on the line and move down 3 and right
2, we get back to the line.
Change in y is –3, and the change in x is +2. The slope is m = -3/2.
We could also go left 4 and up 6. The change in y is +6,
and the change in x is – 4. The slope is m = 6/(-4) = -3/2.
It doesn’t matter which two points we use, after simplifying,
we get the fraction m = -3/2.
Next Slide
Practice Problems
Note that (-5,-2) and (5,4) are points on this line. The x-int is about –1.67. The
spacing of the tick marks on the x-axis are 0.4, and they’re 0.2 on the y-axis.
1.
Look at the line in the graph below. Start at any point you want, and go to
the right 5. How far up do you have to go to get back to the line?
2.
If you went down 6, how far (left or right) do you have to go, and is it to the
right or left?
3.
What is the slope of this line?
Click for answers.
1) Up 3;
2) Left 10;
3) m = 3/5
Next Slide
More on Slopes
We can find the slope of a line pretty easily by looking at the coordinates of two
points on the line.
For example, if (2,5) and (-1,1) are on the line,
and we want to go from (2,5) to (-1,1), the y goes from 5 down to 1, so y
changes 4. [[ (1) – (5) = 4. ]]
The x goes from 2 to the left to -1, so the x changes –3. [[ (-1) – (2) = -3 ]]
The slope is m = (change in y)/(change in x) = (-4)/(-3) = 4/3.
We could do this just as easily the other way.
Change in y: 1 up to 5 [[ (5) – (1) = 4 ]]
Change in x: -1 right to 2 [[ (2) – (-1) = 3 ]]
Slope is m = 4/3.
Next Slide
Practice Problems
1.
2.
Find the slope if (3,7) and (4,5) are on the line.
Find the slope if (-2,3) and (3,-1) are on the line.
Click for answers:
1) m = 2; 2) m = 4/5.
Next Slide
Linear Functions/Slope-Intercept Form
Consider the linear equation y = 2x – 6.
We can find two solutions (0,?) and (2, ?), by substituting x = 0 and x = 2 into
the equation.
We would get (0,-6) and (2, -2).
The slope is m = [(-2) – (-6)]/[(2) – (0)] = 4/2 = 2.
Note that (0,-6) is the y-intercept.
The slope is m = 2, and the x-term is 2x.
The y-intercept is b = -6, and the constant term is -6.
It is always true that when a linear equation is written so that y is a function of x,
the coefficient of the x-term is the slope, and the constant term is the y-intercept.
Equations in this form are said to be in slope-intercept form.
y = mx + b
Next Slide
Linear Functions
In function notation, we replace the y with f(x),
f(x) = mx + b,
and any function of this form is called a linear function.
Remember that in f(x) = mx + b, m is the slope, and b is the y-intercept.
Example. For the linear function f(x) = 7x + 3,
The slope is m = 7, and the y-intercept is b = 3.
Next Slide
Practice Problems
1.
2.
For the function f(x) = (3/2)x – 4, what is the slope and the y-intercept?
For the function f(x) = 4x + 1, what is the slope and the y-intercept?
Click for answers.
1) m = 3/2 and b = 4;
2) m = 4 and b = 1.
Next Slide
Graphing Linear Functions
It’s really easy to graph a linear function, since we know the slope and y-intercept.
For example, the equation y = (3/5)x – 2 has m = 3/5 and b = 2.
One point on the line, therefore, must be (0,-2).
The slope is m = 3/5 = (+3)/(+5) = (up 3)/(rt 5), so we can find a second point.
Just go right 5 and up 3 (or up 3 and right 5)
Next Slide
Example
Consider the linear function f(x) = (-4/3)x + 2.
The y-intercept is b = 2.
From there go down 4 and right 3 to get the other point.
[[ We could also go up 4 and left 3, since (-4)/(3) = (4)/(-3). ]]
Next Slide
Practice Problems
Let y = 3x – 2.
1.
What are the coordinates of the y-intercept?
2.
Since m = 3 = 3/1 = (up 3)/(rt 1), what second point does this give you?
3.
Graph the line.
Click for answers.
1) (0,-2);
2) (1,1);
3)
4
2
-2
2
4
-2
End