Given the graph of the line

In this instance, the graph of a line is given and the question requires finding the equation of the line.

Example

Find the equation of the line above.

Solution:

The equation of a straight line is, y = mx + c

Recall, c is the y intercept (the point at which the graph crosses the y axis), which is the point (0, 2)

That is, c = 2

Now substituting the (x, y) coordinates of any of the other four points on the graph, along with the value for c (2) in the equation, solve for m.

That is, using the point (1, 5), substituting 1 for x, 5 for y, and 2 for c

Yields, y = mx + c

5 = m (1) + 2

5 = m + 2

m = 5 – 2

m = 3

Therefore the equation of the straight line is:

Y = 3x + 2

Given the co-ordinates of two points on the line

If co-ordinates of two points on the line are given, and the question requires using those points to find the equation of the line, use one of the methods below.

Example

The points, M (-3, -5) and N (5, 3) lie on a straight line L_{2 }. Find the particular equation of the line.

*Method 1*

Substitute the co-ordinates of the points in two different equations, subtracting one equation from the other in solving for m and c.

Using the equation of a straight line:

y = mx + c

Substituting (-3, -5) for x and y respectively

-5 = m (-3) + c

-5 = -3m + c ——- eq (1)

Substituting (5, 3) for x and y respectively

3 = m (5) + c

3 = 5m + c ——– eq (2)

eq (2) – eq (1)

3 – (-5) = 5m – (-3m) + c – c

3 + 5 = 5m + 3m

8 = 8m

m = 1

Substituting m = 1 in eq (1)

-5 = -3(1) + c

-5 = -3 + c

c = -5 + 3

c = -2

Hence the equation of L_{2 }is:

y = mx + c

y = (1) x + (-2)

y = x – 2

*Method 2*

Use the co-ordinates of the two points to find the gradient of the line (m), then using m and one of the points to substitute in the equation of a line to find c and hence the equation of the line L_{2 }.

Gradient, m = y_{2} – y_{1}/ x_{2} – x_{1}

Recall, M (-3, -5) N (5, 3)

m = 3 – (-5)/ 5 – (-3)

m = 3 + 5 / 5 + 3

m = 8 / 8

m = 1

Using, m = 1 and N (5, 3) to substitute in the equation of a line:

y = mx + c

3 = 1 (5) + c

3 = 5 + c

c = 3 – 5

c = -2

Therefore, the equation of L_{2} is:

y = x – 2

Given the gradient and one point on the line

Substitute the given quantities into the equation of a line, solving for c, and hence the equation of the line L_{2}.

Given, m = 1

N (5, 3)

Then, y = mx + c

3 = 1(5) + c

3 = 5 + c

c = -2

Therefore the equation of L_{2} is:

y = x – 2

**Note**: The above is the same as Method 2 (with gradient given).