Linear Functions & Graphs

Amari Cross & Matthew Williams
||8 min read
FunctionsGraphsLinear

Gradient, y-intercept, parallel and perpendicular lines, and plotting straight-line graphs.

Linear functions connect algebra to visual patterns. The equation tells you how yy changes as xx changes, and the graph shows that relationship as a straight line.

In CSEC, graph questions may ask for gradient, intercepts, equations of lines, parallel or perpendicular lines, or graphical solutions to simultaneous equations. Do not only plot points; explain what the gradient and intercept mean. That helps with comprehension and reasoning marks.

What Is a Linear Function?

A linear function is a function where the graph is a straight line.

General form: f(x)=mx+cf(x) = mx + c

Or: y=mx+cy = mx + c

Where:

  • mm = slope (gradient) — how steep the line is
  • cc = y-intercept — where the line crosses the y-axis
  • xx = input (domain variable)
  • yy or f(x)f(x) = output (range variable)

Understanding Slope (Gradient)

Slope measures how much yy changes when xx increases by 1.

m=slope=change in ychange in x=ΔyΔx=y2y1x2x1m = \text{slope} = \frac{\text{change in } y}{\text{change in } x} = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}

Interpretation:

  • m>0m > 0: Line goes UP from left to right (positive slope)
  • m<0m < 0: Line goes DOWN from left to right (negative slope)
  • m=0m = 0: Horizontal line (flat, no change)
  • mm undefined: Vertical line

Examples of Different Slopes

Different slopes: y=2x (steep), y=x, y=0.5x (shallow)

Forms of Linear Equations

Form 1: Slope-Intercept Form (Most Useful)

y=mx+cy = mx + c

  • Easy to identify: slope is mm, y-intercept is cc
  • Easy to graph: plot (0,c)(0, c), then use slope to find more points
Example

Graph y=2x3y = 2x - 3:

  • Slope: m=2m = 2 (go up 2 for every right 1)
  • Y-intercept: c=3c = -3 (crosses y-axis at (0,3)(0, -3))

Plot key points:

  • Start at (0,3)(0, -3)
  • Slope 2 means: right 1, up 2 → next point (1,1)(1, -1)
  • Continue: (2,1)(2, 1), (3,3)(3, 3), etc.
y = 2x - 3

Form 2: Point-Slope Form

yy1=m(xx1)y - y_1 = m(x - x_1)

Use this when you know:

  • The slope mm
  • One point (x1,y1)(x_1, y_1) on the line
Example

Find the equation of a line with slope 3 passing through (2,5)(2, 5):

Step 1: Use point-slope form y5=3(x2)y - 5 = 3(x - 2)

Step 2: Expand y5=3x6y - 5 = 3x - 6

Step 3: Rearrange to slope-intercept form y=3x6+5y = 3x - 6 + 5 y=3x1y = 3x - 1

Form 3: Two-Point Form

When you know two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2):

Step 1: Find slope m=y2y1x2x1m = \frac{y_2 - y_1}{x_2 - x_1}

Step 2: Use point-slope form with either point

Example

Find the equation of a line through (1,3)(1, 3) and (4,12)(4, 12):

Step 1: Find slope m=12341=93=3m = \frac{12 - 3}{4 - 1} = \frac{9}{3} = 3

Step 2: Use point-slope with first point (1,3)(1, 3) y3=3(x1)y - 3 = 3(x - 1) y=3x3+3y = 3x - 3 + 3 y=3xy = 3x

Verify with second point: y=3(4)=12y = 3(4) = 12

Form 4: Standard Form

Ax+By+C=0Ax + By + C = 0

Or: Ax+By=CAx + By = C

Where AA, BB, CC are integers with no common factors.

Convert from slope-intercept to standard: y=2x32xy3=0y = 2x - 3 \Rightarrow 2x - y - 3 = 0

Finding Intercepts

Y-Intercept

The y-intercept is where the line crosses the y-axis (when x=0x = 0).

To find: Set x=0x = 0 and solve for yy.

Example

Find y-intercept of 2x+3y=62x + 3y = 6:

Set x=0x = 0: 2(0)+3y=62(0) + 3y = 6 3y=63y = 6 y=2y = 2

Y-intercept: (0,2)(0, 2)

X-Intercept

The x-intercept is where the line crosses the x-axis (when y=0y = 0).

To find: Set y=0y = 0 and solve for xx.

Example

Find x-intercept of 2x+3y=62x + 3y = 6:

Set y=0y = 0: 2x+3(0)=62x + 3(0) = 6 2x=62x = 6 x=3x = 3

X-intercept: (3,0)(3, 0)

Remember

To find intercepts, substitute ZERO for the other variable:

  • Y-intercept: Set x=0x = 0, solve for yy
  • X-intercept: Set y=0y = 0, solve for xx

