Linear Relationships and Functions

3. Writing Linear Equations

Learning outcomes
  • I can write linear equations from tables and patterns.
  • I can identify slope and intercept values.
  • I can express linear relationships using algebraic equations.
  • I can write equations in slope-intercept form.
  • I can verify that an equation represents a given relationship.

Writing Linear Equations

A linear equation describes a relationship in which one variable changes at a constant rate compared with another variable.

Linear equations can be created from:

  • tables
  • numerical patterns
  • graphs
  • descriptions
  • real-world situations

One of the most useful forms of a linear equation is:

y = mx + b

where:

  • m = slope or rate of change
  • b = y-intercept or starting value

For example:

y = 3x + 5

has a slope of 3 and a y-intercept of 5.

This means y begins at 5 when x = 0 and increases by 3 whenever x increases by 1.


Slope-Intercept Form

The equation:

y = mx + b

is called slope-intercept form.

Each part has a specific meaning.

Part Meaning
x independent variable or input
y dependent variable or output
m slope or rate of change
b y-intercept or starting value

For:

y = 4x + 7

m = 4

b = 7

Therefore, the relationship has:

slope = 4

y-intercept = 7


Understanding Slope

The slope describes how much y changes compared with x.

Slope can be calculated using:

m = change in y / change in x

or:

m = Δy/Δx

If x increases by 1 while y increases by 5:

m = 5/1 = 5

If x increases by 2 while y increases by 6:

m = 6/2 = 3

The slope is the rate of change.


Positive Slope

Consider:

y = 3x + 2

The slope is:

m = 3

Every time x increases by 1:

y increases by 3.

The graph rises from left to right.


Negative Slope

Consider:

y = −2x + 8

The slope is:

m = −2

Every time x increases by 1:

y decreases by 2.

A negative slope represents a decreasing relationship.


Zero Slope

Consider:

y = 6

This can be thought of as:

y = 0x + 6

Therefore:

m = 0

The y-value does not change as x changes.

The graph is a horizontal line.


Understanding the y-Intercept

The y-intercept is the value of y when:

x = 0

For:

y = 5x + 12

substitute x = 0:

y = 5(0) + 12

y = 12

Therefore:

b = 12

The graph crosses the y-axis at:

(0, 12)


The y-Intercept as a Starting Value

In real situations, the y-intercept often represents an initial amount.

Suppose:

C = 4d + 6

where:

C = taxi cost

d = distance travelled

The slope is:

4

meaning the cost increases by $4 per kilometre.

The intercept is:

6

meaning the taxi has a starting charge of $6.


Finding an Equation from a Table

Consider:

x y
0 4
1 7
2 10
3 13
4 16

First find the slope.

As x increases by 1:

y increases by 3.

Therefore:

m = 3

Now find the intercept.

When x = 0:

y = 4

Therefore:

b = 4

The equation is:

y = 3x + 4


Checking the Equation

For:

y = 3x + 4

check x = 3.

y = 3(3) + 4

y = 9 + 4

y = 13

The table shows:

x = 3, y = 13

Therefore, the equation correctly represents that point.

A stronger verification checks several points rather than only one.


Finding Slope When x Changes by More Than 1

Consider:

x y
0 5
2 11
4 17
6 23

Here:

Δx = 2

and:

Δy = 6

Therefore:

m = 6/2

m = 3

When x = 0:

y = 5

Therefore:

b = 5

The equation is:

y = 3x + 5

Do not automatically assume the change in y is the slope. You must consider the change in x as well.


Finding Slope with Unequal x-Intervals

Consider:

x y
1 7
3 13
6 22
10 34

Calculate slope using two rows:

m = (13 − 7)/(3 − 1)

m = 6/2

m = 3

Check another pair:

m = (22 − 13)/(6 − 3)

m = 9/3

m = 3

The constant slope confirms that the relationship is linear.


Finding the Intercept When x = 0 Is Shown

If a table contains x = 0, finding b is easy.

Consider:

x y
0 −2
1 3
2 8
3 13

The slope is:

m = 5

At x = 0:

y = −2

Therefore:

b = −2

The equation is:

y = 5x − 2


When x = 0 Is Not in the Table

Sometimes the table does not show the y-intercept.

Consider:

x y
2 11
3 15
4 19
5 23

The slope is:

