Think of a neuron like a tiny decision-maker. It receives several inputs — numbers representing features of the data. For example, if we're recognising a cat photo, the inputs might be pixel brightness values.
Each input x₁, x₂, x₃ is just a number — like 0.8, 0.2, 0.5. The neuron will combine them and decide what to output.
Each connection has a weight — a number that controls how much that input matters. A high weight means "pay a lot of attention to this". A low weight means "mostly ignore this".
Notice the line thickness above reflects the weight value. w₃=0.9 is thick (important), w₂=0.1 is thin (less important). These weights are what the network learns.
Try it — drag the sliders:
8× w₁=0.5
2× w₂=0.1
5× w₃=0.9
Σ = (x₁×w₁) + (x₂×w₂) + (x₃×w₃) = 9.7
The Σ half of the neuron multiplies each input by its weight, then adds them all up. This is called a weighted sum. Nothing magic — just multiplication and addition.
Weighted sum coming in → activation function output:
Sum input2.0
ReLU output
2.00
max(0, z)
Sigmoid output
0.88
1 / (1 + e⁻ᶻ)
The f half applies an activation function — it squishes or gates the sum to introduce non-linearity.
Without this, no matter how many layers you stack, the network could only compute straight lines. The activation function is what lets networks learn complex patterns.
Watch a neuron learn to detect "is the number big?"
Input: a number 1–10. Correct answer: 1 if ≥ 6, else 0. We start with a random weight and train it.
Weight w
?
Last error
—
Steps
0
Press "Train one step" to begin.
Learning = adjusting weights to reduce error. Each step: pick a random example, measure how wrong the output was (the error), then nudge the weight slightly in the direction that reduces it. Repeat thousands of times — that's gradient descent.
A neural network is just many neurons chained together in layers. Each layer's outputs become the next layer's inputs. Earlier layers learn simple patterns (edges, sounds), later layers combine them into complex ones (faces, words).
That's the whole idea! Inputs → weighted sums → activations → repeat through layers → output. Learning = finding the right weights via gradient descent. Everything else in AI is elaboration on this core loop.