Mathematics

Lines in the Plane

All forms of linear equations, relative positions, angle calculation, parallel/perpendicular lines, and metric problems (distance, perpendicular bisector, angle bisector).

The equation of a line can be determined from a point P(x0,y0)P(x_0, y_0) and a direction vector v(vx,vy)\vec{v}(v_x, v_y), or by knowing two points P(x0,y0)P(x_0, y_0) and Q(x1,y1)Q(x_1, y_1) and finding the vector between them.
Finding a line from a point and a vector, or from two points
Guided Example: With P(3,4)P(3,4) and Q(2,2)Q(2,2) we get v=QP=(1,2)\vec{v} = \vec{QP} = (1, 2)

1. Vector Equation:
(x,y)=λ(vx,vy)+(x0,y0)(x,y) = \lambda(v_x, v_y) + (x_0, y_0)
(x,y)=λ(1,2)+(3,4)\color{#2563eb} (x,y) = \lambda(1,2) + (3,4)

2. Parametric Equations: obtained by breaking down the vector equation into its X and Y components.
{x=λvx+x0y=λvy+y0\begin{cases} x = \lambda \cdot v_x + x_0 \\ y = \lambda \cdot v_y + y_0 \end{cases}
{x=λ+3y=2λ+4\color{#2563eb} \begin{cases} x = \lambda + 3 \\ y = 2\lambda + 4 \end{cases}

3. Symmetric Equations: (or continuous form). Solve for λ\lambda in both parametric equations and set them equal.
xx0vx=yy0vy\frac{x - x_0}{v_x} = \frac{y - y_0}{v_y}
x31=y42\color{#2563eb} \frac{x - 3}{1} = \frac{y - 4}{2}

4. Point-Slope Form: move the denominator vxv_x to the other side to get the slope m=vyvxm = \frac{v_y}{v_x}.
yy0=m(xx0)y - y_0 = m(x - x_0)
y4=2(x3)\color{#2563eb} y - 4 = 2(x - 3)

5. Slope-Intercept Form: solve for yy in the point-slope equation. Where n=y0mx0n = y_0 - m x_0 is the y-intercept.
y=mx+ny = mx + n
y=2x2\color{#2563eb} y = 2x - 2

6. General or Standard Form: eliminate denominators and rearrange. With slope m=ABm = -\frac{A}{B} and direction vector v=(B,A)\vec{v}=(-B, A). The normal vector n=(A,B)\vec{n}=(A, B) is perpendicular to the line.
Ax+By+C=0Ax + By + C = 0
2xy2=0\color{#2563eb} 2x - y - 2 = 0

7. Intercept Form: obtained using the x-intercept, aa, and the y-intercept, bb. In our example, the intercepts are a=1,b=2a=1, b=-2.
xa+yb=1\frac{x}{a} + \frac{y}{b} = 1
x1+y2=1\color{#2563eb} \frac{x}{1} + \frac{y}{-2} = 1
Graphical representation of the line and its intercepts a and b with the Cartesian axes
Given a system of two lines in general form Ax+By+C=0Ax + By + C = 0 and Ax+By+C=0A'x + B'y + C' = 0, we can determine their position based on the ratio of their coefficients:
  • Coincident lines (Infinite solutions):

    AA=BB=CC\frac{A}{A'} = \frac{B}{B'} = \frac{C}{C'}
Two lines that exactly overlap (coincident)
  • Parallel lines (No solution):

    AA=BBCC\frac{A}{A'} = \frac{B}{B'} \neq \frac{C}{C'}
Two parallel lines that never intersect
  • Intersecting lines (1 solution):

    AABB\frac{A}{A'} \neq \frac{B}{B'}
Two lines intersecting at a single point (secant)

Angle between two lines given their slopes m1m_1 and m2m_2:
tanα=m1m21+m1m2\tan \alpha = \left| \frac{m_1 - m_2}{1 + m_1 \cdot m_2} \right|
Summary of how to construct a line that is parallel or perpendicular to a given line, depending on its equation type:
Original lineParallelPerpendicular
y=mx+ny = mx + ny=mx+ny = mx + n'y=1mx+ny = -\frac{1}{m}x + n'
Ax+By+C=0Ax + By + C = 0Ax+By+C=0Ax + By + C' = 0BxAy+C=0Bx - Ay + C' = 0
Distance from a Point to a Line
The distance from a point P(x0,y0)P(x_0, y_0) to a line rAx+By+C=0r \equiv Ax + By + C = 0 is:
d(P,r)=Ax0+By0+CA2+B2d(P, r) = \frac{|A x_0 + B y_0 + C|}{\sqrt{A^2 + B^2}}

Closest Point on a Line
Given a line rr with direction vector v\vec{v} and an exterior point P(x0,y0)P(x_0, y_0), the point Q(x,y)Q(x, y) on the line that is closest to PP makes the vector PQ\vec{PQ} perpendicular to the line. Its dot product with the direction vector is zero:
PQv=0\vec{PQ} \cdot \vec{v} = 0
Point Q on line r marking the shortest distance (perpendicular) to exterior point P

Symmetric Point with Respect to a Line (Reflection)
To find the reflection PP' of point PP across line rr:
  • First, find the closest point QQ on line rr from point PP.
  • Then, find the symmetric point PP' of PP with respect to QQ.
Symmetric point P prime across line r, passing through center point Q

Perpendicular Bisector of a Segment
Given a line segment ABAB, the perpendicular bisector is the line that is perpendicular to the segment at its midpoint:
  • Find the midpoint MM of the segment.
  • Find the line with a direction vector perpendicular to AB\vec{AB} that passes through MM.

Angle Bisector of Two Lines
It is the locus of points P(x,y)P(x,y) that are equidistant from two intersecting lines rr and ss, such that d(P,r)=d(P,s)d(P, r) = d(P, s):
A1x+B1y+C1A12+B12=A2x+B2y+C2A22+B22\frac{|A_1 x + B_1 y + C_1|}{\sqrt{A_1^2 + B_1^2}} = \frac{|A_2 x + B_2 y + C_2|}{\sqrt{A_2^2 + B_2^2}}
(Note: By splitting the absolute value with ±\pm, you obtain the two angle bisector lines, which are perpendicular to each other).
Two angle bisectors dividing the angles formed by original lines r and s