m = 4

So begin with:

y = 4x + b

Use any point from the table.

Using:

(2, 11)

substitute:

11 = 4(2) + b

11 = 8 + b

b = 3

Therefore:

y = 4x + 3


Using a Point to Find b

Once the slope is known, substitute any known point into:

y = mx + b

For example, suppose:

m = 5

and the line contains:

(3, 19)

Substitute:

19 = 5(3) + b

19 = 15 + b

b = 4

Therefore:

y = 5x + 4

This method works even when the y-intercept is not visible in the original data.


Writing an Equation from a Numerical Pattern

Consider the sequence:

7, 11, 15, 19, 23, ...

Let:

n = term number

T = term value

The common difference is:

4

Therefore:

m = 4

Create a table:

n T
1 7
2 11
3 15
4 19

Start with:

T = 4n + b

Use the first term:

7 = 4(1) + b

7 = 4 + b

b = 3

Therefore:

T = 4n + 3


Why the First Term Is Not Necessarily the Intercept

For the sequence:

7, 11, 15, 19, ...

the first term is 7.

But the equation is:

T = 4n + 3

The intercept is 3, not 7.

This happens because the first term occurs at:

n = 1

The intercept represents the theoretical value when:

n = 0


Extending a Pattern Using Its Equation

Using:

T = 4n + 3

find the 25th term.

Substitute:

n = 25

T = 4(25) + 3

T = 100 + 3

T = 103

The equation allows us to find distant terms without writing every term in between.


Writing an Equation from Two Points

Suppose a linear relationship contains:

(2, 7)

and:

(6, 19)

First calculate slope:

m = (19 − 7)/(6 − 2)

m = 12/4

m = 3

Now use:

y = 3x + b

Substitute (2, 7):

7 = 3(2) + b

7 = 6 + b

b = 1

Therefore:

y = 3x + 1


The Slope Formula

Given two points:

(x₁, y₁) and (x₂, y₂)

the slope is:

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

For example:

(1, 5) and (4, 14)

m = (14 − 5)/(4 − 1)

m = 9/3

m = 3


Keep the Subtraction Order Consistent

When calculating slope, the subtraction order must match.

Correct:

m = (14 − 5)/(4 − 1)

or:

m = (5 − 14)/(1 − 4)

Both give:

m = 3

Incorrect:

(14 − 5)/(1 − 4)

because the numerator and denominator use opposite point orders.


Writing Equations with Negative Slope

Consider:

x y
0 12
1 9
2 6
3 3
4 0

The y-values decrease by 3 whenever x increases by 1.

Therefore:

m = −3

When x = 0:

b = 12

The equation is:

y = −3x + 12


Writing Equations with Fractional Slope

Consider the points:

(0, 2)

and:

(4, 4)

Calculate slope:

m = (4 − 2)/(4 − 0)

m = 2/4

m = 1/2

The intercept is:

b = 2

Therefore:

y = (1/2)x + 2

A linear equation can have a fractional or decimal slope.


Writing Equations with Zero Slope

Consider:

x y
−2 7
0 7
2 7
4 7

The y-value never changes.

Therefore:

m = 0

The equation is:

y = 7

This is a horizontal line.


Connecting an Equation to Its Graph

Consider:

y = 2x + 3

The slope is:

2

The y-intercept is:

3

The graph crosses the y-axis at:

(0, 3)

and rises by 2 units for every 1 unit moved to the right.

This produces a straight line.


Visualizing Slope-Intercept Form

For:

y = 2x + 3

we can generate several points:

x y
−1 1
0 3
1 5
2 7
3 9

These points all lie on the same straight line.

The constant slope is what makes the relationship linear.

https://images.openai.com/static-rsc-4/n1-RZtk4k4utPpw5LZ1OAl7-O1lPY-q__vuv_LNuZsap5NAzZEaMpOImaG-XREFG0AJsmUdt_goUovVTEmzRx2KzYVipvRl9343UDGGRu-6iMSKSCSe6WJxPcCaATM2vl_DW2iqVfwDJ24PevZKNdlfzVVQd-BV8oKgPUzIP9iPaAXO19aPbO5kis4DIt4fw?purpose=fullsize
 
