Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›IB Mathematics: Applications and Interpretation
  3. ›2 Functions
  4. ›2.1 Straight lines

IB Mathematics: Applications and Interpretation · Topic 2 · Functions

2.1 Straight lines

Find the equation of a straight line, interpret its gradient and intercepts, plot it, and test whether two lines are parallel or perpendicular.

  • 4 min read
  • 5 parts
  • 10 questions
  • Draft
Start a Quick 5 on this topic→Jump to the 10 questions
1/5Gradient measures how steeply a line rises
  1. 1Gradient measures how steeply a line rises
  2. 2A line can be written in three standard forms
  3. 3Gradient and intercepts carry meaning in context
  4. 4Two points are enough to plot a straight line
  5. 5Parallel and perpendicular lines have linked gradients
  6. Check your recall
  7. Practice: 10 questions
1

Part 1 of 5: Gradient measures how steeply a line rises

Compare two ramps. One rises 1 cm for every 4 cm across. The other rises 1 cm for every 2 cm, so it is steeper. The gradient measures this steepness as the vertical change divided by the horizontal change.

For points (x1,y1)(x_1,y_1)(x1​,y1​) and (x2,y2)(x_2,y_2)(x2​,y2​), the gradient is m=y2−y1x2−x1m=\frac{y_2-y_1}{x_2-x_1}m=x2​−x1​y2​−y1​​. Any two points on the same line give the same value.

  • Positive gradient: the line rises from left to right.
  • Negative gradient: the line falls from left to right.
  • Zero gradient: the line is horizontal.
  • Undefined gradient: the line is vertical.

A steeper line has a gradient with a larger size, ignoring the sign.

Worked example

Calculate a gradient

Find the gradient of the line through (1,3)(1,3)(1,3) and (4,9)(4,9)(4,9).
  1. 1
    Use m=y2−y1x2−x1m=\frac{y_2-y_1}{x_2-x_1}m=x2​−x1​y2​−y1​​.
  2. 2
    Substitute: m=9−34−1=63m=\frac{9-3}{4-1}=\frac{6}{3}m=4−19−3​=36​.

Answer: The gradient is m=2m=2m=2.

Key term

gradient

The gradient mmm of a line is the change in yyy divided by the change in xxx between any two points on it.

Part 1 done

2

Part 2 of 5: A line can be written in three standard forms

With the gradient known, you can write the equation of the line. Three forms are common.

  • Gradient–intercept form: y=mx+cy=mx+cy=mx+c
  • Point–gradient form: y−y1=m(x−x1)y-y_1=m(x-x_1)y−y1​=m(x−x1​)
  • General form: ax+by+d=0ax+by+d=0ax+by+d=0

The form you choose depends on the information given. Rearranging between forms is a routine skill.

In y=mx+cy=mx+cy=mx+c, the constant ccc gives the y-intercept, the point (0,c)(0,c)(0,c) where the line crosses the vertical axis. The x-intercept is where the line crosses the horizontal axis. Find it by setting y=0y=0y=0.

Exam tip

Use point–gradient form when you know a point and the gradient. Then rearrange into the form the question asks for.

Worked example

Find an equation

Find the equation of the line with gradient 3 through (2,5)(2,5)(2,5). Give it in the forms y=mx+cy=mx+cy=mx+c and ax+by+d=0ax+by+d=0ax+by+d=0.
  1. 1
    Use y−y1=m(x−x1)y-y_1=m(x-x_1)y−y1​=m(x−x1​): y−5=3(x−2)y-5=3(x-2)y−5=3(x−2).
  2. 2
    Expand: y−5=3x−6y-5=3x-6y−5=3x−6.
  3. 3
    Rearrange: y=3x−1y=3x-1y=3x−1.

Answer: y=3x−1y=3x-1y=3x−1, or 3x−y−1=03x-y-1=03x−y−1=0

Key terms · tap one for its definition

y-intercept

The y-intercept of a line is the yyy-coordinate of the point where it crosses the vertical axis, where x=0x=0x=0.

x-intercept

The x-intercept of a line is the xxx-coordinate of the point where it crosses the horizontal axis, where y=0y=0y=0.

Part 2 done

Quick check

One question on the part you just read

Easy

State the gradient of the line y=−3x+7y=-3x+7y=−3x+7.
Show answer and explanation

Answer: B · Worked explanation

