Equation of a line

Every straight line on a coordinate plane has exactly one algebraic address: an equation of the form y=mx+cy = mx + c. Once you know a line's slope mm and its y-intercept cc, you can write that equation instantly — and once you have the equation, you can predict every point the line passes through, check whether two lines are parallel or meet at a right angle, and settle geometry questions with pure algebra instead of a ruler and protractor. This section builds that bridge: how slope is measured from two points or from an angle, how the point-slope form lets you write a line's equation from a single point, and how the conditions m1=m2m_1 = m_2 and m1m2=−1m_1 m_2 = -1 turn "are these lines parallel or perpendicular" into a one-line calculation. It is Co-ordinate Geometry inside the ICSE Class 10 Algebra unit, and it leans on nothing beyond slope, one algebraic rearrangement, and the distance idea you already know from Class IX.

The core insight

A line is fully described by its slope mm (steepness) and y-intercept cc (where it crosses the y-axis) through y=mx+cy = mx + c, and knowing any point plus the slope — or any two points — is enough to write that equation down.

The core idea

Slope-intercept form. The standard way to write a straight line's equation is

y=mx+cy = mx + c

where: mm is the slope (gradient) of the line and cc is the y-intercept, the value of yy where the line meets the y-axis, i.e. the point (0,c)(0, c).

Slope as an angle. Geometrically, if θ\theta is the angle the line makes with the positive x-axis (measured counter-clockwise), then

m=tan⁡θm = \tan\theta

A horizontal line has θ=0∘\theta = 0^\circ, so m=0m = 0; a line rising steeply has θ\theta close to 90∘90^\circ, so ∣m∣|m| is large. A vertical line has θ=90∘\theta = 90^\circ, where tan⁡θ\tan\theta is undefined — vertical lines cannot be written as y=mx+cy = mx + c at all, and are instead written directly as x=constantx = \text{constant}.

Slope from two points. Given any two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) that lie on the line, the slope is the ratio of rise to run:

m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}

where: the numerator is the change in yy and the denominator is the change in xx, taken between the same two points and in the same order.

Point-slope form. If you know one point (x1,y1)(x_1, y_1) on a line and its slope mm, the equation of the line is

y−y1=m(x−x1)y - y_1 = m(x - x_1)

This single form covers every case you meet in this unit: given a point and a slope, substitute directly; given two points, first find mm from the slope formula, then apply this form using either point.

Parallel and perpendicular conditions. For two lines with slopes m1m_1 and m2m_2: parallel lines satisfy m1=m2m_1 = m_2, and perpendicular lines satisfy m1m2=−1m_1 m_2 = -1. These two short equalities are the algebraic test for a whole family of geometry questions — no protractor needed.

Figure
Two lines on a coordinate grid, one rising gently with a small positive slope and one falling steeply, meeting at a labelled point, with the rise and run marked for the gentle line
Slope is rise over run — steeper line, larger magnitude of m x y gentle line, m small positive run rise steep line, |m| large intersection point
Derivation AThe point-slope form of a line

The goal is to show that a line through a fixed point (x1,y1)(x_1, y_1) with slope mm must satisfy y−y1=m(x−x1)y - y_1 = m(x - x_1), by requiring that any other point (x,y)(x, y) on the same line gives the same slope mm when paired with (x1,y1)(x_1, y_1) — this is the algebraic definition of "lying on the same straight line" and the reasoning applies whether mm comes from an angle or from two known points.

Step 1. Fix the known point (x1,y1)(x_1, y_1) on the line and let (x,y)(x, y) be any other point on the same line. Because both points lie on one straight line, the slope computed between them must equal the line's slope mm — a straight line has one slope everywhere along its length.

Step 2. Apply the slope formula to this pair of points, with (x1,y1)(x_1, y_1) as the first point and (x,y)(x, y) as the second:

m=y−y1x−x1m = \frac{y - y_1}{x - x_1}

Step 3. Clear the denominator by multiplying both sides by (x−x1)(x - x_1), which is valid for every point on the line except (x1,y1)(x_1, y_1) itself:

m(x−x1)=y−y1m(x - x_1) = y - y_1

Step 4. Rewrite this as y−y1=m(x−x1)y - y_1 = m(x - x_1). This equation is satisfied by (x1,y1)(x_1, y_1) itself too (both sides become 00), so it correctly describes every point on the line, including the starting point — confirming it is the full equation, not just an approximation valid nearby.

Worked example

