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
2.0 x₁ + 2.0 x₂ + (-3.0) = 0
||w||
2.83
Distance
1.06
Angle
45.0°
Point w · x + b Class
(0, 0)
(0, 1)
(1, 0)
(1, 1)