Math 117 Chapter 1 — Linear Functions Flathead Valley Community College JJ

advertisement
Equations of a Line
Math 117
Chapter 1 — Linear Functions
Linear Applications
Least Squares Line
Home Page
Flathead Valley Community College
Title Page
JJ
II
J
I
Page 1 of 14
Go Back
Full Screen
Close
Quit
1.
Equations of a Line
Even though the following material should be review, it is very important to
refresh ones memory and reinforce prior knowledge.
Equations of a Line
Linear Applications
1.1.
Slope of a Line
The characteristic that best describes a line is its slope or gradient. The most
common way the slope is used is to evaluate how the line grows or declines as one
follows the graph of the line from left to right. If the horizontal axis is labeled x
and the vertical axis is labeled y, the slope describes the rate of change of y with
respect to x. Using more formal language the slope of a line is defined as the
vertical change (the “rise”) over the horizontal change (the “run”). In symbols,
taking two different points (x1 , y1 ) and (x2 , y2 ) on the line, the slope is
m=
Change in y
∆y
y2 − y1
=
=
Change in x
∆x
x2 − x1
where x1 6= x2 .
The symbol ∆x (read “delta x”) is used to represent the change or difference
in x.
Least Squares Line
Home Page
Title Page
JJ
II
J
I
Page 2 of 14
Go Back
Full Screen
Slope Properties
Close
1. Since a horizontal line has no change in the vertical direction the slope of a
horizontal line is m = 0.
Quit
2. A vertical line has no change in the horizontal direction so substitution into
the slope formula will result in division by zero, which is not defined. Thus
the slope of a vertical line is undefined. Warning: A common misconception is to say the vertical line has “no slope.” This is not correct. The slope
is actually infinitely steep, so it is said to have undefined slope.
3. Parallel lines grow, or decline, at the same rate. Thus parallel lines have
equal slopes. If m1 and m2 are the slopes of two parallel lines, then m1 = m2 .
4. Using a little geometry (See problem 43 in the section 1.1 homework) it can
be shown that two lines are perpendicular when the product of their slopes
is −1. If m1 and m2 are the slopes of two perpendicular lines, it is most
common to rewrite the −1 product as m2 = −1/m1 . If the slope m1 is
known, the slope of a perpendicular line, m2 , is the the negative reciprocal
of m1 .
1.2.
Equations of Lines
In this section three different equations of lines will be derived. The first two
are most useful when trying to find the equation of a line given two pieces of
information about the line. The last equation is most useful when trying to
graph a line given the equation.
Equations of a Line
Linear Applications
Least Squares Line
Home Page
Title Page
JJ
II
J
I
Page 3 of 14
Go Back
Full Screen
Close
Quit
Slope-Intercept Form
Probably the most memorized and popular form of a line is the slope-intercept
form. This form is very useful when one wants to graph the line on a graphing
calculator or on graph paper. The two pieces of information needed to use this
form is the slope m and the y−intercept of the line. When the line crosses the
y−axis the x−coordinate is 0 and it is common to use the parameter b for the
y−coordinate. Finally substitute the slope, y−intercept and (x, y), an arbitrary
point on the line, into the slope formula.
Equations of a Line
Linear Applications
Least Squares Line
Home Page
Title Page
y−b
=m
x−0
y − b = mx
y = mx + b
The slope-intercept form of a line is y = mx + b.
Point-Slope Form
While not as popular probably the most useful form of a line is the point-slope
form. With just a little practice this form is very useful when one wants to graph
the line on graph paper. The two pieces of information needed to use this form is
the slope m and a point (x1 , y1 ) on the line. Again substitute the slope, the given
point (x1 , y1 ) and (x, y), an arbitrary point on the line, into the slope formula.
JJ
II
J
I
Page 4 of 14
Go Back
Full Screen
Close
Quit
y − y1
=m
x − x1
y − y1 = m(x − x1 )
Equations of a Line
Linear Applications
Least Squares Line
The point-slope form of a line is y − y1 = m(x − x1 ). If two points on a line are
given, use the slope formula to find the slope and then choose either of the given
points and use the point-slope form to find the equation.
Home Page
Title Page
Standard Form
Using some simple arithmetic both of the previous equations can be written in
standard form, Ax + By = C. This form is probably the most useful form of
a line for graphing the line on graph paper. The key is finding both the x− and
y−intercepts. As mentioned earlier x = 0 for the y−intercept and y = 0 for the
x−intercept. This information can be quickly found using the table
Ax + By = C
Intercepts
x−intercept, y = 0 y−intercept, x = 0
Ax = C
By = C
(C/A, 0)
(0, C/B)
JJ
II
J
I
Page 5 of 14
Go Back
Full Screen
Once the intercepts have been found it is very easy to plot the two points and
use a straightedge to graph the line. Hint: It may be tempting to memorize the
last line of the table, but this is really not necessary if one remembers that x = 0
for the y−intercept and y = 0 for the x−intercept.
Close
Quit
2.
Linear Applications
This section will investigate two applications using linear functions. The first,
supply and demand, is a simplified economics application. The second, breakeven analysis, is a simplified business application.
Equations of a Line
Linear Applications
Least Squares Line
2.1.
Supply and Demand
One goal in a simplified economic model is to find the price of an item so the
amount supplied by the manufacturer is exactly the same as the amount demanded by the consumer. If the price is too high the consumer will not buy as
many while the manufacturer will want to produce a large quantity. This will
lead to a surplus. But if the price is too low the manufacturer will not want to
produce very many while the consumer will want more at the lower price. This
will lead to a shortage. Thus the goal is to find that perfect price, called the
equilibrium price, that will result in an equilibrium quantity with no surplus or
shortage.
In our simplified model assume both the demand and supply can be represented
using linear equations. With price determining the desired quantity mathematicians would usually place the independent variable, price, on the horizontal axis
and the dependent, quantity, on the vertical axis. In economics this is not the
case, the quantity q is placed on the horizontal axis and price p on the vertical
axis. Now the supply and demand prices will be represented by p = S(q) and
p = D(q) respectively.
Home Page
Title Page
JJ
II
J
I
Page 6 of 14
Go Back
Full Screen
Close
Quit
Equilibrium Quantity
In order to find the equilibrium quantity solve the equation
Equations of a Line
S(q) = D(q)
Linear Applications
Least Squares Line
Once the equilibrium quantity q has been found substitute into either equation
to find the equilibrium price.
2.2.
Break-Even Analysis
In any business the main goal is usually to make money. In order to turn a profit
the total costs must equal or exceed the revenue. The quantity needed for the
total costs to equal the revenue is called the break-even quantity. There are
two ways to find the break even quantity:
1. Cost = Revenue
Home Page
Title Page
JJ
II
J
I
Page 7 of 14
2. Profit = 0
Go Back
Before finding the break-even quantity the cost, revenue and profit equations must
be derived.
Full Screen
Cost Function
Close
To find the cost to manufacture an item there are two quantities that will be used
to define our equation, fixed cost and marginal cost. The fixed cost is a constant
Quit
cost that includes such things as setting up a factory, training workers etc. The
fixed costs do not depend on the number of units produced. The marginal cost
is the rate of change of cost at a level of production of x items. The marginal
cost can be thought of as the cost/item to produce and is the “slope” of our
cost equation. Let C = C(x) be the total cost function including fixed and
marginal cost. Then the fixed cost will be C(0) = b and the marginal cost will be
represented by m. Now the linear cost function is C(x) = mx + b.
Equations of a Line
Linear Applications
Least Squares Line
Home Page
Revenue Equation
Title Page
If p is the price per item sold, the revenue function becomes R(x) = px. Note:
The price p is the same as the price in the supply-demand application, but now x
is the quantity in demand.
Profit Equation
The profit P is the difference between the revenue and the cost, P (x) = R(x) −
C(x).
JJ
II
J
I
Page 8 of 14
Go Back
Break-Even Point
Once the cost and revenue functions have been found the break-even quantity
can be found be solving for x in either of the equations
1. C(x) = R(x) or
2. P (x) = 0
Full Screen
Close
Quit
After the break-even quantity x has been found the break-even point is the
ordered pair (x, R(x)).
Equations of a Line
Linear Applications
Least Squares Line
Home Page
Title Page
JJ
II
J
I
Page 9 of 14
Go Back
Full Screen
Close
Quit
3.
Least Squares Line
The previous applications are very simplified versions of supply-demand problems
and break-even analysis. In reality one usually has collected a great deal of data in
hopes of finding a function that “best” represents the data. Finding the equation
of best fit for data can be a very daunting task. In this section it is assumed that
the data appears to be linear in nature. The function that best fits data (that
appears linear) is called the least squares line. The textbook shows 3 different
methods to find the least squares line
Equations of a Line
Linear Applications
Least Squares Line
Home Page
Title Page
1. Calculating by Hand
2. Graphing Calculator
JJ
II
3. Spreadsheet
J
I
While it may be very beneficial to learn all three methods, for this course the
Graphing Calculator method will be the only method used.
3.1.
Graphing Calculator Least Square Line
The following examples will give the steps needed for the TI83/84 calculators only.
If you are using a different calculator it is your responsibility to learn to find the
line using your specific calculator. The least squares analysis will be broken into
3 steps
1. Enter the Data
Page 10 of 14
Go Back
Full Screen
Close
Quit
2. Plot the Data
3. Calculate the Least Squares Line
Equations of a Line
Entering Data
Linear Applications
Least Squares Line
Before an equation can be determined the data must be entered into the calculator. To do this press the STAT button and enter the first entry 1:Edit.... Next
decide where the data will be entered. Usually the x−values will be in the first
list L1 and the y−values will be in the second list L2. If there is already data in
L1 or L2 the data can be deleted by using the arrow buttons to move to the top
of the list pressing the CLEAR button followed by the ENTER button. Finally enter
the data under the appropriate list.
Plotting Data
Before plotting the data on your calculator it is a good idea to plot the data on
your own graph paper. This will help you visualize the data, assist in setting your
calculator viewing window and it will also be required when it comes to test time.
While there following do not have to be done in this order it will help in future
problems.
Home Page
Title Page
JJ
II
J
I
Page 11 of 14
Go Back
Full Screen
1. Turn off all equations. Press the Y= button and either delete the equations using the DEL button or move the cursor to the equal sign = and press
ENTER to turn the equation “off”. The equation is off if the equal sign is no
longer highlighted.
Close
Quit
2. Turn the Data Plot ON Press the 2ND then STAT PLOT buttons. Press
ENTER for 1:Plot1.... Now select the required fields.
(a) ON
(b) Type: Choose the first type which is the scatterplot of the data.
(c) XList: Choose the appropriate list for your x−values. The data lists
can be changed by pressing 2ND then 1 for L1, 2ND then 2 for L2, etc.
(d) YList: Choose the appropriate list for your y−values
(e) Mark: There are three choices representing the data on the screen.
The first option, squares with an open middle, is probably the best.
Equations of a Line
Linear Applications
Least Squares Line
Home Page
Title Page
JJ
II
J
I
Page 12 of 14
3. Set the Window Settings If the data has been plotted by hand the next
step is quite easy. Press the WINDOW button and enter the appropriate values for Xmin, Xmax, Xscl, Ymin, Ymax, Yscl. Do not change the Xres
value.
4. Plot the Data Finally, if all has gone well, the data can be plotted by
pressing the GRAPH button. The graph that appears on your calculator
should match the graph on your graph paper. If Errors occur go back to
the beginning and check the previous steps have been completed correctly.
Go Back
Full Screen
Close
Quit
Calculating the Least Squares Line
Before doing the calculator portion it is a good idea to look at your graph paper
and use a straightedge to lightly draw the line through the data that appears to
best fit the data.
Now it is time to calculate and graph the line that best fits the data using
your calculator. Leave the graph by pressing 2ND then QUIT. Now press STAT and
use the arrow buttons to move over to CALC. There are a number of choices here.
To find the linear function of best fit move down to 4:LinReg(ax+b) or simply
press the number 4. Now the calculator must be told where the data is stored
and where the result is to be stored. If the x− and y−values are stored in L1 and
L2 respectively enter those quantities by first pressing 2ND and the appropriate
number. The comma can be found above the number 7. Lastly the result will be
stored in Y1. To find Y1 press VARS, arrow over to Y-VARS, enter 1:Function...
and finally 1:Y1. Your calculator screen should now look like
Equations of a Line
Linear Applications
Least Squares Line
Home Page
Title Page
JJ
II
J
I
Page 13 of 14
Go Back
Last, but most important, press ENTER. The calculator should now give the values
for a (the slope) and b the y−intercept. To verify your results press the GRAPH
button to see the final results. Your calculator should very closely match the
hand-drawn graph. Note: The calculator has automatically stored the equation of
the best fit line for you. You can check this by pressing Y=
Full Screen
Close
Quit
Correlation Coefficient
The correlation coefficient r is a number that indicates how well the least squares
line fits the data. For our purposes the closer r is to 1 the better the fit. If your
calculator did not show the correlation coefficient press the CATALOG button and
move down until the arrow on the left side is pointing to DiagnosticOn. Press
Enter twice and execute the linear regression calculation again. Hint: Instead of
going through all of the calculation steps again try pressing 2ND ENTRY repeatedly
until the line LinReg(ax+b) L1,L2,Y1 appears, then just press ENTER.
Equations of a Line
Linear Applications
Least Squares Line
Home Page
Title Page
JJ
II
J
I
Page 14 of 14
Go Back
Full Screen
Close
Quit
Download