A single neuron takes a few numbers, multiplies each by its own weight, adds them up, and bends the total through a curve. That is the whole operation — billions of these are the model.
A neuron takes a few input numbers, multiplies each by its own weight, adds them up, adds a bias, and passes the total through a squish. Every multiply is just input · weight — that is the entire operation, wired up billions of times over.
Why squish at the end? Its real name is the activation function (we use tanh). It bends the straight-line sum into a curve and keeps the answer in a tidy range. Without it, stacking neurons collapses into one straight-line step — ten layers in a row would still be a single straight line, and the network could not model anything curved.
TRY → Drag x₁ all the way up and watch the sum grow (to about +3) — yet tanh still flattens the output near +1. Flip to no activation and the same neuron becomes a plain straight line whose output shoots off the chart, unbounded.
At the defaults x = [0.90, 0.30, 0.60] with weights w = [1.3, −0.9, 0.7] and bias 0.1:
0.90 × 1.3 = 1.17, 0.30 × −0.9 = −0.27, 0.60 × 0.7 = 0.42. Sum: 1.17 + (−0.27) + 0.42 + 0.1 = 1.42. Squish: tanh(1.42) = 0.89.
Drag x₁ to its max and the sum reaches about +3; tanh flattens the output near +1 regardless. With no activation the output = Σxw + b would keep climbing with no ceiling — it is the output that blows up without the squish, not the sum. And a straight line stays straight: ten un-squished neurons stacked is still one straight line. The curve is what lets stacked layers build up nonlinear meaning. The whole computation is one line of code: out = Math.tanh(x.reduce((a,xi,i)=>a+xi*w[i],0)+b).
A neuron is multiply, add, squish — and the squish (a nonlinear activation) is exactly what lets stacked layers model curves instead of collapsing back into one straight line.