>_
EngineeringNotes

Equation of Line

From simple 2D lines to n-dimensional Hyperplanes. This is how we separate data in Machine Learning.

1

The 2D World (School Level)

Slope-Intercept Form

y = mx + c
  • m = slope (how steep?)
  • c = y-intercept (where it hits y-axis)

ML Notation

y = β₀ + β₁x

Standard Regression notation.

General Form

ax + by + c = 0

by = -ax - c ⟹ y = (-a/b)x - (c/b)

y = mx + c
y
x
2

Vector Notation (The Real Deal)

In ML, we don't write huge equations. We pack everything into Vectors.

w = [w₁, w₂] (Weights)
x = [x₁, x₂] (Inputs)
wᵀx + b = 0

This is the Equation of a Straight Line (and Hyperplane) in Vector form.

3

Hyperplanes (3D & Beyond)

x₂x₁x₃wᵀx + b = 0

In 3 Dimensions

w₁x₁ + w₂x₂ + w₃x₃ + b = 0

Represents a flat Plane.

In n Dimensions

wᵀx + b = 0

Represents a Hyperplane.

Special Case: Origin

If the line/plane passes through origin, then b = 0.
wᵀx = 0

4

Geometry & Orthogonality

The Dot Product Rule

w · x = ||w|| ||x|| cosθ
💡
Orthogonality (90°)

If w · x = 0, implies cosθ = 0, so θ = 90°.

"The vector w is perpendicular (normal) to the vector x."

w xθ w xw·x=0