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 boundary | Example |
|---|---|---|
| 1 | A single point | |
| 2 | A straight line | |
| 3 | A 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:
- Combine multiple perceptrons into layers (each drawing its own linear boundary)
- 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.
Related
- perceptron — the model that produces a linear decision boundary
- dot-product — computes the signed distance from a point to the boundary
Active Recall
How does the bias affect the position of the decision boundary, and what happens when ?
The bias shifts the hyperplane along by a distance from the origin. When , the hyperplane passes through the origin. A negative pushes the boundary in the direction of ; a positive pushes it against .
A perceptron in 3D input space has its decision boundary described by . What is the dimensionality of this boundary, and why?
The boundary is a 2-dimensional plane embedded in 3D space. In general, a hyperplane in -dimensional space has dimensions — it “uses up” one dimension to divide the space into two halves.
Why can't the XOR problem be solved by a single perceptron, and what is the minimum number of perceptrons needed?
XOR has positive points at and , negative at and . These sit at opposite corners, so no single straight line can separate them. You need at least 3 perceptrons: two in a first layer (each drawing a different line) and one in a second layer combining their outputs. This is the simplest multi-layer perceptron.
Given and , describe the decision boundary. On which side does the point fall?
The boundary is , i.e. the horizontal line . For : , so the point falls on the side (below the line).