PracticeVideosBlogFlashcards

4.2 Analytic Geometry: Lines, Slopes & Distances in the Cartesian Plane

Key Takeaways

  • The Euclidean distance between P1(x1,y1)P_1(x_1, y_1) and P2(x2,y2)P_2(x_2, y_2) is d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}, and the midpoint is M(x1+x22,y1+y22)M\left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right).

  • Non-vertical lines possess slope m=ΔyΔx=y2−y1x2−x1m = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}; two non-vertical lines are parallel if and only if m1=m2m_1 = m_2, and perpendicular if and only if m1⋅m2=−1m_1 \cdot m_2 = -1.

  • The general linear equation ax+by+c=0ax + by + c = 0 represents a straight line in R2\mathbb{R}^2 with slope m=−abm = -\frac{a}{b} (for b≠0b \neq 0); vertical lines have equation x=kx = k (slope undefined) and horizontal lines have y=ky = k (slope 00).

  • The perpendicular distance from point (x0,y0)(x_0, y_0) to line ax+by+c=0ax + by + c = 0 is given by the exact formula d=∣ax0+by0+c∣a2+b2d = \frac{|a x_0 + b y_0 + c|}{\sqrt{a^2 + b^2}}.

  • The area of any polygon defined by ordered Cartesian vertices (x1,y1),…,(xn,yn)(x_1, y_1), \dots, (x_n, y_n) is evaluated through the Shoelace Formula: A=12∣∑i=1n(xiyi+1−xi+1yi)∣A = \frac{1}{2} |\sum_{i=1}^n (x_i y_{i+1} - x_{i+1} y_i)|.

Last updated: September 2026

4.2 Analytic Geometry: Lines, Slopes & Distances in the Cartesian Plane

Analytic geometry links algebraic equations with geometric configurations in the Cartesian coordinate plane R2\mathbb{R}^2. On the Bocconi Admission Test, linear coordinate geometry questions test your ability to convert between line forms, determine parallel and perpendicular relationships, solve linear systems representing geometric intersections, and evaluate distances and polygon areas rapidly without visual sketching.


1. The Cartesian Coordinate Plane R2\mathbb{R}^2, Distances & Midpoints

The plane R2\mathbb{R}^2 is spanned by two perpendicular real number lines: the horizontal xx-axis (abscissa) and the vertical yy-axis (ordinate), intersecting at the origin O(0,0)O(0, 0) and dividing the plane into four quadrants:

  • Quadrant I: x>0,y>0x > 0, y > 0
  • Quadrant II: x<0,y>0x < 0, y > 0
  • Quadrant III: x<0,y<0x < 0, y < 0
  • Quadrant IV: x>0,y<0x > 0, y < 0

Euclidean Distance Formula

For any 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(P1,P2)d(P_1, P_2) is derived directly from the Pythagorean theorem applied to the horizontal displacement Δx=x2−x1\Delta x = x_2 - x_1 and vertical displacement Δy=y2−y1\Delta y = y_2 - y_1:

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

Midpoint and Section Formulas

  • Midpoint MM: The point equidistant from P1P_1 and P2P_2 along the connecting segment is the arithmetic average of their coordinates: M=(x1+x22,y1+y22)M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right)
  • Internal Division (Section Formula): A point PP dividing segment P1P2P_1P_2 in the ratio k1:k2k_1 : k_2 (such that P1PPP2=k1k2\frac{P_1P}{PP_2} = \frac{k_1}{k_2}) has coordinates: P=(k2x1+k1x2k1+k2,k2y1+k1y2k1+k2)P = \left(\frac{k_2 x_1 + k_1 x_2}{k_1 + k_2}, \frac{k_2 y_1 + k_1 y_2}{k_1 + k_2}\right)

2. Slope of a Line and Inclination Angle

The slope mm measures the rate of vertical change with respect to horizontal change along a non-vertical straight line:

m=ΔyΔx=y2−y1x2−x1m = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}