In y=mx+cy=mx+cy=mx+c the gradient is the coefficient of xxx, which is -3. The value 7 is the yyy-intercept. The value 3 drops the negative sign, which would turn a falling line into a rising one. Always read the gradient from the coefficient of xxx once the equation is in the form y=mx+cy=mx+cy=mx+c.
3

Part 3 of 5: Gradient and intercepts carry meaning in context

A line often models a real situation, so each number needs a meaning. Suppose a taxi charges a fixed fee plus a rate for each kilometre. The cost CCC in euros for a journey of xxx km is C=1.50x+4.00C=1.50x+4.00C=1.50x+4.00.

The gradient is 1.50 euro km−11.50\,\mathrm{euro\,km^{-1}}1.50eurokm−1. Each extra kilometre adds 1.50 euros. The yyy-intercept is 4.00 euros, the fixed fee before any distance.

Not every intercept is meaningful. Here the xxx-intercept would be a negative distance. The model applies only for x≥0x\ge0x≥0.

Exam tip

Write 'for each extra kilometre, the cost increases by 1.50 euros'. A bare '1.50' earns no credit for interpretation.

Worked example

Use a linear model

Using C=1.50x+4.00C=1.50x+4.00C=1.50x+4.00, find the cost of a 12 km journey and the distance travelled for a cost of 31 euros.
  1. 1
    Cost of 12 km: C=1.50×12+4.00=18+4C=1.50\times12+4.00=18+4C=1.50×12+4.00=18+4.
  2. 2
    Distance for 31 euros: 31=1.50x+431=1.50x+431=1.50x+4, so 1.50x=271.50x=271.50x=27.
  3. 3
    Divide: x=271.50=18x=\frac{27}{1.50}=18x=1.5027​=18.

Answer: The 12 km journey costs 22 euros, and 31 euros pays for 18 km.

Part 3 done

4

Part 4 of 5: Two points are enough to plot a straight line

To draw a line from its equation, you need only two points on it. The intercepts are usually the easiest to find.

  • Set x=0x=0x=0 to find the yyy-intercept.
  • Set y=0y=0y=0 to find the xxx-intercept.
  • Plot both points.
  • Join them with a ruler and extend the line.

Worked example

Plot a line

Find the intercepts of 2x+3y−12=02x+3y-12=02x+3y−12=0.
  1. 1
    Set x=0x=0x=0: 3y=123y=123y=12, so y=4y=4y=4.
  2. 2
    Set y=0y=0y=0: 2x=122x=122x=12, so x=6x=6x=6.
  3. 3
    The line passes through (0,4)(0,4)(0,4) and (6,0)(6,0)(6,0).

Answer: The yyy-intercept is (0,4)(0,4)(0,4) and the xxx-intercept is (6,0)(6,0)(6,0).

Figure 1. The line crosses the axes at its two intercepts. Joining those points draws the whole line.

The line slopes downward because its gradient is negative. Each step of 3 to the right takes the line down by 2.

A third point makes a good check. If it lies off your line, one of the intercepts is wrong.

Common mistake

The gradient of ax+by+d=0ax+by+d=0ax+by+d=0 is not aaa. Rearrange to y=mx+cy=mx+cy=mx+c first. The gradient is −ab-\frac{a}{b}−ba​.

Part 4 done

Quick check

One question on the part you just read

Easy

Identify the yyy-coordinate of the yyy-intercept of 2x+5y=102x+5y=102x+5y=10.
Show answer and explanation

Answer: A · Worked explanation

The yyy-intercept occurs where x=0x=0x=0. Then 5y=105y=105y=10, so y=2y=2y=2. The value 10 is the constant on the right, and 5 is the coefficient of yyy. Neither is found by setting x=0x=0x=0 and solving. Check by substituting: the point (0,2)(0,2)(0,2) gives 0+10=100+10=100+10=10, so it lies on the line.
5

Part 5 of 5: Parallel and perpendicular lines have linked gradients

Gradients also show how two lines sit relative to each other. Two lines are parallel when they have equal gradients, m1=m2m_1=m_2m1​=m2​, and never meet. Two lines are perpendicular when they meet at a right angle.

For perpendicular lines, m1m2=−1m_1m_2=-1m1​m2​=−1. So the perpendicular gradient is the negative reciprocal, m2=−1m1m_2=-\frac{1}{m_1}m2​=−m1​1​.

Find a negative reciprocal by flipping the fraction and changing its sign. For example, 23\frac{2}{3}32​ becomes −32-\frac{3}{2}−23​. Equal gradients with equal intercepts give the same line.

