The surface in input space that separates one predicted class from another — for a perceptron, this is always a hyperplane.

Definition

A decision boundary is the set of all points where a classifier’s output changes from one class to another. For a perceptron, the decision boundary is defined by:

This equation describes a hyperplane — a flat surface that divides input space into two half-spaces.

Hyperplanes across dimensions

Input dimension Decision boundaryExample
1A single point
2A straight line
3A flat plane
A -dimensional hyperplane

The math is identical in every dimension — only the geometric visualisation changes.

What the parameters control

The weight vector and bias fully determine the boundary:

Orientation. The hyperplane is always perpendicular to . Changing tilts or rotates the boundary. In the 2D analogy , plays the role of the slope .

Position. The bias shifts the hyperplane along the direction of . Specifically, the boundary sits at a perpendicular distance of from the origin. In the 2D analogy, plays the role of the intercept .

  • : the hyperplane passes through the origin
  • : the hyperplane shifts in the direction of
  • : the hyperplane shifts against the direction of

To verify the sign of geometrically: check the origin . Evaluating . If , the origin is on the side; if , the origin is on the side.

Linear separability

A dataset is linearly separable if there exists some hyperplane that perfectly separates the two classes — all positive points on one side, all negative points on the other. A single perceptron can only solve linearly separable problems.

Many real-world problems are not linearly separable. The classic example is XOR: four points at where diagonally opposite corners share the same label. No single line can separate them.

To handle non-linearly separable data, we need to:

  1. Combine multiple perceptrons into layers (each drawing its own linear boundary)
  2. Stack the layers so that a final perceptron classifies based on the intermediate outputs

This gives rise to multi-layer perceptrons (MLPs), covered in week 3. The XOR problem, for instance, can be solved with just 3 perceptrons: two in a first layer and one combining their outputs.

  • perceptron — the model that produces a linear decision boundary
  • dot-product — computes the signed distance from a point to the boundary

Active Recall