A single neuron is less mysterious when you run the numbers.
That is the reason to start this small. Neural networks get introduced with enough terminology that the first calculation can disappear behind the words. A neuron sounds like a metaphor. A model sounds like a black box. ReLU sounds like something you are supposed to accept before you can use it.
This version is tiny enough to inspect by hand.
There are inputs, weights, and a bias. The neuron multiplies the inputs by the weights, adds the results, adds the bias, and sends the raw value through an activation function. That is enough to draw, run, and debug without guessing.
the raw score is the part worth seeing
Think of the neuron as asking one weighted question about the input.
The example input is:
x = [2, 1, 3]
The neuron uses:
weights = [1, -1, 1]
bias = -5
The raw score is:
z = 2 * 1 + 1 * -1 + 3 * 1 + -5
which gives:
z = -1
Nothing hidden happened there. Each input was scaled by a weight. The bias shifted the total. Z is just the neuron’s raw answer before any activation function changes it.
I like calling it a question because the weights decide what the neuron pays attention to. A positive weight pushes the score up when that input is large. A negative weight pushes it down. A zero weight ignores that input for this neuron.
the sign matters more than the size at first
A weight is not just a number. It has direction.
If the first input increases and its weight is positive, Z goes up. If the second input has a negative weight, increasing that input can push Z down. If an input is zero, changing its weight does nothing for this specific example.
That last case is easy to miss early on. A weight can matter in the model and still have no effect on one input. The interactive module makes that obvious if you change one value at a time instead of nudging the whole table.
If you expected Z to move up and it moved down, the mistake is usually in the sign of the weight or the input you paired it with. That is a useful mistake. It means the arithmetic is still visible enough to fix.
bias moves the threshold
Bias is the easiest part to dismiss as an extra term.
It is not extra. It is the neuron’s baseline shift.
Weights make the output depend on the input. Bias lets the neuron move its threshold without needing every input to cooperate. In this example, the weighted input sum is:
2 * 1 + 1 * -1 + 3 * 1 = 4
With a bias of -5, the raw score becomes -1.
Change the bias to -3 and the same inputs and weights produce:
z = 1
That one change can flip the neuron from inactive to active after ReLU. The bias belongs to the neuron. It is part of the rule, not part of the input.
relu is a gate, not a mystery
ReLU is short for rectified linear unit, which is a terrible phrase to meet before coffee.
The rule is simple:
if z > 0, output z
if z <= 0, output 0
In the module, A is the value after ReLU. If Z is -1, A becomes 0. If Z is 3, A stays 3.
That is all it does. The reason it matters is that it gives the neuron a non-linear step. Without activations, stacked layers would collapse into another linear transformation. You do not need the whole argument yet. For now, it is enough to know that ReLU lets the neuron stay silent for some inputs and active for others.
what this tiny model teaches
This single neuron is not impressive as a model.
That is the point. Impressive would get in the way.
The useful part is the structure:
- inputs feed the neuron
- weights scale the inputs
- bias shifts the sum
Zshows the raw score- ReLU turns
ZintoA
Once that feels normal, four neurons are just four rows doing the same thing. A hidden layer is a group of these calculations. Matrix multiplication is the same pattern written compactly. Backpropagation is the part that decides how the weights should move after the output is wrong.
The whole stack gets bigger, but this small calculation keeps showing up.
try changing the bias first
Start with the bias.
Move it until Z crosses zero and watch A flip from 0 to a positive value. Then change one weight and predict whether Z should move up or down before you run the code. Then change one input and ask which weight makes that input matter.
Use the module like a debugger, not a demo.
The point is not to admire the result. The point is to make the arithmetic feel ordinary enough that the next layer has somewhere to attach.
Related posts

About Jeremy London
Engineering leader and builder in Denver. I write about AI platforms, agents, security, reliability, homelab infrastructure, and the parts of engineering work that have to survive production.