Chapter 4

# Decision Boundary Lab

Explore the geometry of a single perceptron's decision boundary in 2D

A perceptron computes f(x) = step(w · x + b), outputting 1 when the weighted sum exceeds zero and 0 otherwise. The decision boundary is the line w₁x₁ + w₂x₂ + b = 0 that separates the positive region from the negative region. The weight vector w = (w₁, w₂) is always perpendicular to this boundary line, pointing toward the positive half-plane. Adjust the sliders or pick a preset to see how changing weights and bias reshapes the decision region.

### Controls

Degenerate: w = (0, 0) — no boundary to draw
Presets
Weights & Bias
w₁ 2.0
w₂ 2.0
b -3.0
Current Equation
2.0 x₁ + 2.0 x₂ + (-3.0) = 0
Properties
||w||
2.83
Distance
1.06
Angle
45.0°
Classification

Point | w · x + b | Class
--- | --- | ---
(0, 0) |  |
(0, 1) |  |
(1, 0) |  |
(1, 1) |  |