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

Key Takeaways

  • The Euclidean distance between $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$ is $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$, and the midpoint is $M\left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right)$.
  • Non-vertical lines possess slope $m = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}$; two non-vertical lines are parallel if and only if $m_1 = m_2$, and perpendicular if and only if $m_1 \cdot m_2 = -1$.
  • The general linear equation $ax + by + c = 0$ represents a straight line in $\mathbb{R}^2$ with slope $m = -\frac{a}{b}$ (for $b \neq 0$); vertical lines have equation $x = k$ (slope undefined) and horizontal lines have $y = k$ (slope $0$).
  • The perpendicular distance from point $(x_0, y_0)$ to line $ax + by + c = 0$ is given by the exact formula $d = \frac{|a x_0 + b y_0 + c|}{\sqrt{a^2 + b^2}}$.
  • The area of any polygon defined by ordered Cartesian vertices $(x_1, y_1), \dots, (x_n, y_n)$ is evaluated through the Shoelace Formula: $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 $\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 $\mathbb{R}^2$, Distances & Midpoints

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

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

Euclidean Distance Formula

For any two points $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the straight-line distance $d(P_1, P_2)$ is derived directly from the Pythagorean theorem applied to the horizontal displacement $\Delta x = x_2 - x_1$ and vertical displacement $\Delta y = y_2 - y_1$:

d=(x2x1)2+(y2y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Midpoint and Section Formulas

  • Midpoint $M$: The point equidistant from $P_1$ and $P_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 $P$ dividing segment $P_1P_2$ in the ratio $k_1 : k_2$ (such that $\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 $m$ measures the rate of vertical change with respect to horizontal change along a non-vertical straight line:

m=ΔyΔx=y2y1x2x1m = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}

Geometric Interpretation

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

Collinearity Criterion

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

mAB=mBC    yByAxBxA=yCyBxCxBm_{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-Intercept$y = mx + q$$m = \text{slope}, \quad q = y\text{-intercept } (0, q)$Instant reading of slope and vertical shift
Point-Slope$y - y_0 = m(x - x_0)$Passes through $(x_0, y_0)$ with slope $m$Constructing line from a point and direction
Two-Point$\frac{y - y_1}{y_2 - y_1} = \frac{x - x_1}{x_2 - x_1}$Line through $(x_1, y_1)$ and $(x_2, y_2)$Writing equation directly from two points
Intercept Form$\frac{x}{p} + \frac{y}{q} = 1$$x$-intercept $(p, 0)$, $y$-intercept $(0, q)$Fast computation of triangle area with axes: $A = \frac{1}{2}|pq|$
General Cartesian$ax + by + c = 0$$a, b$ not both 0; $m = -\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 = 0$, solve for $y$: $by = -ax - c \implies y = -\frac{a}{b}x - \frac{c}{b}$. The slope is always $m = -\frac{a}{b}$ (provided $b \neq 0$).


4. Parallel and Perpendicular Lines

Let two lines $r_1$ and $r_2$ have slopes $m_1$ and $m_2$, or general forms $a_1x + b_1y + c_1 = 0$ and $a_2x + b_2y + c_2 = 0$:

Parallel Lines Condition ($r_1 \parallel r_2$)

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

m1=m2    a1b1=a2b2    a1b2a2b1=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 ($\frac{a_1}{a_2} = \frac{b_1}{b_2} = \frac{c_1}{c_2}$), the lines are coincident (identical).
  • If $\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 ($r_1 \perp r_2$)

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

m1m2=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 $AB$ is the straight line that:

  1. Passes through the midpoint $M = \left(\frac{x_A + x_B}{2}, \frac{y_A + y_B}{2}\right)$.
  2. Has slope $m_{\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 = a_1 b_2 - a_2 b_1$)

  • Unique Solution ($D \neq 0$): The lines intersect at exactly one point (secant lines): x=b1c2b2c1a1b2a2b1,y=c1a2c2a1a1b2a2b1x = \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 = 0$ and $a_1 c_2 - a_2 c_1 \neq 0$): Distinct parallel lines.
  • Infinitely Many Solutions ($D = 0$ and $a_1 c_2 - a_2 c_1 = 0$): Coincident lines.

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

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

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

d(P,r)=ax0+by0+ca2+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 = 0$. If given $y = 3x - 5$, rewrite as $3x - y - 5 = 0$ ($a = 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 $a$ and $b$: 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)=c1c2a2+b2d(r_1, r_2) = \frac{|c_1 - c_2|}{\sqrt{a^2 + b^2}}


7. Area of Polygons in $\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 $n$ vertices ordered counterclockwise $(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(x_A, y_A), B(x_B, y_B), C(x_C, y_C)$:

A=12xA(yByC)+xB(yCyA)+xC(yAyB)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)$ and the other two are $A(x_1, y_1)$ and $B(x_2, y_2)$:

A=12x1y2x2y1A = \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 $AB$ connecting $A(2, -1)$ and $B(6, 7)$.

  1. Find midpoint $M$: 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 $AB$: mAB=7(1)62=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)$: y3=12(x4)    y3=12x+2    y=12x+5[or x+2y10=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 $r_1: 4x - 3y + 12 = 0$ and $r_2: 4x - 3y - 18 = 0$.

  1. Confirm lines are parallel: both share $a = 4, b = -3$.
  2. Apply the parallel distance formula with $c_1 = 12$ and $c_2 = -18$: d=12(18)42+(3)2=3016+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)$.

  1. Apply the formula $A = \frac{1}{2} |x_A(y_B - y_C) + x_B(y_C - y_A) + x_C(y_A - y_B)|$: A=121(68)+5(82)+3(26)A = \frac{1}{2} |1(6 - 8) + 5(8 - 2) + 3(2 - 6)|
  2. Evaluate arithmetic: A=121(2)+5(6)+3(4)=122+3012=1216=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 $8$ 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
B
C
D
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
B
C
D
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
B
C
D