Geometric Interpretation

  • If θ∈[0,π)∖{π2}\theta \in [0, \pi) \setminus \{\frac{\pi}{2}\} is the angle of inclination made by the line with the positive xx-axis, then: m=tan⁡(θ)m = \tan(\theta)
  • Positive Slope (m>0m > 0): Acute inclination (0<θ<90∘0 < \theta < 90^\circ), line rises from left to right.
  • Negative Slope (m<0m < 0): Obtuse inclination (90∘<θ<180∘90^\circ < \theta < 180^\circ), line falls from left to right.
  • Zero Slope (m=0m = 0): Horizontal line (θ=0\theta = 0), equation y=ky = k.
  • Undefined Slope (m=±∞m = \pm \infty): Vertical line (θ=90∘\theta = 90^\circ), equation x=kx = k.

Collinearity Criterion

Three distinct points A,B,CA, B, C lie on the same straight line if and only if the slope between any two pairs is identical:

mAB=mBC  ⟺  yB−yAxB−xA=yC−yBxC−xBm_{AB} = m_{BC} \iff \frac{y_B - y_A}{x_B - x_A} = \frac{y_C - y_B}{x_C - x_B}

3. Algebraic Forms of Linear Equations

Depending on the given constraints, a line can be expressed in several standard forms:

Equation FormAlgebraic ExpressionParameters & InterceptsPrimary Bocconi Use Case
Slope-Intercepty=mx+qy = mx + qm=slope,q=y-intercept (0,q)m = \text{slope}, \quad q = y\text{-intercept } (0, q)Instant reading of slope and vertical shift
Point-Slopey−y0=m(x−x0)y - y_0 = m(x - x_0)Passes through (x0,y0)(x_0, y_0) with slope mmConstructing line from a point and direction
Two-Pointy−y1y2−y1=x−x1x2−x1\frac{y - y_1}{y_2 - y_1} = \frac{x - x_1}{x_2 - x_1}Line through (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2)Writing equation directly from two points
Intercept Formxp+yq=1\frac{x}{p} + \frac{y}{q} = 1xx-intercept (p,0)(p, 0), yy-intercept (0,q)(0, q)Fast computation of triangle area with axes: A=12∣pq∣A = \frac{1}{2}\vert pq\vert
General Cartesianax+by+c=0ax + by + c = 0a,ba, b not both 0; m=−ab, q=−cbm = -\frac{a}{b}, \, q = -\frac{c}{b}Distance formulas and 2x2 intersection systems

Conversion Shortcut: To find the slope of a general line ax+by+c=0ax + by + c = 0, solve for yy: by=−ax−c  ⟹  y=−abx−cbby = -ax - c \implies y = -\frac{a}{b}x - \frac{c}{b}. The slope is always m=−abm = -\frac{a}{b} (provided b≠0b \neq 0).


4. Parallel and Perpendicular Lines

Let two lines r1r_1 and r2r_2 have slopes m1m_1 and m2m_2, or general forms a1x+b1y+c1=0a_1x + b_1y + c_1 = 0 and a2x+b2y+c2=0a_2x + b_2y + c_2 = 0:

Parallel Lines Condition (r1∥r2r_1 \parallel r_2)

Two non-vertical lines are parallel if and only if their slopes are equal:

m1=m2  ⟺  −a1b1=−a2b2  ⟺  a1b2−a2b1=0m_1 = m_2 \iff -\frac{a_1}{b_1} = -\frac{a_2}{b_2} \iff a_1 b_2 - a_2 b_1 = 0
  • If the constant terms also scale proportionally (a1a2=b1b2=c1c2\frac{a_1}{a_2} = \frac{b_1}{b_2} = \frac{c_1}{c_2}), the lines are coincident (identical).
  • If a1a2=b1b2≠c1c2\frac{a_1}{a_2} = \frac{b_1}{b_2} \neq \frac{c_1}{c_2}, the lines are strictly parallel and distinct (no intersection).

Perpendicular Lines Condition (r1⊥r2r_1 \perp r_2)

Two non-vertical lines are perpendicular (orthogonal) if and only if the product of their slopes is −1-1 (negative reciprocals):

m1⋅m2=−1  ⟺  m2=−1m1m_1 \cdot m_2 = -1 \iff m_2 = -\frac{1}{m_1}

