The site seems to eat the plus signs I enter, so I will use PLUS to symbolize addition.
To find the equation of the straight line (y = a*x PLUS b) that passes through two points P1(x1,y1) and P(x2,y2) , you need to use
1. the coordinates of the points to calculate the slope a (gradient) as a=(y2-y1)/(x2-x1)
2. Replace the calculated value of a in the equation and write that one of the points ( P1(x1,y1) for example) satisfies the equation. In other words y1=a*x1 PLUS b.
Here y1 and x1 are known values, a has been calculated, and only b is still unknown. You can now use the equation y1=a*x1 PLUS b to calculate b as
b=(y1-a*x1)
Example: Equation of the line through (1,5) and (3,6)
Calculate
the slope (gradient) of the line as a=(y2-y1)/(x2-x1) where y2=6, y1=5,
x2=3, and x1=1. You should get a=(6-5)/(3-1)=1/2
The equation is y=(1/2)x PLUS b, where b is not known yet.
To find b, substitute the coordinates of one of the points in the equation. Let us do it for (3,6).
The point (3,6) lies on the line, so 6=(1/2)*3 PLUS b.
Solve for b: 6 MINUS 3/2=b, or b=9/2=4.5
Equation is thus y=(x/2) PLUS 9/2 =(x PLUS 9)/2
I trust you can substitute you own values for (x1,y1, x2,y2) to duplicate the calculations above.
293 views
Usually answered in minutes!
×