PracticeVideosBlogFlashcards

8.1 Coordinates, Slopes, Straight Line Equations & Distances

Key Takeaways

  • The distance between points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is given by Euclidean metric d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}, while section formula divides segments in ratio m1:m2m_1:m_2 internally at (m1x2+m2x1m1+m2,m1y2+m2y1m1+m2)\left(\frac{m_1 x_2 + m_2 x_1}{m_1+m_2}, \frac{m_1 y_2 + m_2 y_1}{m_1+m_2}\right) and externally with subtraction.

  • Slope m=tan⁡θ=y2−y1x2−x1m = \tan\theta = \frac{y_2-y_1}{x_2-x_1} represents the trigonometric rate of elevation; two non-vertical lines are parallel if and only if m1=m2m_1 = m_2, and perpendicular if and only if m1m2=−1m_1 m_2 = -1.

  • Straight lines take distinct algebraic representations: point-slope y−y1=m(x−x1)y - y_1 = m(x - x_1), slope-intercept y=mx+cy = mx + c, two-intercept xa+yb=1\frac{x}{a} + \frac{y}{b} = 1, normal form xcos⁡α+ysin⁡α=px\cos\alpha + y\sin\alpha = p, and general linear form Ax+By+C=0Ax + By + C = 0.

  • The perpendicular distance from (x0,y0)(x_0, y_0) to line Ax+By+C=0Ax + By + C = 0 is d=∣Ax0+By0+C∣A2+B2d = \frac{|Ax_0 + By_0 + C|}{\sqrt{A^2+B^2}}, and the distance between parallel lines Ax+By+C1=0Ax + By + C_1 = 0 and Ax+By+C2=0Ax + By + C_2 = 0 is d=∣C1−C2∣A2+B2d = \frac{|C_1 - C_2|}{\sqrt{A^2+B^2}}.

  • The homogeneous second-degree equation ax2+2hxy+by2=0ax^2 + 2hxy + by^2 = 0 represents two lines through the origin; the angle between them satisfies tan⁡θ=2h2−aba+b\tan\theta = \frac{2\sqrt{h^2-ab}}{a+b}, with lines being coincident when h2=abh^2 = ab and perpendicular when a+b=0a + b = 0.

Last updated: October 2026

Coordinates, Slopes, Straight Line Equations & Distances

Analytic geometry bridges algebraic formulation and geometric spatial intuition, serving as one of the highest-yield topics in the Intermediate Mathematics syllabus and the University of Engineering and Technology (UET) ECAT. Success on this paper requires students to transcend tedious manual graphing by deploying direct algebraic transformations, parameter identifications, and ratio shortcuts.


1. Cartesian Coordinates, Distance Metric, and Point Division

A point PP in the Cartesian coordinate plane R2\mathbb{R}^2 is specified by an ordered pair of real numbers (x,y)(x, y), where xx denotes the directed distance along the horizontal abscissa and yy denotes the directed distance along the vertical ordinate.

The Euclidean Distance Metric

For two points P1(x1,y1)P_1(x_1, y_1) and P2(x2,y2)P_2(x_2, y_2), the straight-line distance d=∣P1P2∣d = |P_1 P_2| is derived directly from the Pythagorean theorem on the right-angled triangle formed with horizontal leg ∣x2−x1∣|x_2 - x_1| and vertical leg ∣y2−y1∣|y_2 - y_1|:

d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Three points A,B,A, B, and CC are collinear if and only if the sum of the distances between two adjacent pairs equals the distance between the extremal pair (e.g., AB+BC=ACAB + BC = AC), or equivalently, if the area of the triangle formed by them is zero.

The Section Formula

Let P(x,y)P(x, y) divide the line segment joining A(x1,y1)A(x_1, y_1) and B(x2,y2)B(x_2, y_2) in the ratio m1:m2m_1 : m_2:

  1. Internal Division: When PP lies strictly between AA and BB:

P(x,y)=(m1x2+m2x1m1+m2,  m1y2+m2y1m1+m2)P(x, y) = \left( \frac{m_1 x_2 + m_2 x_1}{m_1 + m_2}, \; \frac{m_1 y_2 + m_2 y_1}{m_1 + m_2} \right)

  1. External Division: When PP lies on the line extension beyond AA or BB (m1≠m2m_1 \neq m_2):

P′(x,y)=(m1x2−m2x1m1−m2,  m1y2−m2y1m1−m2)P'(x, y) = \left( \frac{m_1 x_2 - m_2 x_1}{m_1 - m_2}, \; \frac{m_1 y_2 - m_2 y_1}{m_1 - m_2} \right)

  1. Midpoint Formula (m1=m2=1m_1 = m_2 = 1):

