Property
To write an equation for a linear function, you need to find the slope (m) and the y-intercept (b).
- Identify two points on the line.
- Use the two points to calculate the slope: m=x2−x1y2−y1.
- Use the slope and one point (x1,y1) in the point-slope form, y−y1=m(x−x1), and solve for y. Alternatively, substitute m and a point into y=mx+b and solve for b.
Examples
- A line has a slope of 4 and passes through (2,5). Using y=mx+b, we get 5=4(2)+b, so 5=8+b, and b=−3. The equation is y=4x−3.
- A line passes through (1,2) and (4,11). The slope is m=4−111−2=39=3. Using the point (1,2), we have y−2=3(x−1), which simplifies to y=3x−1.
- A gym charges a 50 dollars sign-up fee and 25 dollars per month. The cost function is C(x)=25x+50, where x is the number of months.
Explanation
To define a specific line, you need to know its direction (slope) and one point it passes through. Once you have these two pieces of information, you can create a unique formula for that line.