Worked example

Find a perpendicular line

Find the line through (4,3)(4,3)(4,3) perpendicular to y=2x+1y=2x+1y=2x+1.
  1. 1
    The given gradient is 2, so m2=−12m_2=-\frac{1}{2}m2​=−21​.
  2. 2
    Use y−y1=m(x−x1)y-y_1=m(x-x_1)y−y1​=m(x−x1​): y−3=−12(x−4)y-3=-\frac{1}{2}(x-4)y−3=−21​(x−4).
  3. 3
    Expand: y−3=−12x+2y-3=-\frac{1}{2}x+2y−3=−21​x+2.

Answer: y=−12x+5y=-\frac{1}{2}x+5y=−21​x+5

Common mistake

The rule m1m2=−1m_1m_2=-1m1​m2​=−1 does not cover a horizontal line and a vertical line. They are perpendicular, but the vertical line has no gradient.

Key terms · tap one for its definition

parallel

Parallel lines have equal gradients, m1=m2m_1=m_2m1​=m2​, and never meet unless they are the same line.

perpendicular

Perpendicular lines meet at a right angle, and their gradients satisfy m1m2=−1m_1m_2=-1m1​m2​=−1 when neither line is vertical.

Note read

Check your recall[14 marks]

6 written questions. Answer each one in your head or on paper, then open the mark scheme.

  1. 1.Calculate[2 marks]

    Calculate the gradient of the line through (−2,1)(-2,1)(−2,1) and (4,10)(4,10)(4,10).

    Show mark schemeHide mark scheme

    Model answer

    m=10−14−(−2)=96=32m=\frac{10-1}{4-(-2)}=\frac{9}{6}=\frac{3}{2}m=4−(−2)10−1​=69​=23​.

    • 1 mark for substituting into m=y2−y1x2−x1m=\frac{y_2-y_1}{x_2-x_1}m=x2​−x1​y2​−y1​​ correctly
    • 1 mark for obtaining m=32m=\frac{3}{2}m=23​
  2. 2.Determine[3 marks]

    Determine the equation of the line with gradient -2 through the point (3,1)(3,1)(3,1). Give it in the form y=mx+cy=mx+cy=mx+c.

    Show mark schemeHide mark scheme

    Model answer

    y−1=−2(x−3)y-1=-2(x-3)y−1=−2(x−3), so y−1=−2x+6y-1=-2x+6y−1=−2x+6. Hence y=−2x+7y=-2x+7y=−2x+7.

    • 1 mark for using y−y1=m(x−x1)y-y_1=m(x-x_1)y−y1​=m(x−x1​) with the given values
    • 1 mark for expanding the brackets correctly
    • 1 mark for obtaining y=−2x+7y=-2x+7y=−2x+7
  3. 3.State[2 marks]

    State the coordinates of the yyy-intercept and the xxx-intercept of 3x+4y−12=03x+4y-12=03x+4y−12=0.

    Show mark schemeHide mark scheme

    Model answer

    Setting x=0x=0x=0 gives y=3y=3y=3, so the yyy-intercept is (0,3)(0,3)(0,3). Setting y=0y=0y=0 gives x=4x=4x=4, so the xxx-intercept is (4,0)(4,0)(4,0).

    • 1 mark for giving the yyy-intercept (0,3)(0,3)(0,3)
    • 1 mark for giving the xxx-intercept (4,0)(4,0)(4,0)
  4. 4.Explain[2 marks]

    The monthly cost CCC in euros of a gym is C=18t+30C=18t+30C=18t+30, where ttt is the number of months. Explain the meaning of the numbers 18 and 30.

    Show mark schemeHide mark scheme

    Model answer

    The gradient 18 means the cost rises by 18 euros for each extra month. The yyy-intercept 30 is the fixed cost, in euros, at t=0t=0t=0, before any months are paid.

    • 1 mark for interpreting the gradient 18 as the cost increase of 18 euros per month
    • 1 mark for interpreting 30 as the fixed cost at the start
  5. 5.Determine[2 marks]

    Determine whether the lines 2y=4x+32y=4x+32y=4x+3 and y=2x−5y=2x-5y=2x−5 are parallel.

    Show mark schemeHide mark scheme

    Model answer

    The first line is y=2x+32y=2x+\frac{3}{2}y=2x+23​, with gradient 2. The second line also has gradient 2 and a different intercept, so the lines are parallel.

    • 1 mark for rearranging the first line to find gradient 2
    • 1 mark for stating that the gradients are equal, so the lines are parallel
  6. 6.Determine[3 marks]

    Determine the equation of the line perpendicular to y=12x+3y=\frac{1}{2}x+3y=21​x+3 that passes through (1,4)(1,4)(1,4). Give it in the form y=mx+cy=mx+cy=mx+c.

    Show mark schemeHide mark scheme

    Model answer

    The perpendicular gradient is -2. Then y−4=−2(x−1)y-4=-2(x-1)y−4=−2(x−1), so y=−2x+6y=-2x+6y=−2x+6.

    • 1 mark for finding the perpendicular gradient -2
    • 1 mark for using y−y1=m(x−x1)y-y_1=m(x-x_1)y−y1​=m(x−x1​) with (1,4)(1,4)(1,4)
    • 1 mark for obtaining y=−2x+6y=-2x+6y=−2x+6