M(x,y)=(x1+x22,  y1+y22)M(x, y) = \left( \frac{x_1 + x_2}{2}, \; \frac{y_1 + y_2}{2} \right)

ECAT Ratio Shortcut: If a point P(x,y)P(x, y) divides the segment ABAB in the ratio k:1k : 1, setting k=m1m2k = \frac{m_1}{m_2} yields x=kx2+x1k+1x = \frac{k x_2 + x_1}{k + 1} and y=ky2+y1k+1y = \frac{k y_2 + y_1}{k + 1}. If k>0k > 0, the division is internal; if k<0k < 0, the division is external.

Triangle Centers & Area

  • Centroid (GG): The concurrency point of the three medians of a triangle with vertices (x1,y1),(x2,y2),(x3,y3)(x_1, y_1), (x_2, y_2), (x_3, y_3) divides each median in a 2:12:1 ratio from vertex to midpoint:

G=(x1+x2+x33,  y1+y2+y33)G = \left( \frac{x_1 + x_2 + x_3}{3}, \; \frac{y_1 + y_2 + y_3}{3} \right)

  • Area of a Triangle (Determinant Form): The signed area Δ\Delta of the triangle formed by vertices (x1,y1),(x2,y2),(x3,y3)(x_1, y_1), (x_2, y_2), (x_3, y_3) is:

Δ=12∣∣x1y11x2y21x3y31∣∣=12∣x1(y2−y3)+x2(y3−y1)+x3(y1−y2)∣\Delta = \frac{1}{2} \left| \begin{vmatrix} x_1 & y_1 & 1 \\ x_2 & y_2 & 1 \\ x_3 & y_3 & 1 \end{vmatrix} \right| = \frac{1}{2} \bigl| x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2) \bigr|

Collinearity of three points is verified algebraically if and only if this 3×33 \times 3 determinant equals zero.


2. Inclination, Slope, and Relative Orientations of Lines

The angle of inclination α\alpha of a straight line is the directed angle measured counterclockwise from the positive xx-axis to the line, with domain α∈[0,π)\alpha \in [0, \pi) or 0∘≤α<180∘0^\circ \le \alpha < 180^\circ.

Slope (Gradient) of a Line

The slope mm is the tangent of the inclination angle:

m=tan⁡α=y2−y1x2−x1(x1≠x2)m = \tan\alpha = \frac{y_2 - y_1}{x_2 - x_1} \quad (x_1 \neq x_2)

  • Horizontal lines have α=0∘  ⟹  m=tan⁡0∘=0\alpha = 0^\circ \implies m = \tan 0^\circ = 0.
  • Vertical lines have α=90∘  ⟹  m=tan⁡90∘\alpha = 90^\circ \implies m = \tan 90^\circ is undefined (approaching ±∞\pm\infty).
  • Lines inclined at an acute angle have m>0m > 0; lines inclined at an obtuse angle have m<0m < 0.

Angle Between Two Intersecting Lines

Let two non-vertical lines L1L_1 and L2L_2 have slopes m1m_1 and m2m_2, with inclinations α1\alpha_1 and α2\alpha_2. The acute angle θ\theta between them satisfies:

tan⁡θ=∣m2−m11+m1m2∣(m1m2≠−1)\tan\theta = \left| \frac{m_2 - m_1}{1 + m_1 m_2} \right| \quad (m_1 m_2 \neq -1)

Parallelism and Perpendicularity Criteria

  1. Parallel Lines (L1∥L2L_1 \parallel L_2): Two lines are parallel if and only if their inclinations are equal, meaning their slopes are identical:

m1=m2m_1 = m_2

  1. Perpendicular Lines (L1⊥L2L_1 \perp L_2): Two lines are mutually orthogonal if and only if θ=90∘\theta = 90^\circ, meaning the denominator vanishes:

1+m1m2=0  ⟺  m1m2=−1  ⟺  m2=−1m11 + m_1 m_2 = 0 \iff m_1 m_2 = -1 \iff m_2 = -\frac{1}{m_1}

ECAT Trap Alert: The relation m1m2=−1m_1 m_2 = -1 holds only when neither line is vertical. If one line is vertical (x=kx = k, undefined slope), any perpendicular line is strictly horizontal (y=cy = c, slope m=0m = 0).


3. Standard Algebraic Forms of Straight Lines