https://images.openai.com/static-rsc-4/3jPNWZzb3IZKyZex5PeBUcl1xNyCHIScHI5UD64QMSeo3WyhRWViTqs6vGAb4ceDeOW2sdZnxDNdMaRriXMK9I-k43B3r4Mfh3htAQHbd157eN1A5aTAt4oNxth01WsvTDKz7rD-oOn6c79QUj_qxElvotRqRvw-1khzYQWYy3zpgHwmLSSVmUOOsQwsRB2I?purpose=fullsize
 
https://images.openai.com/static-rsc-4/ZJLU9hjZwtCB43bGm5YGGt23Bd8ICTtUR7oQTy5gRoLcCkkHDUMG0C2WS4Yp1TnVLLOzwjepMDFUpKZ2YMYT6I0Gwu8s99cnXMiyaIMj5LIDsBaNEv8t_RXK4XumnVSNag34IHezPe2k4ydr9Rfz3bzQSQADahOuTKCXpnP-8tTNXlmNpkI6UrdSxbwxtcRF?purpose=fullsize
 
8

Rise and Run

Slope is often described as:

slope = rise/run

The rise is the vertical change.

The run is the horizontal change.

For:

m = 3/2

the graph rises 3 units for every 2 units it moves right.

For:

m = −2/3

the graph falls 2 units for every 3 units it moves right.


Writing an Equation from a Graph

To write an equation from a graph:

  1. identify the y-intercept
  2. choose two clear points
  3. calculate the slope
  4. substitute m and b into y = mx + b
  5. verify the equation using another point

Suppose a line crosses the y-axis at:

(0, 2)

and also passes through:

(3, 8)

Slope:

m = (8 − 2)/(3 − 0)

m = 6/3

m = 2

Intercept:

b = 2

Equation:

y = 2x + 2


From Words to an Equation

Many verbal descriptions contain both the slope and intercept.

Consider:

"A tank initially contains 200 L of water and fills at 15 L per minute."

Let:

t = time in minutes

V = volume in litres

Starting value:

b = 200

Rate:

m = 15

Therefore:

V = 15t + 200


Identifying Rate and Starting Value from Language

Look for phrases such as:

"starts with" → intercept

"initially contains" → intercept

"initial fee" → intercept

"per hour" → slope

"each kilometre" → slope

"every week" → slope

"increases by" → slope

"decreases by" → negative slope


Taxi Fare Example

A taxi charges:

  • $5 initial fee
  • $2.50 per kilometre

Let:

d = distance in kilometres

C = total cost

The slope is:

2.5

The intercept is:

5

Therefore:

C = 2.5d + 5

For a 10 km journey:

C = 2.5(10) + 5

C = 25 + 5

C = $30


Savings Example

A student already has:

$75

and saves:

$20 each week

Let:

w = number of weeks

S = total savings

Starting amount:

75

Rate:

20

Equation:

S = 20w + 75

After 8 weeks:

S = 20(8) + 75

S = 235

The student has:

$235


Decreasing Quantity Example

A container begins with:

500 L

and loses:

25 L each minute

Let:

t = time

V = volume

The rate is:

−25 L/min

The starting value is:

500 L

Therefore:

V = −25t + 500

The negative slope represents a decreasing quantity.


Temperature Example

Suppose the temperature begins at:

18°C

and decreases:

1.5°C each hour

Let:

h = time in hours

T = temperature

Then:

T = −1.5h + 18

The slope is:

−1.5°C/hour

The intercept is:

18°C


Writing Function Notation

Linear equations can also be written using function notation.

Instead of:

y = 4x + 7

we can write:

f(x) = 4x + 7

The slope remains:

4

The intercept remains:

7

These are simply different ways of naming the output.


Verifying an Equation Using a Table

Suppose someone claims that this table:

x y
0 2
1 6
2 10
3 14

is represented by:

y = 4x + 2

Check several values.

For x = 0:

y = 4(0) + 2 = 2

Correct.

For x = 2:

y = 4(2) + 2 = 10

Correct.

For x = 3:

y = 4(3) + 2 = 14

Correct.

The equation represents the relationship.


Detecting an Incorrect Equation

Using the same table, suppose someone proposes:

y = 3x + 2

Check x = 2:

y = 3(2) + 2

y = 8

But the table gives:

y = 10

Therefore:

y = 3x + 2 does not represent the table.

One contradiction is enough to show that the proposed equation is incorrect.