Practice this topic

10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)

0 right0 of 10 answered

Includes the 2 quick checks in the note above.

3.

Easy·State[1 mark]

State the gradient of a line perpendicular to a line with gradient 4.
Show answer and explanation

Answer: D · Worked explanation

Perpendicular gradients satisfy m1m2=−1m_1m_2=-1m1​m2​=−1, so m2=−14m_2=-\frac{1}{4}m2​=−41​. The value 14\frac{1}{4}41​ takes the reciprocal but forgets to change the sign. The value -4 changes the sign but not the reciprocal. The value 4 is the gradient of a parallel line. Check the product: 4×(−14)=−14\times\left(-\frac{1}{4}\right)=-14×(−41​)=−1, as required.
4.

Medium·Calculate[1 mark]

Calculate the gradient of the line through (3,−2)(3,-2)(3,−2) and (7,6)(7,6)(7,6).
Show answer and explanation

Answer: C · Worked explanation

Use m=y2−y1x2−x1=6−(−2)7−3=84=2m=\frac{y_2-y_1}{x_2-x_1}=\frac{6-(-2)}{7-3}=\frac{8}{4}=2m=x2​−x1​y2​−y1​​=7−36−(−2)​=48​=2. The value 12\frac{1}{2}21​ inverts the fraction. The value -2 subtracts the yyy-values in the opposite order to the xxx-values, giving −2−67−3\frac{-2-6}{7-3}7−3−2−6​. The value 4 is the horizontal change, not the gradient. A quick sketch agrees: the line rises 8 units while moving 4 units to the right, so it climbs steeply and positively.
5.

Medium·Determine[2 marks]

Determine the equation of the line with gradient 3 through (1,4)(1,4)(1,4).
Show answer and explanation

Answer: B · Worked explanation

Use y−4=3(x−1)y-4=3(x-1)y−4=3(x−1), so y=3x−3+4=3x+1y=3x-3+4=3x+1y=3x−3+4=3x+1. The equation y=3x+4y=3x+4y=3x+4 wrongly uses the yyy-coordinate as the intercept. The equation y=3x+7y=3x+7y=3x+7 comes from writing x+1x+1x+1 in the bracket, and y=3x−11y=3x-11y=3x−11 swaps the coordinates. Check: substituting x=1x=1x=1 gives y=3(1)+1=4y=3(1)+1=4y=3(1)+1=4, which matches the given point, and the gradient is 3 as required.
6.

Medium·Explain[1 mark]

The height hhh cm of a candle after ttt hours is h=20−2.5th=20-2.5th=20−2.5t. Explain the meaning of the gradient.
Show answer and explanation

Answer: A · Worked explanation

The gradient is -2.5 cm for each hour, so the height decreases by 2.5 cm every hour. The number 20 is the starting height, which is the yyy-intercept. A burn time would come from the ttt-intercept, which is t=8t=8t=8 hours.
7.

Medium·Identify[1 mark]

Identify the line parallel to y=2x+1y=2x+1y=2x+1.
Show answer and explanation

Answer: D · Worked explanation

Rearrange 4x−2y+3=04x-2y+3=04x−2y+3=0 to y=2x+32y=2x+\frac{3}{2}y=2x+23​, which has gradient 2, so it is parallel. The line 2x+y−1=02x+y-1=02x+y−1=0 has gradient -2, and x−2y+4=0x-2y+4=0x−2y+4=0 has gradient 12\frac{1}{2}21​. Neither equals 2. Parallel lines always have equal gradients, so comparing gradients is the quickest test. A different constant term only moves the line up or down.
8.

