Neuron as a Line
McCulloch–Pitts neuron · 1943

A neuron with a bias input is the line y = ax + b

Feed the neuron one real input x and a constant input of 1. Its weighted sum is exactly a straight line: the input weight is the slope, the bias weight is the intercept. Then pass that sum through an activation function and watch the line bend.

The neuron

w₁ = 1.00 w₀ = 0.00 x x = 1.00 1 bias input Σ z = 1.00 identity ŷ 1.00
1.00
0.50
1.50
Activation f(z)

Output as a function of x

neuron: z = 1.00·x + 0.50·1
line:   y = 1.00·x + 0.50
output: ŷ = z = 2.00
z = w₁x + w₀ (the line) ŷ = f(z) (neuron output) decision point z = 0

Neuron ↔ line: the mapping

NeuronLine y = ax + bCurrent valueWhat it does
input x₁ = xx1.50The independent variable, the horizontal axis.
input x₀ = 1(implicit 1)1A constant input so the bias weight can act as an offset.
weight w₁slope a1.00Tilts the line. Negative flips it; zero makes it flat.
bias weight w₀intercept b0.50Shifts the line up or down. Crosses the y-axis at b.
sum z = w₁x + w₀y2.00The pre-activation output. With no activation, this is the neuron's output.
z = 0 at x = −w₀/w₁x-intercept −b/a−0.50Where the line crosses zero. Step, ReLU, sigmoid and tanh all switch behaviour here.

Step (McCulloch–Pitts)

The 1943 neuron fires 1 when z ≥ 0 and 0 otherwise. The line becomes a yes/no threshold at x = −b/a.

ReLU

max(0, z). Keeps the line where it is positive and clamps it to 0 elsewhere, putting a kink at the x-intercept.

Sigmoid

1 / (1 + e−z). Squashes the line into (0, 1). The slope a sets how sharp the S is; b slides it left or right.

tanh

Squashes into (−1, 1), centred on 0. Like sigmoid, it crosses its midpoint exactly where the line crosses zero.