Question: Find the equation of the line passing through the points A(2,3)A(2, 3) and B(−4,9)B(-4, 9), and check whether this line is parallel to the line y=−x+10y = -x + 10.

Step 1. Find the slope using the two given points, treating A(2,3)A(2,3) as (x1,y1)(x_1, y_1) and B(−4,9)B(-4, 9) as (x2,y2)(x_2, y_2):

m=y2−y1x2−x1=9−3−4−2=6−6=−1m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{9 - 3}{-4 - 2} = \frac{6}{-6} = -1

Step 2. Substitute into the point-slope form using point A(2,3)A(2, 3) and m=−1m = -1:

y−3=−1(x−2)y - 3 = -1(x - 2)
y−3=−x+2y - 3 = -x + 2
y=−x+5y = -x + 5

Step 3. Check the answer by substituting B(−4,9)B(-4, 9): y=−(−4)+5=4+5=9y = -(-4) + 5 = 4 + 5 = 9, which matches point BB exactly, confirming the equation is correct.

Step 4. Compare slopes to test for parallelism. The line y=−x+10y = -x + 10 has slope −1-1, and our line y=−x+5y = -x + 5 also has slope −1-1, so m1=m2=−1m_1 = m_2 = -1: the two lines are parallel (they never meet, since they differ only in y-intercept, 55 versus 1010).

The equation of line ABAB is y=−x+5y = -x + 5, and it is parallel to y=−x+10y = -x + 10.

Competitive stretch

Question: Is the line y=−x+5y = -x + 5 found above perpendicular to the line y=x−3y = x - 3?

Step 1. Read off the slopes directly, since both lines are already in y=mx+cy = mx + c form: the first line has m1=−1m_1 = -1 and the line y=x−3y = x - 3 has m2=1m_2 = 1.

Step 2. Test the perpendicular condition by multiplying the slopes: m1m2=(−1)(1)=−1m_1 m_2 = (-1)(1) = -1.

Step 3. Since the product is exactly −1-1, the two lines are perpendicular — they cross at a right angle, regardless of where on the plane that crossing point happens to be.

Common traps

  • Forgetting to rearrange a line given in general form (like 2x−4y+5=02x - 4y + 5 = 0) into y=mx+cy = mx + c before reading off the slope — the coefficient of xx is not the slope directly until you isolate yy.
  • Mixing up the parallel condition (m1=m2m_1 = m_2) with the perpendicular condition (m1m2=−1m_1 m_2 = -1) under exam time pressure.
  • Sign errors when computing a perpendicular slope m2=−1m1m_2 = -\dfrac{1}{m_1}, especially when m1m_1 is itself negative or a fraction.
  • Swapping coordinate order — substituting (x1,y1)(x_1, y_1) as (y1,x1)(y_1, x_1), or mixing which point is "point 1" between the slope formula and the point-slope form.

Ask the tutor: want to practise turning a general-form equation into slope-intercept form, or check your own perpendicular-line answer step by step — ask the AI tutor to work through it with you.

Why does it matter which point I call point 1 in the slope formula?

It does not matter which point you call (x1,y1)(x_1, y_1) as long as you stay consistent — subtract in the same order on top and bottom. If you compute y2−y1x2−x1\dfrac{y_2-y_1}{x_2-x_1} you must not accidentally compute y1−y2x2−x1\dfrac{y_1-y_2}{x_2-x_1}, since that flips the sign of the slope. Pick an order, then use it for both differences; swapping which point is "first" for both the numerator and denominator gives the identical slope either way.

If I already have a line's equation, how do I find a point on it quickly?

Pick any convenient value of xx and substitute it into y=mx+cy = mx + c to get the matching yy. The easiest choice is usually x=0x = 0, which directly gives the y-intercept point (0,c)(0, c); another easy choice is whatever makes y=0y = 0, which gives the x-intercept. Two such points are also enough to plot the whole line on graph paper, since a straight line is fixed by any two of its points.

How is the perpendicular condition m1 times m2 equals -1 actually used in a problem?

It is almost always used to find an unknown slope. If you know one line's slope m1m_1 and need the slope of a line perpendicular to it, rearrange to m2=−1m1m_2 = -\dfrac{1}{m_1} — flip the fraction and change the sign. For example if m1=12m_1 = \dfrac12, then m2=−2m_2 = -2. Once you have m2m_2, plug it into the point-slope form with whatever point the new line must pass through, exactly as in the worked example's parallel check but with the product equal to −1-1 instead of the slopes being equal.

Before this

Where this leads