Skip to content
spmaddmath.com.my
Tuition

Study

SyllabusFormulasMethodsExam & PapersTools
LocationsPricingBlogOur TeachersContact
EN

Chapter · Linear Law

Understanding the linear law and lines of best fit

The whole point of the linear law is to turn an awkward curved relationship into a straight line of the form Y=mX+cY = mX + c. Once the graph is straight, its gradient and its intercept hand you the unknown constants, and the constants are usually what the question is really after.

What the linear law is really doing

Straight lines are the friendliest graphs in all of mathematics. If a set of points lies on a straight line, you can read its gradient and its intercept straight off the axes, and those two numbers tell you everything about the relationship.

Curves give you none of that comfort, you cannot eyeball the equation of a curve.

The linear law is the trick that gets you the comfort back. The idea is to rewrite a curved relationship between xx and yy so that it becomes a straight-line relationship between two new quantities, which we usually call XX and YY.

The target shape is always the same:

Y=mX+cY = mX + c

Here YY and XX are built out of the original xx and yy, they might be logy\log y, or yx\frac{y}{x}, or x2x^{2}, whatever makes the relationship straight. Once you plot YY against XX and get a straight line, its gradient is mm and its vertical intercept is cc.

The job of almost every linear-law question is to identify what YY, XX, mm and cc stand for, and then use the graph to find the constants hidden in the original equation.

Turning a curve into a straight line: the classic cases

Two forms come up again and again, and both are freed by taking logarithms. Suppose the relationship is a power law, y=axny = a x^{n}, where aa and nn are the unknown constants.

Take log\log of both sides and use the log laws:

logy=nlogx+loga\log y = n \log x + \log a

Compare that with Y=mX+cY = mX + c. If you plot logy\log y (as YY) against logx\log x (as XX), you get a straight line whose gradient is nn and whose intercept is loga\log a.

Now the second form, an exponential relationship y=abxy = a b^{x}:

logy=(logb)x+loga\log y = (\log b)\,x + \log a

This time you plot logy\log y against xx itself. The gradient is logb\log b and the intercept is loga\log a.

Notice the difference: in a power law you take the log of both variables, but in an exponential you take the log of yy only. Choosing correctly is the single most important decision in the whole chapter.

Not every form needs logs

Some relationships straighten with simple algebra. For y=ax2+bxy = a x^{2} + b x, divide through by xx to get yx=ax+b\frac{y}{x} = a x + b: plot yx\frac{y}{x} against xx, gradient aa, intercept bb.

Always ask first whether a plain rearrangement will do before reaching for logarithms.

Reading the constants off the graph

Once the straight line is drawn, the constants come from its gradient and intercept. The gradient is found from any two well-separated points that lie on the line, not two of the original data points, which is a distinction that costs marks:

m=Y2Y1X2X1m = \frac{Y_{2} - Y_{1}}{X_{2} - X_{1}}

Suppose you plotted logy\log y against logx\log x for a power law and read a gradient of 22 and a vertical intercept of 0.50.5. Then n=2n = 2 directly, and loga=0.5\log a = 0.5, so a=100.5=103.16a = 10^{0.5} = \sqrt{10} \approx 3.16.

The equation is recovered: y3.16x2y \approx 3.16\,x^{2}.

The last step trips people up more than the first. The intercept is almost never the constant itself, it is usually loga\log a, so you must undo the log to get aa.

Write down what the intercept equals before you write down the constant, and that reversal will not slip through.

The line of best fit, what it is and how to draw it

Real measured data never sits perfectly on a line. The plotted points scatter a little because of experimental error, so you draw a single straight line of best fit that passes as evenly as possible through the cloud of points.

  • Aim for roughly the same number of points above the line as below it.
  • Keep the points close to the line overall, the line should follow the trend, not chase any single point.
  • Do not force the line through the origin unless the physics or the data genuinely says it should pass through (0,0)(0,0).

Because the line of best fit is a judgement, the examiner allows a reasonable range of answers for the gradient and intercept read from it. What is not forgiven is reading a value off a shaky freehand line, or using original data points instead of points that actually sit on the line you drew.

Use a ruler, use a sharp pencil, and take your two reading points far apart so a small error in reading has a small effect on the gradient.

The mistakes that quietly cost marks

Linear-law questions are generous with method marks, but only if your working shows the examiner what each axis stands for and where each number came from.

The intercept is not the constant

If the vertical intercept equals loga\log a, then a=10intercepta = 10^{\text{intercept}}, not the intercept itself. Skipping this reversal is the single most common lost mark in the chapter.

Write "loga=\log a = \ldots" first, then solve for aa.

  • Taking the log of only one variable when both are needed, or of both when only one is, decide power law versus exponential first.
  • Finding the gradient from two of the plotted data points instead of two points read off the best-fit line.
  • Muddling the axes: label clearly which quantity is YY and which is XX before plotting anything.

Why the working matters here

Linear-law work sits comfortably inside Paper 2 (2 hours 30 minutes, 100 marks) as well as Paper 1 (2 hours, 80 marks); there is no Paper 3. Marking is analytic, so identifying Y=mX+cY = mX + c correctly, drawing a fair line, and stating loga=intercept\log a = \text{intercept} are each scorable steps, even if your final constant is slightly off from a reading error.

How one-to-one teaching can help

The linear law rewards a particular kind of clear thinking: knowing which manipulation straightens a given relationship, and keeping careful track of what each axis and each constant means. That is exactly the sort of habit that is hard to build alone and quick to build with someone watching your working.

One-to-one, a teacher can see the precise step where the log goes on the wrong variable or the intercept is read as the constant, and fix it before it becomes a pattern. Our teachers are experienced; lessons are online and taught in English, while the SPM papers are set bilingually in Bahasa Melayu and English.

If graph work is a weak spot, you are welcome to begin with a one-hour paid trial class at the teacher's own rate (from RM50 per hour, depending on experience). We will not promise a grade, but we can help make the linear law one of the calmer, more mechanical parts of your paper.

Get 1-to-1 help.

Book a Trial Class

Frequently asked questions

What is the linear law in one sentence?

It is a way of rewriting a curved relationship between xx and yy as a straight line Y=mX+cY = mX + c, so that its gradient mm and intercept cc reveal the unknown constants in the original equation.

How do I know whether to take logs of one variable or both?

For a power law y=axny = a x^{n} take log\log of both: logy=nlogx+loga\log y = n\log x + \log a. For an exponential y=abxy = a b^{x} take log\log of yy only: logy=(logb)x+loga\log y = (\log b)x + \log a.

Deciding which form you have comes first.

Why is my constant wrong even though my gradient is right?

Usually because the intercept is not the constant itself. If the intercept equals loga\log a, you must compute a=10intercepta = 10^{\text{intercept}}.

Write down what the intercept equals before solving for the constant.

How do I draw a good line of best fit?

Use a ruler and a sharp pencil, aim for roughly equal numbers of points on each side of the line, and let it follow the overall trend rather than any single point. Read your gradient from two points that sit on the line, taken far apart.

Source:SRC-FORMAT

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