Skip to content
spmaddmath.com.my
Tuition

Study

SyllabusFormulasMethodsExam & PapersTools
LocationsPricingBlogOur TeachersContact
EN

Worked examples · Linear Law

Linear Law, Worked Examples (easy)

These easy Linear Law examples work through the core moves, reducing a relation to the straight-line form Y=mX+cY = mX + c, reading the gradient and the vertical-axis intercept, finding the equation of a line of best fit from two points, and using that line to estimate a value. Try each one on paper first, then check every line against our full solution.

What these examples cover

These easy Linear Law examples build the moves the whole chapter rests on: reducing a relation to the straight-line form Y=mX+cY = mX + c, reading the gradient and the vertical-axis intercept, finding the equation of a line of best fit from two points, and using that line to estimate a value. Each one uses small, clean numbers so you can follow every line without a calculator getting in the way.

The best way to use the set is to cover the solution, attempt the question in full on paper, and only then check line by line against our working. If your answer differs, find the exact step where the two solutions part company, that single line is usually where the real learning is.

Treat the comparison with Y=mX+cY = mX + c as the move to slow down on, and these turn into quick, reliable marks.

Worked examples

Work through all four. Attempt each fully before you read the matching solution, and watch how the same routine, compare with Y=mX+cY = mX + c, decide what to plot, then read the gradient and intercept, runs through every one.

Q1[3 marks]

A line of best fit passes through the points (2,7)(2, 7) and (6,19)(6, 19). Find (a) the gradient of the line, and (b) the equation of the line in the form Y=mX+cY = mX + c.

Show worked solution

(a) The gradient measures how much YY rises for each unit increase in XX. Use the two given points in the gradient formula:

m=19762=124=3m=\frac{19-7}{6-2}=\frac{12}{4}=3

(b) Substitute m=3m = 3 into Y=mX+cY = mX + c, then use one known point, say (2,7)(2, 7), to find the intercept cc:

7=3(2)+c    7=6+c    c=17=3(2)+c \;\Rightarrow\; 7=6+c \;\Rightarrow\; c=1

Answer

The gradient is 33 and the line is Y=3X+1Y = 3X + 1. Check with the second point: at X=6X = 6, Y=3(6)+1=19Y = 3(6) + 1 = 19, which matches the given point exactly.

Q2[4 marks]

The variables xx and yy are related by y=ax2+by = ax^{2} + b, where aa and bb are constants. When yy is plotted against x2x^{2}, a straight line of gradient 44 and vertical-axis intercept 3-3 is obtained.

Find (a) the values of aa and bb, and (b) the value of yy when x=2x = 2.

Show worked solution

(a) Match the relation to the straight-line form. Writing y=ax2+by = ax^{2} + b beside Y=mX+cY = mX + c shows that the vertical axis carries Y=yY = y and the horizontal axis carries X=x2X = x^{2}:

y=ax2+bY=mX+cy = a\,x^{2} + b \quad\Longleftrightarrow\quad Y = mX + c

So the gradient stands for aa and the intercept stands for bb. Read the two numbers straight off the graph:

a=m=4,b=c=3a = m = 4, \qquad b = c = -3

(b) The relation is therefore y=4x23y = 4x^{2} - 3. Substitute x=2x = 2, taking the square before the multiplication:

y=4(2)23=4(4)3=163=13y = 4(2)^{2} - 3 = 4(4) - 3 = 16 - 3 = 13

Answer

a=4a = 4, b=3b = -3, and y=13y = 13 when x=2x = 2. The key move is recognising that plotting yy against x2x^{2}, not against xx, is what turns a curved relation into a straight line.

Q3[4 marks]

The variables xx and yy are related by y=px+qy = \frac{p}{x} + q. A straight-line graph of yy against 1x\frac{1}{x} has gradient 55 and vertical-axis intercept 22.

Find (a) the values of pp and qq, and (b) the value of yy when x=5x = 5.

Show worked solution

(a) Rewrite the relation so the changing quantity is clear: y=p(1x)+qy = p\left(\frac{1}{x}\right) + q. Compared with Y=mX+cY = mX + c, the vertical axis is Y=yY = y and the horizontal axis is X=1xX = \frac{1}{x}:

y=p(1x)+qY=mX+cy = p\left(\frac{1}{x}\right) + q \quad\Longleftrightarrow\quad Y = mX + c

The gradient is pp and the intercept is qq, so read them off directly:

p=5,q=2p = 5, \qquad q = 2

(b) The relation is y=5x+2y = \frac{5}{x} + 2. Substitute x=5x = 5:

y=55+2=1+2=3y = \frac{5}{5} + 2 = 1 + 2 = 3

Answer

p=5p = 5, q=2q = 2, and y=3y = 3 when x=5x = 5. Plotting against 1x\frac{1}{x} rather than xx is what makes the graph straight here.

Q4[4 marks]

A line of best fit for the graph of yy against xx passes through the points (1,4)(1, 4) and (5,12)(5, 12). Use the line to estimate (a) the value of yy when x=3x = 3, and (b) the value of xx when y=20y = 20.

Show worked solution

First find the equation of the line. The gradient comes from the two points:

m=12451=84=2m = \frac{12 - 4}{5 - 1} = \frac{8}{4} = 2

Substitute m=2m = 2 and the point (1,4)(1, 4) into y=mx+cy = mx + c to find the intercept:

4=2(1)+c    c=2    y=2x+24 = 2(1) + c \;\Rightarrow\; c = 2 \;\Rightarrow\; y = 2x + 2

(a) To estimate yy when x=3x = 3, substitute x=3x = 3 into the equation:

y=2(3)+2=8y = 2(3) + 2 = 8

(b) To estimate xx when y=20y = 20, set y=20y = 20 and solve for xx:

20=2x+2    2x=18    x=920 = 2x + 2 \;\Rightarrow\; 2x = 18 \;\Rightarrow\; x = 9

Answer

When x=3x = 3, y=8y = 8; when y=20y = 20, x=9x = 9. Reading values off the equation of the line of best fit is often quicker and steadier than measuring on the graph paper itself.

Q5[3 marks]

The variables xx and yy are related by y=axny = ax^{n}, where aa and nn are constants. When lgy\lg y is plotted against lgx\lg x, a straight line with gradient 22 and vertical-axis intercept 11 is obtained.

Find the values of aa and nn.

Show worked solution

Take lg\lg of both sides of y=axny = ax^{n} and compare the result with Y=mX+cY = mX + c:

lgy=nlgx+lgaY=mX+c\lg y = n\lg x + \lg a \quad\Longleftrightarrow\quad Y = mX + c

So the horizontal axis carries X=lgxX = \lg x and the vertical axis carries Y=lgyY = \lg y; the gradient stands for nn and the intercept stands for lga\lg a. Read the two values straight off the graph:

n=2,lga=1    a=101=10n = 2, \qquad \lg a = 1 \;\Rightarrow\; a = 10^{1} = 10

Answer

n=2n = 2 and a=10a = 10, so y=10x2y = 10x^{2}. Check: at x=10x = 10, lgx=1\lg x = 1, so lgy\lg y should be 2(1)+1=32(1) + 1 = 3, and indeed y=10(10)2=1000y = 10(10)^{2} = 1000, where lg1000=3\lg 1000 = 3.

Q6[3 marks]

The variables xx and yy are related by y=abxy = ab^{x}, where aa and bb are constants. When lgy\lg y is plotted against xx, a straight line with gradient 1-1 and vertical-axis intercept 22 is obtained.

Find the values of aa and bb.

Show worked solution

Take lg\lg of both sides of y=abxy = ab^{x} and compare with Y=mX+cY = mX + c:

lgy=(lgb)x+lgaY=mX+c\lg y = (\lg b)x + \lg a \quad\Longleftrightarrow\quad Y = mX + c

Here the horizontal axis is simply X=xX = x; the gradient stands for lgb\lg b and the intercept stands for lga\lg a. Convert each back using powers of 1010:

lgb=1    b=101=110,lga=2    a=102=100\lg b = -1 \;\Rightarrow\; b = 10^{-1} = \frac{1}{10}, \qquad \lg a = 2 \;\Rightarrow\; a = 10^{2} = 100

Answer

a=100a = 100 and b=110b = \frac{1}{10}, so y=100(110)xy = 100\left(\frac{1}{10}\right)^{x}. Check at x=0x = 0: y=100y = 100, and lg100=2\lg 100 = 2, matching the given intercept exactly.

Q7[3 marks]

The variables xx and yy are related by xy=px+qxy = px + q, where pp and qq are constants. When the equation is rearranged and a graph of yy against 1x\frac{1}{x} is plotted, a straight line with gradient 66 and vertical-axis intercept 22 is obtained.

Find the values of pp and qq.

Show worked solution

Divide both sides of xy=px+qxy = px + q by xx so that yy stands alone on the left:

xy=px+q    y=p+q(1x)xy = px + q \;\Longrightarrow\; y = p + q\left(\frac{1}{x}\right)