Form NameAlgebraic EquationRequired ParametersHigh-Speed ECAT Identification
Slope-Intercepty=mx+cy = mx + cSlope mm, yy-intercept ccImmediate reading of gradient and axis intercept
Point-Slopey−y1=m(x−x1)y - y_1 = m(x - x_1)Slope mm, passing point (x1,y1)(x_1, y_1)Optimal when given one point and parallel/perpendicular slope
Two-Pointy−y1=y2−y1x2−x1(x−x1)y - y_1 = \frac{y_2 - y_1}{x_2 - x_1}(x - x_1)Two distinct points (x1,y1),(x2,y2)(x_1, y_1), (x_2, y_2)Collinear point checking and chord equations
Two-Interceptxa+yb=1\frac{x}{a} + \frac{y}{b} = 1xx-intercept aa, yy-intercept bbQuick computation of axis-intercept triangles (Area =12∣ab∣= \frac{1}{2}\lvert ab \rvert)
Normal (Perpendicular)xcos⁡α+ysin⁡α=px\cos\alpha + y\sin\alpha = pNormal length p≥0p \ge 0, normal angle α\alphaLength of perpendicular from origin and orientation
General LinearAx+By+C=0Ax + By + C = 0Coefficients A,B,CA, B, CSlope m=−ABm = -\frac{A}{B}, intercepts a=−CA,b=−CBa = -\frac{C}{A}, b = -\frac{C}{B}

Conversion of General Form to Normal Form

To transform Ax+By+C=0Ax + By + C = 0 into the normal form xcos⁡α+ysin⁡α=px\cos\alpha + y\sin\alpha = p, rearrange terms so the constant p≥0p \ge 0 appears on the right side: −Ax−By=C-Ax - By = C. Dividing both sides by ±A2+B2\pm\sqrt{A^2 + B^2} yields:

(−A±A2+B2)x+(−B±A2+B2)y=C±A2+B2\left( -\frac{A}{\pm\sqrt{A^2+B^2}} \right)x + \left( -\frac{B}{\pm\sqrt{A^2+B^2}} \right)y = \frac{C}{\pm\sqrt{A^2+B^2}}

To guarantee p>0p > 0, choose the sign of the radical to match the sign of the constant CC, so that p=∣C∣A2+B2p = \frac{|C|}{\sqrt{A^2+B^2}}. Example: 3x−4y+10=03x - 4y + 10 = 0 gives −3x+4y=10-3x + 4y = 10; dividing by +5+5 gives −35x+45y=2-\frac{3}{5}x + \frac{4}{5}y = 2, so p=2p = 2, cos⁡α=−35\cos\alpha = -\frac{3}{5} and sin⁡α=45\sin\alpha = \frac{4}{5}.


4. Perpendicular Distances and Parallel Line Separation

Distance from an Arbitrary Point to a Line

The perpendicular distance dd from a given point P(x0,y0)P(x_0, y_0) to the straight line L≡Ax+By+C=0L \equiv Ax + By + C = 0 is:

d=∣Ax0+By0+C∣A2+B2d = \frac{|A x_0 + B y_0 + C|}{\sqrt{A^2 + B^2}}

For the special case where PP is the origin (0,0)(0, 0):

d0=∣C∣A2+B2d_0 = \frac{|C|}{\sqrt{A^2 + B^2}}

Distance Between Two Parallel Lines

Let two parallel lines be expressed with identical linear coefficients AA and BB:

L1≡Ax+By+C1=0andL2≡Ax+By+C2=0L_1 \equiv Ax + By + C_1 = 0 \quad \text{and} \quad L_2 \equiv Ax + By + C_2 = 0

The perpendicular separation distance dd between them is:

d=∣C1−C2∣A2+B2d = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}}

ECAT Trap Alert: Before applying d=∣C1−C2∣A2+B2d = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}}, normalize both linear equations so the coefficients of xx and yy are completely identical. For example, if given 3x−4y+5=03x - 4y + 5 = 0 and 6x−8y−10=06x - 8y - 10 = 0, divide the second equation by 2 to yield 3x−4y−5=03x - 4y - 5 = 0 before computing d=∣5−(−5)∣32+(−4)2=105=2d = \frac{|5 - (-5)|}{\sqrt{3^2 + (-4)^2}} = \frac{10}{5} = 2.

Relative Positions of Points with Respect to a Line

Two points P(x1,y1)P(x_1, y_1) and Q(x2,y2)Q(x_2, y_2) lie on the same side of Ax+By+C=0Ax + By + C = 0 if (Ax1+By1+C)(Ax_1 + By_1 + C) and (Ax2+By2+C)(Ax_2 + By_2 + C) share the same sign. They lie on opposite sides if these evaluations have opposite algebraic signs.


