The Perceptron
A Single Neuron
The building block of neural networks
A perceptron is the simplest neural network — just one neuron. It multiplies each input by a fixed weight (×0.6, ×0.4), sums them to get 0.620, then squashes through sigmoid to produce 0.650. The output ≥ 0.5, so the neuron fires — it predicts yes.
Step 1 of 6: A Single Neuron
The building block of neural networks
A perceptron is the simplest neural network — just one neuron. It multiplies each input by a fixed weight (×0.6, ×0.4), sums them to get 0.620, then squashes through sigmoid to produce 0.650. The output ≥ 0.5, so the neuron fires — it predicts yes.
Step 2 of 6: Weights & Bias
How a neuron computes its output
The neuron computes w₁x₁ + w₂x₂ + b = 0.322, then applies the sigmoid function. The bias shifts the activation — without it, the boundary must pass through the origin.
Step 3 of 6: The Step Function
Threshold activation
σ(z) = 0.231 < threshold 0.50 → output is 0 (silent). Not enough signal to fire.
Step 4 of 6: Decision Boundary
Where the neuron says yes or no
The decision boundary is the line where w₁x₁ + w₂x₂ + b = 0. Points on one side output 1, the other side 0. Adjust the weights and bias to classify all points correctly!
Step 5 of 6: Learning Rule
Teaching the perceptron
The perceptron learning rule: for each mistake, nudge the weights — w += α · error · x. Watch the boundary rotate and shift to minimize errors.
Step 6 of 6: Limits of the Perceptron
Why one neuron isn't enough
AND is linearly separable — a single perceptron can learn it perfectly. A straight line is enough to separate the green and red points.