## 2.1 Defining a straight line

Before we disucss a 'line of best fit', we will first discuss how to define a straight line. Consider the below graph of a straight (linear) line:

When we plot a straight line as we have done above, it can be defined by two things:

- The "\(y\)-intercept", i.e. the value of \(y\) at which the line crosses the \(y\) axis. This occurs when \(x = 0\)
- The "slope" of the line. The slope tells us how 'steep' or 'flat' the line is. It also tells us how much \(y\) increases (or decreases) for each unit increase in \(x\).

We can write down the equation of a line in a way you may be familiar with:

\[y = mx + c,\]

where:

- \(m\) is the slope of the line
- \(c\) is the \(y\)-intercept.

By studying the above graph, see if you can answer the following questions:

- What is the \(y\)-intercept?

The equation of the line is provided in the above graph - you can use this equation to identify the value of \(c\) (i.e. the \(y\)-intercept).

10

- What is the slope?

The equation of the line is provided in the above graph - you can use this equation to identify the value of \(m\) (i.e. the slope).

5

- What would be the value of \(y\) when \(x = 2\)?

\(y = 5x + 10 = 5\times 2 + 10 = \ldots\)?

20

To further explain the slope, let's zoom in on the above graph:

Looking at this zoomed in version of the graph, we can see that as we move from the yellow point to the red point, the following happens:

- \(x\) increases by one unit (from 2 to 3)
- \(y\) increases by 5 (from 20 to 25).

No matter where we are on the line, increasing \(x\) by one unit will always result in an increase of \(y\) by 5, which is the slope.