5. Homogeneous Second-Degree Equation & Pairs of Straight Lines

A second-degree homogeneous algebraic equation in xx and yy has the standard form:

ax2+2hxy+by2=0ax^2 + 2hxy + by^2 = 0

Because every term is quadratic, this equation represents a pair of straight lines passing through the origin (0,0)(0, 0). Dividing by x2x^2 (x≠0x \neq 0) and setting m=yxm = \frac{y}{x} gives:

bm2+2hm+a=0b m^2 + 2h m + a = 0

Let m1m_1 and m2m_2 be the roots of this quadratic equation, corresponding to the slopes of the two lines y=m1xy = m_1 x and y=m2xy = m_2 x. By Vieta's formulas:

m1+m2=−2hb,m1m2=abm_1 + m_2 = -\frac{2h}{b}, \qquad m_1 m_2 = \frac{a}{b}

Angle Between the Pair of Lines

The angle θ\theta between the two lines represented by ax2+2hxy+by2=0ax^2 + 2hxy + by^2 = 0 is:

tan⁡θ=∣m1−m21+m1m2∣=(m1+m2)2−4m1m21+m1m2=(−2hb)2−4(ab)1+ab=2h2−aba+b\tan\theta = \left| \frac{m_1 - m_2}{1 + m_1 m_2} \right| = \frac{\sqrt{(m_1 + m_2)^2 - 4m_1 m_2}}{1 + m_1 m_2} = \frac{\sqrt{\left(-\frac{2h}{b}\right)^2 - 4\left(\frac{a}{b}\right)}}{1 + \frac{a}{b}} = \frac{2\sqrt{h^2 - ab}}{a + b}

Geometric Conditions for the Pair of Lines

  1. Real and Distinct Lines: h2−ab>0h^2 - ab > 0 (h2>abh^2 > ab).
  2. Real and Coincident Lines: h2−ab=0  ⟺  h2=abh^2 - ab = 0 \iff h^2 = ab.
  3. Imaginary Lines (intersecting only at the origin): h2−ab<0h^2 - ab < 0.
  4. Orthogonal (Mutually Perpendicular) Lines: The lines are perpendicular if tan⁡θ→∞\tan\theta \to \infty, which occurs when the denominator equals zero:

a+b=0  ⟺  Coefficient of x2+Coefficient of y2=0a + b = 0 \iff \text{Coefficient of } x^2 + \text{Coefficient of } y^2 = 0

ECAT Speed Trick: To immediately check whether a homogeneous second-degree equation represents perpendicular lines, inspect a+ba + b. If a+b=0a + b = 0 (e.g., 3x2+7xy−3y2=03x^2 + 7xy - 3y^2 = 0), the lines are mutually perpendicular regardless of the value of hh.


6. General Second-Degree Equation Representing Two Lines

The general non-homogeneous second-degree equation:

ax2+2hxy+by2+2gx+2fy+c=0ax^2 + 2hxy + by^2 + 2gx + 2fy + c = 0

represents a pair of coplanar straight lines if and only if the determinant Δ\Delta vanishes:

Δ=∣ahghbfgfc∣=abc+2fgh−af2−bg2−ch2=0\Delta = \begin{vmatrix} a & h & g \\ h & b & f \\ g & f & c \end{vmatrix} = abc + 2fgh - af^2 - bg^2 - ch^2 = 0

If Δ=0\Delta = 0, the angle between these lines is still governed by tan⁡θ=2h2−aba+b\tan\theta = \frac{2\sqrt{h^2 - ab}}{a + b}, and they are mutually perpendicular if a+b=0a + b = 0 and parallel if h2=abh^2 = ab.

Loading diagram...
Straight Line Analytical Decision Tree
Test Your Knowledge

What is the perpendicular distance between the two parallel straight lines 3x−4y+7=03x - 4y + 7 = 0 and 6x−8y−16=06x - 8y - 16 = 0?

A

11

B

22

C

33

D

55

Test Your Knowledge

For what positive value of kk does the homogeneous equation 2x2+kxy+8y2=02x^2 + kxy + 8y^2 = 0 represent two coincident straight lines passing through the origin?

A

44

B

88

C

1212

D

1616

Test Your Knowledge

For what value of λ\lambda are the two straight lines 2x−y+4=02x - y + 4 = 0 and λx+4y−7=0\lambda x + 4y - 7 = 0 mutually perpendicular?

A

22

B

−2-2

C

88

D

−12-\frac{1}{2}

Sections you finish are checked off in the contents.