Compare this with Y=mX+cY = mX + c: the vertical axis is Y=yY = y and the horizontal axis is X=1xX = \frac{1}{x}, so the gradient stands for qq and the intercept stands for pp:

q=6,p=2q = 6, \qquad p = 2

Answer

p=2p = 2 and q=6q = 6, so xy=2x+6xy = 2x + 6. Check: dividing back by xx gives y=2+6xy = 2 + \frac{6}{x}, a gradient of 66 and an intercept of 22 exactly as given.

Q8[3 marks]

The variables xx and yy are related by y=ax2+bxy = ax^{2} + bx, where aa and bb are constants. When yx\frac{y}{x} is plotted against xx, a straight line with gradient 33 and vertical-axis intercept 2-2 is obtained.

Find the values of aa and bb.

Show worked solution

Divide both sides of y=ax2+bxy = ax^{2} + bx by xx to isolate a single power of xx on the right:

y=ax2+bx    yx=ax+by = ax^{2} + bx \;\Longrightarrow\; \frac{y}{x} = ax + b

Compare with Y=mX+cY = mX + c: the vertical axis is Y=yxY = \frac{y}{x} and the horizontal axis is X=xX = x, so the gradient stands for aa and the intercept stands for bb:

a=3,b=2a = 3, \qquad b = -2

Answer

a=3a = 3 and b=2b = -2, so y=3x22xy = 3x^{2} - 2x. Check at x=1x = 1: yx=3(1)2=1\frac{y}{x} = 3(1) - 2 = 1, and directly, y=3(1)22(1)=1y = 3(1)^{2} - 2(1) = 1, so yx=1\frac{y}{x} = 1 too.

Notice the single habit underneath all four: compare the given relation with Y=mX+cY = mX + c, decide exactly what belongs on each axis, and only then read or use the gradient and intercept. Once that comparison is second nature, Linear Law becomes one of the most dependable sources of marks in Add Math.

Key method points

These four examples rehearse the everyday skills that open almost every Linear Law question in Add Math. Keep the following points in mind as you practise more.

  • Always compare the given relation with Y=mX+cY = mX + c first, and write down clearly what YY and XX each stand for.
  • The gradient of the straight line equals the coefficient attached to XX; the vertical-axis intercept equals the constant term.
  • To find a gradient from two points, use m=Y2Y1X2X1m = \frac{Y_{2} - Y_{1}}{X_{2} - X_{1}}, then substitute one point to find the intercept.
  • For y=ax2+by = ax^{2} + b plot yy against x2x^{2}; for y=px+qy = \frac{p}{x} + q plot yy against 1x\frac{1}{x}.
  • Once you know the equation of the line, estimate a value by substituting into it rather than measuring on the grid.
  • Because marking is analytic, a correct comparison and substitution can still earn method marks even if the final arithmetic slips.

How a teacher helps

When a student loses a mark here, it is almost always one fixable habit, plotting against xx instead of x2x^{2}, or mixing up which axis carries the gradient. In a one-to-one lesson our teacher watches the exact line where the slip happens and corrects it on the spot, before it settles into a routine.

Because our teachers are experienced, you work with someone who explains the why behind each step, not just the what. Lessons are taught in English, while SPM papers are set in both Malay and English, so we make sure the notation reads the same to you either way.

Get 1-to-1 help.

Book a Trial Class

Frequently asked questions

How do I know which quantities to plot on the two axes?

Compare the relation with Y=mX+cY = mX + c. The quantity that changes in a straight-line pattern becomes the horizontal XX, and the quantity read against it becomes the vertical YY.

For y=ax2+by = ax^{2}+b, that means Y=yY = y and X=x2X = x^{2}.

What do the gradient and the intercept tell me?

The gradient equals the coefficient attached to XX, and the vertical-axis intercept equals the constant term. Reading these two numbers off the straight line is usually all you need to find the unknown constants.

How do I find the equation of a line of best fit from two points?

Find the gradient with m=Y2Y1X2X1m = \frac{Y_{2} - Y_{1}}{X_{2} - X_{1}}, then substitute one of the points into Y=mX+cY = mX + c to solve for cc. Always check your equation against the other point.

Should I read values from the graph or from the equation?

Once you have the equation, substitute into it, that is faster and less error-prone than measuring on the grid. Use the graph mainly to draw the line and to sanity-check your answer.

Source:SRC-DSKP-EN

Written by the spmaddmath.com.my editorial team.· Last updated 5 September 2026

Ready to get started?

Book a Trial Classfrom RM50/hr · One-hour paid trial · Same-day reply
Book a Trial ClassOne-hour paid trial · Same-day reply