We find the equation of a straight line passing through two points by finding the gradient and the y-intercept of the line.
a)
We can find the gradient (m) using the points A=(x1,y1)=(−1,1) and B=(x2,y2)=(3,5).
As the definition of gradient is the ratio of vertical change (y2−y1) to horizontal change (x2−x1).
The equation for gradient is,
m=y2−y1x2−x1=5−13+1=5−14=1×11×1.
b)
Rearranging the equation y=mx+c and substituting either of the points gives
c=y1−mx1orc=y2−mx2.
We can then also use this equation with the other point's coordinates to check our answer.
Let's use point A first:
c=y1−mx1=1−1×−1=2.
We then check this against point B:
y2=mx2+c=1×3+2=5.
c)
We can now substitute these values for m and c into y=mx+c to get:
y=x+2.
The green line drawn on the graph represents the above line equation.
0,0
A
B