These are always single points (unless the line doesn't cross that axis, which is rare for linear functions).


Part 4: Properties of Linear Functions

Parallel Lines — Same Slope

Two lines are parallel if they have the same slope and different y-intercepts.

y=mx+c1 and y=mx+c2 (where c1c2)y = m x + c_1 \text{ and } y = m x + c_2 \text{ (where } c_1 \neq c_2)

Parallel lines never intersect.

Example

Lines y=2x+3y = 2x + 3 and y=2x5y = 2x - 5 are parallel:

Both have slope m=2m = 2, but different y-intercepts (33 and 5-5).

Parallel lines: y = 2x + 1 and y = 2x - 2
Example

Find a line parallel to 3x+2y=73x + 2y = 7 passing through (1,4)(1, 4):

Step 1: Find the slope of 3x+2y=73x + 2y = 7 2y=3x+72y = -3x + 7 y=32x+72y = -\frac{3}{2}x + \frac{7}{2}

Slope: m=32m = -\frac{3}{2}

Step 2: Parallel line has same slope: m=32m = -\frac{3}{2}

Step 3: Use point-slope form with (1,4)(1, 4) y4=32(x1)y - 4 = -\frac{3}{2}(x - 1) y4=32x+32y - 4 = -\frac{3}{2}x + \frac{3}{2} y=32x+112y = -\frac{3}{2}x + \frac{11}{2}

Perpendicular Lines — Negative Reciprocal Slopes

Two lines are perpendicular if their slopes are negative reciprocals of each other.

If line 1 has slope m1m_1 and line 2 has slope m2m_2: m1×m2=1m_1 \times m_2 = -1

Or: m2=1m1m_2 = -\frac{1}{m_1}

Perpendicular lines meet at a 90° angle.

Examples:

  • Slope 2 and slope 12-\frac{1}{2} are perpendicular (because 2×(12)=12 \times (-\frac{1}{2}) = -1)
  • Slope 3 and slope 13-\frac{1}{3} are perpendicular
  • Slope 34\frac{3}{4} and slope 43-\frac{4}{3} are perpendicular
Example

Find a line perpendicular to y=2x+5y = 2x + 5 passing through (3,1)(3, -1):

Step 1: Slope of given line: m1=2m_1 = 2

Step 2: Perpendicular slope: m2=12m_2 = -\frac{1}{2} (negative reciprocal)

Step 3: Use point-slope form with (3,1)(3, -1) y(1)=12(x3)y - (-1) = -\frac{1}{2}(x - 3) y+1=12x+32y + 1 = -\frac{1}{2}x + \frac{3}{2} y=12x+12y = -\frac{1}{2}x + \frac{1}{2}

Length and Midpoint of Line Segments

Distance (Length) Formula

For two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2), the distance between them is:

d=(x2x1)2+(y2y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

This comes from the Pythagorean theorem.

Example

Find the distance between (1,2)(1, 2) and (4,6)(4, 6):

d=(41)2+(62)2d = \sqrt{(4-1)^2 + (6-2)^2} =32+42= \sqrt{3^2 + 4^2} =9+16= \sqrt{9 + 16} =25= \sqrt{25} =5 units= 5 \text{ units}

Midpoint Formula

The midpoint of a line segment between (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is:

Midpoint=(x1+x22,y1+y22)\text{Midpoint} = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right)

Just average the x-coordinates and average the y-coordinates.

Example

Find the midpoint between (2,3)(2, 3) and (8,7)(8, 7):

Midpoint=(2+82,3+72)=(102,102)=(5,5)\text{Midpoint} = \left(\frac{2+8}{2}, \frac{3+7}{2}\right) = \left(\frac{10}{2}, \frac{10}{2}\right) = (5, 5)

Check: Distance from (2,3)(2,3) to (5,5)(5,5) is 9+4=13\sqrt{9+4} = \sqrt{13} Distance from (5,5)(5,5) to (8,7)(8,7) is 9+4=13\sqrt{9+4} = \sqrt{13} Both equal, so (5,5)(5,5) is truly the midpoint. ✓


Part 5: Graphing Linear Functions

Sketching from Slope-Intercept Form

Given y=mx+cy = mx + c:

Step 1: Plot the y-intercept (0,c)(0, c)

Step 2: Use slope m=riserunm = \frac{\text{rise}}{\text{run}} to find more points:

  • If m=2=21m = 2 = \frac{2}{1}: Go right 1, up 2
  • If m=3=31m = -3 = \frac{-3}{1}: Go right 1, down 3
  • If m=23m = \frac{2}{3}: Go right 3, up 2

Step 3: Plot at least 3 points and draw the line through them

Example

Sketch y=12x+3y = -\frac{1}{2}x + 3:

  • Y-intercept: (0,3)(0, 3) — start here
  • Slope: 12=12-\frac{1}{2} = \frac{-1}{2} (right 2, down 1)
    • From (0,3)(0, 3): go right 2, down 1 → (2,2)(2, 2)
    • From (2,2)(2, 2): go right 2, down 1 → (4,1)(4, 1)
  • Alternative direction (left 2, up 1):
    • From (0,3)(0, 3): go left 2, up 1 → (2,4)(-2, 4)
y = -½x + 3

Solving Systems Graphically

When you have two linear equations, the solution is the point where the lines intersect.

Example

Solve graphically: y=2x1y = 2x - 1 y=x+5y = -x + 5

Step 1: Graph both lines

  • Line 1: y-intercept (0,1)(0, -1), slope 2
  • Line 2: y-intercept (0,5)(0, 5), slope 1-1

Step 2: Find intersection point

  • From the graph: they intersect at (2,3)(2, 3)

Step 3: Verify

  • Line 1: y=2(2)1=3y = 2(2) - 1 = 3
  • Line 2: y=(2)+5=3y = -(2) + 5 = 3

Solution: (2,3)(2, 3)

y = x + 1 and y = -x + 3 intersect at (1, 2)