M
Math Coach Amy
Amy Ferguson Moncure

IB AI · 13A Linear Models

The Line through Two Points

Two points decide one line. Use that line. This is not a regression through a cloud of points.

Jump to section:

Two points, one line.

What to Remember

Gradient

m = (y₂ − y₁) / (x₂ − x₁).

Then the constant

Substitute either point into y = mx + c.

Both points

The finished equation has to fit both points.

Exact

Leave a fraction exact.

Easy

Easy

Whole number gradient.

Example
Find the equation of the line through (1, 3) and (4, 9).

Two points fix one line.

m = 9 − 34 − 1

m = 2

y − 3 = 2(x − 1)

3 = 2·1 + c

c = 1

y = 2x + 1

Answer: y = 2x + 1

1
Find the equation of the line through (0, 2) and (3, 8).
Show Answer

Two points fix one line.

m = 8 − 23 − 0

m = 2

y − 2 = 2(x − 0)

2 = 2·0 + c

c = 2

y = 2x + 2

Answer: y = 2x + 2

2
Find the equation of the line through (2, 1) and (5, 10).
Show Answer

Two points fix one line.

m = 10 − 15 − 2

m = 3

y − 1 = 3(x − 2)

1 = 3·2 + c

c = −5

y = 3x − 5

Answer: y = 3x − 5

3
Find the equation of the line through (1, 8) and (4, 2).
Show Answer

Two points fix one line.

m = 2 − 84 − 1

m = −2

y − 8 = −2(x − 1)

8 = −2·1 + c

c = 10

y = −2x + 10

Answer: y = −2x + 10

4
Find the equation of the line through (0, 5) and (2, 1).
Show Answer

Two points fix one line.

m = 1 − 52 − 0

m = −2

y − 5 = −2(x − 0)

5 = −2·0 + c

c = 5

y = −2x + 5

Answer: y = −2x + 5

5
Find the equation of the line through (3, 4) and (7, 4).
Show Answer

Two points fix one line.

m = 4 − 47 − 3

m = 0

y − 4 = 0(x − 3)

4 = 0·3 + c

c = 4

y = 4

Answer: y = 4

Medium

Medium

A negative coordinate.

Example
Find the equation of the line through (−2, 1) and (2, 9).

Two points fix one line.

m = 9 − 12 + 2

m = 2

Substitute a point into y = mx + c.

1 = 2·−2 + c

c = 5

y = 2x + 5

Answer: y = 2x + 5

1
Find the equation of the line through (−1, 5) and (3, −3).
Show Answer

Two points fix one line.

m = −3 − 53 + 1

m = −2

Substitute a point into y = mx + c.

5 = −2·−1 + c

c = 3

y = −2x + 3

Answer: y = −2x + 3

2
Find the equation of the line through (−4, −1) and (2, 5).
Show Answer

Two points fix one line.

m = 5 + 12 + 4

m = 1

Substitute a point into y = mx + c.

−1 = 1·−4 + c

c = 3

y = x + 3

Answer: y = x + 3

3
Find the equation of the line through (1, −2) and (5, 6).
Show Answer

Two points fix one line.

m = 6 + 25 − 1

m = 2

Substitute a point into y = mx + c.

−2 = 2·1 + c

c = −4

y = 2x − 4

Answer: y = 2x − 4

4
Find the equation of the line through (−3, 4) and (1, 4).
Show Answer

Two points fix one line.

m = 4 − 41 + 3

m = 0

Substitute a point into y = mx + c.

4 = 0·−3 + c

c = 4

y = 4

Answer: y = 4

5
Find the equation of the line through (−2, −6) and (4, 0).
Show Answer

Two points fix one line.

m = 0 + 64 + 2

m = 1

Substitute a point into y = mx + c.

−6 = 1·−2 + c

c = −4

y = x − 4

Answer: y = x − 4

Hard

Hard

A fractional gradient.

Example
Find the equation of the line through (1, 2) and (3, 5).

Two points fix one line.

m = 5 − 23 − 1

m = 32

y − 2 = 32(x − 1)

2 = 32·1 + c

c = 12

y = 32x + 12

Answer: y = 32x + 12

1
Find the equation of the line through (0, 1) and (2, 6).
Show Answer

Two points fix one line.

m = 6 − 12 − 0

m = 52

y − 1 = 52(x − 0)

1 = 52·0 + c

c = 1

y = 52x + 1

Answer: y = 52x + 1

2
Find the equation of the line through (2, 3) and (6, 5).
Show Answer

Two points fix one line.

m = 5 − 36 − 2

m = 12

y − 3 = 12(x − 2)

3 = 12·2 + c

c = 2

y = 12x + 2

Answer: y = 12x + 2

3
Find the equation of the line through (−1, 4) and (3, 1).
Show Answer

Two points fix one line.

m = 1 − 43 + 1

m = −34

Substitute a point into y = mx + c.

4 = −34·−1 + c

c = 134

y = −34x + 134

Answer: y = −34x + 134

4
Find the equation of the line through (1, 0) and (4, 2).
Show Answer

Two points fix one line.

m = 2 − 04 − 1

m = 23

y − 0 = 23(x − 1)

0 = 23·1 + c

c = −23

y = 23x − 23

Answer: y = 23x − 23

5
Find the equation of the line through (2, 7) and (6, 1).
Show Answer

Two points fix one line.

m = 1 − 76 − 2

m = −32

y − 7 = −32(x − 2)

7 = −32·2 + c

c = 10

y = −32x + 10

Answer: y = −32x + 10

Want to go over a linear model together?

Book a Session with Amy