Hard·Determine[2 marks]

Determine the equation of the line through (2,1)(2,1)(2,1) perpendicular to 3x+2y−6=03x+2y-6=03x+2y−6=0.
Show answer and explanation

Answer: C · Worked explanation

The given line is y=−32x+3y=-\frac{3}{2}x+3y=−23​x+3, so the perpendicular gradient is 23\frac{2}{3}32​. Then y−1=23(x−2)y-1=\frac{2}{3}(x-2)y−1=32​(x−2), which gives 3y−3=2x−43y-3=2x-43y−3=2x−4, so 2x−3y−1=02x-3y-1=02x−3y−1=0. The line 3x+2y−8=03x+2y-8=03x+2y−8=0 is parallel, and 2x+3y−7=02x+3y-7=02x+3y−7=0 has gradient −23-\frac{2}{3}−32​, which only inverts the fraction. Check by substituting (2,1)(2,1)(2,1) into the answer: 4−3−1=04-3-1=04−3−1=0, so the line passes through the point.
9.

Hard·Determine[2 marks]

A line has xxx-intercept 6 and gradient −23-\frac{2}{3}−32​. Determine its yyy-intercept.
Show answer and explanation

Answer: B · Worked explanation

The line passes through (6,0)(6,0)(6,0), so y−0=−23(x−6)y-0=-\frac{2}{3}(x-6)y−0=−32​(x−6), which gives y=−23x+4y=-\frac{2}{3}x+4y=−32​x+4. The yyy-intercept is 4. The value 9 comes from dividing 6 by the gradient instead of multiplying, and -4 has the wrong sign. Check: at x=6x=6x=6 the equation gives y=−4+4=0y=-4+4=0y=−4+4=0, so the line does pass through (6,0)(6,0)(6,0).
10.

Hard·Deduce[2 marks]

Points P(0,1)P(0,1)P(0,1), Q(4,3)Q(4,3)Q(4,3) and R(2,7)R(2,7)R(2,7) are given. Deduce which statement is true.
Show answer and explanation

Answer: A · Worked explanation

The gradient of PQPQPQ is 3−14−0=12\frac{3-1}{4-0}=\frac{1}{2}4−03−1​=21​. The gradient of QRQRQR is 7−32−4=−2\frac{7-3}{2-4}=-22−47−3​=−2. Their product is -1, so PQPQPQ is perpendicular to QRQRQR. The gradient of PRPRPR is 7−12−0=3\frac{7-1}{2-0}=32−07−1​=3, which is neither parallel nor perpendicular to the other two. Hence the segments PQPQPQ and QRQRQR meet at a right angle at QQQ.

Keep going

Next topic2.2 Functions, domain and rangePrevious topic1.15 Eigenvalues and eigenvectors

More in Topic 2 · Functions

  1. 2.1Straight linesNotes · 10 questions
  2. 2.2Functions, domain and rangeNotes · 10 questions
  3. 2.3Graphs of functionsNotes · 10 questions
  4. 2.4Key features of graphsNotes · 10 questions
  5. 2.5Modelling with functionsNotes · 10 questions
  6. 2.6The modelling processNotes · 10 questions
  7. 2.7Composite and inverse functionsNotes · 10 questions· HL only
  8. 2.8Transformations of graphsNotes · 10 questions· HL only
  9. 2.9Further modelsNotes · 10 questions· HL only

All IB Mathematics: Applications and Interpretation topics →

Draft: written by Scribe and checked automatically, not yet by a subject reviewer.

Practice questions are original, written by Scribe and checked automatically for correctness.

Topic codes follow the official numbering. Not endorsed by IB Diploma Programme or any exam board.

On this page

0/5 read

  1. 1Gradient measures how steeply a line rises
  2. 2A line can be written in three standard forms
  3. 3Gradient and intercepts carry meaning in context
  4. 4Two points are enough to plot a straight line
  5. 5Parallel and perpendicular lines have linked gradients
  6. Check your recall
  7. Practice: 10 questions
All coursesScribeHow it worksPricingPrivacyTerms

Notes and questions are written by Scribe in our own words. Topic codes follow the official course numbering so you can find your place. Not produced or endorsed by the IB, College Board, AQA, OCR, Pearson Edexcel or any exam board.

© 2026 Scribe

The line 2x + 3y − 12 = 0

y-202468-20246x
  • 2x + 3y − 12 = 0
  • y-intercept (0, 4)
  • x-intercept (6, 0)