An equation for a straight line is in slope-intercept form if it can be written in the form
P = a + bQ
where P is the variable we intend to plot on the vertical axis, Q is the variable we intend to plot on the horizontal axis, and a and b are parameters. The equation is said to be in "slope-intercept form" because a is the intercept of the line on the vertical axis and b is the slope of the line.
Suppose that you are given a set of (P, Q) pairs, as for example in Assignment 2, and you are asked to determine a linear equation representing this relationship. Your task is to determine the values of a and b. I will remind you of two ways to do this, both of which you doubtless learned long ago in high school math but may have forgotten. I will illustrate these procedures with the following table of data relating two variables P and Q:
P |
Q |
32 |
12 |
37 |
10 |
42 |
8 |
47 |
6 |
52 |
4 |
Method 1: Remember first that the slope b is the change in the vertical variable P per unit of change of the horizontal variable Q, or b = [Delta] P /[Delta] Q. Choose (arbitrarily) a pair of points, say, (37, 10) and (47, 6). Compute b by determining the ratio of the change in P, or [Delta] P, to the change in Q, or [Delta] Q:
Now we know that the equation can be written as P = a - 2.5 Q. We need only determine the value of a. Since this equation must describe all of the points in the table, we can substitute any of them, say (32, 12), into this relationship and solve for a:
Thus the equation we are seeking is P = 62 - 2.5 Q. Sometimes the second step of this process is unnecessary. Remember that the intercept a is the value of P when Q = 0. It will sometimes be the case that the table of data you are given includes the point in which Q = 0, which in this case is (62, 0). Whenever you are given such a point, then a can be read directly from the table.
Method 2: As noted above, the equation we seek must describe all of the points in the table. Choose any two of them, say (42, 8) and (52, 4). If the equation correctly describes these points, then whatever the values of a and b turn out to be, it must be true that 42 = a + b (8) and 52 = a + b (4). These two equations in the two unknowns a and b can be solved for a and b. This task can be accomplished using your favorite method for solving simultaneous equations. For example, first solve each of them for a, equate the resulting expressions, and solve for b:
Now we are back in the same position we reached in Method 1; that is, we know that the equation can be written as P = a - 2.5 Q. We can determine the value of a by substituting any point into this relationship and solving for a, as illustrated earlier.