In general Cartesian coefficients, this translates to the dot product of their normal vectors vanishing:

a1a2+b1b2=0a_1 a_2 + b_1 b_2 = 0

The Perpendicular Bisector of a Segment

The perpendicular bisector of segment ABAB is the straight line that:

  1. Passes through the midpoint M=(xA+xB2,yA+yB2)M = \left(\frac{x_A + x_B}{2}, \frac{y_A + y_B}{2}\right).
  2. Has slope m⊥=−1mAB=−xB−xAyB−yAm_{\perp} = -\frac{1}{m_{AB}} = -\frac{x_B - x_A}{y_B - y_A}.

5. Line Intersections & 2x2 Linear Systems

Finding the intersection point of two non-parallel lines corresponds to solving the simultaneous system:

{a1x+b1y+c1=0a2x+b2y+c2=0\begin{cases} a_1 x + b_1 y + c_1 = 0 \\ a_2 x + b_2 y + c_2 = 0 \end{cases}

Classification by Determinant (D=a1b2−a2b1D = a_1 b_2 - a_2 b_1)

  • Unique Solution (D≠0D \neq 0): The lines intersect at exactly one point (secant lines): x=b1c2−b2c1a1b2−a2b1,y=c1a2−c2a1a1b2−a2b1x = \frac{b_1 c_2 - b_2 c_1}{a_1 b_2 - a_2 b_1}, \qquad y = \frac{c_1 a_2 - c_2 a_1}{a_1 b_2 - a_2 b_1}
  • No Solution (D=0D = 0 and a1c2−a2c1≠0a_1 c_2 - a_2 c_1 \neq 0): Distinct parallel lines.
  • Infinitely Many Solutions (D=0D = 0 and a1c2−a2c1=0a_1 c_2 - a_2 c_1 = 0): Coincident lines.

6. Point-to-Line Distance & Distance Between Parallel Lines

Distance from Point (x0,y0)(x_0, y_0) to Line ax+by+c=0ax + by + c = 0

The shortest Euclidean distance from a point P(x0,y0)P(x_0, y_0) to the line r:ax+by+c=0r: ax + by + c = 0 is measured along the perpendicular dropped from PP to rr:

d(P,r)=∣ax0+by0+c∣a2+b2d(P, r) = \frac{|a x_0 + b y_0 + c|}{\sqrt{a^2 + b^2}}

Mandatory Setup Rule: Before using this formula, ensure the line equation is rewritten in implicit form ax+by+c=0ax + by + c = 0. If given y=3x−5y = 3x - 5, rewrite as 3x−y−5=03x - y - 5 = 0 (a=3,b=−1,c=−5a = 3, b = -1, c = -5).

Distance Between Two Parallel Lines

If two lines are parallel, their general equations can be scaled to share identical coefficients aa and bb:

r1:ax+by+c1=0andr2:ax+by+c2=0r_1: ax + by + c_1 = 0 \qquad \text{and} \qquad r_2: ax + by + c_2 = 0

The perpendicular distance separating them everywhere is:

d(r1,r2)=∣c1−c2∣a2+b2d(r_1, r_2) = \frac{|c_1 - c_2|}{\sqrt{a^2 + b^2}}

7. Area of Polygons in R2\mathbb{R}^2: The Shoelace Formula

Calculating the area of a polygon from its vertex coordinates without knowing altitudes is a powerful time-saver on the Bocconi test.

The Shoelace (Gauss) Algorithm

For a polygon with nn vertices ordered counterclockwise (x1,y1),(x2,y2),…,(xn,yn)(x_1, y_1), (x_2, y_2), \dots, (x_n, y_n):

A=12∣(x1y2+x2y3+⋯+xny1)−(y1x2+y2x3+⋯+ynx1)∣A = \frac{1}{2} \left| (x_1 y_2 + x_2 y_3 + \dots + x_n y_1) - (y_1 x_2 + y_2 x_3 + \dots + y_n x_1) \right|

Triangle Area Form

For a triangle with vertices A(xA,yA),B(xB,yB),C(xC,yC)A(x_A, y_A), B(x_B, y_B), C(x_C, y_C):

A=12∣xA(yB−yC)+xB(yC−yA)+xC(yA−yB)∣A = \frac{1}{2} |x_A(y_B - y_C) + x_B(y_C - y_A) + x_C(y_A - y_B)|

Origin Vertex Simplification

If one vertex is at the origin O(0,0)O(0, 0) and the other two are A(x1,y1)A(x_1, y_1) and B(x2,y2)B(x_2, y_2):

A=12∣x1y2−x2y1∣A = \frac{1}{2} |x_1 y_2 - x_2 y_1|

8. Worked Step-by-Step Examples

Example 1: Perpendicular Bisector

Find the equation of the perpendicular bisector of segment ABAB connecting A(2,−1)A(2, -1) and B(6,7)B(6, 7).

  1. Find midpoint MM: M=(2+62,−1+72)=(4,3)M = \left(\frac{2 + 6}{2}, \frac{-1 + 7}{2}\right) = (4, 3)
  2. Find slope of segment ABAB: mAB=7−(−1)6−2=84=2m_{AB} = \frac{7 - (-1)}{6 - 2} = \frac{8}{4} = 2
  3. Determine perpendicular slope: m⊥=−1mAB=−12m_\perp = -\frac{1}{m_{AB}} = -\frac{1}{2}
  4. Write equation using point-slope form through M(4,3)M(4, 3): y−3=−12(x−4)  ⟹  y−3=−12x+2  ⟹  y=−12x+5[or x+2y−10=0]y - 3 = -\frac{1}{2}(x - 4) \implies y - 3 = -\frac{1}{2}x + 2 \implies y = -\frac{1}{2}x + 5 \quad [\text{or } x + 2y - 10 = 0]

Example 2: Distance Between Parallel Lines

Find the distance between the parallel lines r1:4x−3y+12=0r_1: 4x - 3y + 12 = 0 and r2:4x−3y−18=0r_2: 4x - 3y - 18 = 0.

  1. Confirm lines are parallel: both share a=4,b=−3a = 4, b = -3.
  2. Apply the parallel distance formula with c1=12c_1 = 12 and c2=−18c_2 = -18: d=∣12−(−18)∣42+(−3)2=∣30∣16+9=3025=305=6d = \frac{|12 - (-18)|}{\sqrt{4^2 + (-3)^2}} = \frac{|30|}{\sqrt{16 + 9}} = \frac{30}{\sqrt{25}} = \frac{30}{5} = 6

Example 3: Triangle Area via Shoelace Formula

Compute the area of the triangle with vertices A(1,2),B(5,6),C(3,8)A(1, 2), B(5, 6), C(3, 8).

  1. Apply the formula A=12∣xA(yB−yC)+xB(yC−yA)+xC(yA−yB)∣A = \frac{1}{2} |x_A(y_B - y_C) + x_B(y_C - y_A) + x_C(y_A - y_B)|: A=12∣1(6−8)+5(8−2)+3(2−6)∣A = \frac{1}{2} |1(6 - 8) + 5(8 - 2) + 3(2 - 6)|
  2. Evaluate arithmetic: A=12∣1(−2)+5(6)+3(−4)∣=12∣−2+30−12∣=12∣16∣=8A = \frac{1}{2} |1(-2) + 5(6) + 3(-4)| = \frac{1}{2} |-2 + 30 - 12| = \frac{1}{2} |16| = 8 The area is exactly 88 square units.
Loading diagram...
Analytic Geometry: Lines & Distances
Test Your Knowledge

What is the perpendicular distance from the point P(2, -3) to the straight line given by 3x - 4y + 7 = 0?

A

1

B

3

C

4

D

5

Test Your Knowledge

Which of the following is the equation of the perpendicular bisector of the line segment joining points A(-1, 4) and B(3, 2)?

A

y = 2x + 1

B

y = -2x + 5

C

y = (1/2)x + 5/2

D

y = 2x - 1

Test Your Knowledge

What is the area of the triangle with vertices at O(0, 0), A(4, 1), and B(2, 5) in the Cartesian plane?

A

7

B

9

C

11

D

18

Sections you finish are checked off in the contents.