Verifying Both Slope and Intercept

A quick verification method is to check:

  1. Does the equation have the correct rate of change?
  2. Does it have the correct starting value?

For example, a table has:

rate = 5

and:

y = 3 when x = 0

Therefore:

y = 5x + 3

An equation such as:

y = 5x + 7

has the correct slope but the wrong intercept.

An equation such as:

y = 4x + 3

has the correct intercept but the wrong slope.

Both must be correct.


Finding a Missing Value

Suppose a linear relationship follows:

y = 6x − 5

and a table contains:

x y
1 1
2 7
3 ?
4 19

For x = 3:

y = 6(3) − 5

y = 18 − 5

y = 13

The missing value is:

13


Finding an Input from an Equation

Suppose:

y = 4x + 7

and:

y = 31

Substitute:

31 = 4x + 7

Subtract 7:

24 = 4x

Divide by 4:

x = 6

This tells us that the output 31 occurs when the input is 6.


Comparing Two Linear Equations

Consider:

A: y = 3x + 10

B: y = 5x + 2

Equation A has:

slope = 3

intercept = 10

Equation B has:

slope = 5

intercept = 2

Equation A starts higher.

Equation B grows faster.

This distinction is important when comparing real-world linear models.


Finding Where Two Linear Relationships Meet

Using:

y = 3x + 10

and:

y = 5x + 2

set them equal:

3x + 10 = 5x + 2

Subtract 3x:

10 = 2x + 2

Subtract 2:

8 = 2x

x = 4

Substitute:

y = 3(4) + 10

y = 22

The relationships meet at:

(4, 22)


Equations from Geometric Patterns

Suppose connected squares require matchsticks according to:

Squares n Matchsticks M
1 4
2 7
3 10
4 13
5 16

The rate is:

3

So:

M = 3n + b

Use n = 1 and M = 4:

4 = 3(1) + b

b = 1

Therefore:

M = 3n + 1

https://images.openai.com/static-rsc-4/oy_EeOVY7jEtzOytVN4hqQzyOEvDqUoI8aRfMMWd6U1r39cTvMn2vgWKvFygirPDOI4q3eaJ6QLhkhUYZdHUZcsdNg2Tb5ioa7jo9Rb97NEFDK-py_YUWk4qJvrnTf6WgtrcmWlCfCGRwnq9kvInYTI3Gq2O5ZGgBMZml4O4btJYEYEyiLpI-RuqvSnjNHEN?purpose=fullsize
 

Checking Whether a Relationship Is Linear First

Before writing a linear equation, verify that the relationship actually has a constant rate of change.

Consider:

x y
0 1
1 4
2 9
3 16

Changes in y:

+3, +5, +7

The rate is not constant.

Therefore, this relationship cannot be represented by a single equation of the form:

y = mx + b

It is non-linear.


A Reliable Method from a Table

When writing a linear equation from a table:

  1. Check that the relationship has a constant rate of change.
  2. Choose two points.
  3. Calculate:

    m = Δy/Δx

  4. Find b directly if x = 0 appears.
  5. If x = 0 does not appear, substitute a known point into:

    y = mx + b

  6. Solve for b.
  7. Write:

    y = mx + b

  8. Verify the equation using another point.

A Reliable Method from a Pattern

When writing an equation from a linear sequence:

  1. Label the term numbers.
  2. Calculate the common difference.
  3. Use the common difference as the slope.
  4. Write:

    T = mn + b

  5. Substitute a known term.
  6. Solve for b.
  7. Write the completed rule.
  8. Check several terms.

A Reliable Method from a Real Situation

When writing an equation from words:

  1. Define the variables.
  2. Identify the starting value.
  3. Identify the rate of change.
  4. Determine whether the rate is positive or negative.
  5. Substitute into:

    y = mx + b

  6. Include appropriate units.
  7. Test the equation using a reasonable value.
  8. Interpret the result in context.

Common Mistakes

Using the change in y as the slope without checking x

Slope is:

Δy/Δx

not simply Δy.

Confusing slope and intercept

In:

y = 7x + 3

slope = 7

intercept = 3

Assuming the first table value is the intercept

The y-intercept occurs specifically when:

x = 0

Using the first term of a sequence as b

If term numbering begins at n = 1, the first term is not necessarily the intercept.

Ignoring negative slope

A decreasing linear relationship has a negative slope.

Changing subtraction order in the slope formula

Keep the point order consistent in the numerator and denominator.

Forgetting to verify the equation

Substitute known values back into the equation.

Assuming every pattern is linear

A linear equation requires a constant rate of change.

Ignoring units in real situations

A slope such as 5 might mean $5/hour, 5 km/min, or 5 L/s.

Using the rate as the starting value

"Charges $4 per kilometre plus a $7 starting fee" gives:

C = 4d + 7

not:

C = 7d + 4


Key Terms

Linear equation — equation representing a relationship with a constant rate of change.

Slope-intercept form — form y = mx + b, where m is slope and b is the y-intercept.

Slope — rate of change of y relative to x.

Rate of change — amount one variable changes compared with another.

Rise — vertical change between two points.

Run — horizontal change between two points.

y-intercept — point where a graph crosses the y-axis.

Starting value — value of the dependent variable when the independent variable equals zero.

Independent variable — input variable, commonly represented by x.

Dependent variable — output variable, commonly represented by y.

Linear relationship — relationship having a constant rate of change.

Common difference — constant difference between consecutive terms of a linear sequence.

Algebraic rule — equation describing the relationship between variables.

Function notation — notation such as f(x) used to represent the output of a function.

Verification — process of checking that an equation correctly reproduces known values.


Key Takeaways

  • Linear equations represent relationships with constant rates of change.
  • Slope-intercept form is y = mx + b.
  • The slope m represents the rate of change.
  • The y-intercept b represents the value of y when x = 0.
  • Slope can be calculated using m = Δy/Δx.
  • A positive slope represents an increasing relationship.
  • A negative slope represents a decreasing relationship.
  • A zero slope represents a constant relationship.
  • Tables can be used to determine both slope and intercept.
  • If x = 0 appears in a table, the corresponding y-value is the y-intercept.
  • If x = 0 is not shown, substitute a known point into y = mx + b to find b.
  • Linear sequence rules can be written using the term number as the input.
  • The first term of a sequence is not necessarily the intercept.
  • Real-world rates usually correspond to slope.
  • Initial amounts and fixed charges usually correspond to the intercept.
  • A relationship must have a constant rate of change to be represented by one linear equation.
  • Equations can be verified by substituting values from the original relationship.
  • A correct equation must have both the correct slope and the correct intercept.
  • Tables, patterns, graphs, equations, and verbal descriptions can all represent the same linear relationship.

Check Your Understanding

  1. Identify the slope and y-intercept of y = 5x + 7.
  2. Identify the slope and y-intercept of y = −3x + 12.
  3. Write the equation represented by this table:
x y
0 6
1 10
2 14
3 18
  1. Write a linear equation for:
x y
0 15
2 21
4 27
6 33
  1. Find the equation represented by:
x y
2 13
3 17
4 21
5 25

The y-intercept is not shown, so explain how you determine it.

  1. Write an algebraic rule for the sequence:

8, 13, 18, 23, 28, ...

where n = 1 represents the first term.

  1. Use your rule from Question 6 to determine the 40th term.
  2. Find the equation of the line passing through (2, 9) and (6, 21).
  3. A taxi charges a $7 starting fee plus $3.50 per kilometre. Define variables and write a linear equation for the total cost. Identify the slope and intercept and explain what each means.
  4. A tank begins with 600 L and loses 20 L each minute. Write an equation representing the volume after t minutes. Determine the volume after 12 minutes.
  5. A student claims that the table below is represented by y = 3x + 4:
x y
0 4
1 7
2 10
3 13

Verify the student's equation using at least three values.

  1. Determine whether a single linear equation can represent this table. Explain your reasoning.
x y
0 2
1 5
2 10
3 17
  1. A phone plan costs $30 per month plus $4 per GB of additional data. Write an equation relating total cost C to additional data g. Use your equation to determine the cost for 12 GB of additional data.
  2. Two savings plans are represented by A = 25w + 100 and B = 40w + 40. Identify the slope and intercept of each, explain their meanings, and determine when the two plans have the same amount of money.
  3. A linear relationship contains the points (3, 14) and (8, 34). Calculate the slope, determine the y-intercept, write the equation in slope-intercept form, verify the equation using both original points, and use the equation to predict y when x = 25.