The idea in plain language
Start with a decision you already understand: should a bank approve a loan? You might score an application by adding up evidence — income counts for something, existing debt counts against it — and compare the total to a threshold. That weighted sum plus a threshold is one artificial neuron.
A neural network takes that idea and layers it. Instead of one score, the first layer computes many scores from the same inputs, and each score becomes an input to the next layer. The final layer produces the answer you asked for: a probability, a price, a class label, or the next token in a sentence.
The word neural is a historical analogy to brain cells, not a claim that a network works like a brain. A neuron here is a number-crunching unit; a network is a directed graph of them.
What one neuron actually computes
A neuron with inputs x₁ … xₙ holds one weight per input (w₁ … wₙ) and one bias (b). It computes a weighted sum, then applies an activation function f:
The weights say how much each input matters and in which direction. The bias shifts the decision threshold, which is why a neuron can fire even when every input is zero. The activation function bends the output: a sigmoid squashes it into 0–1, ReLU keeps positive values and clamps negatives to zero, and tanh maps it into −1 to 1.
| Piece | What it does | Learned or chosen? |
|---|---|---|
| Weights (w) | Scale each input’s influence | Learned from data |
| Bias (b) | Moves the firing threshold | Learned from data |
| Activation (f) | Adds a non-linear bend | Chosen by the designer |
| Architecture | How many layers and neurons | Chosen by the designer |
A worked example you can check
Take two inputs, x₁ = 0.8 and x₂ = 0.4, and a hidden layer with two ReLU neurons. Give the first neuron weights w₁ = 1.0, w₂ = −2.0 and bias b = 0. Its pre-activation is 0.8 − 0.8 = 0.0, so ReLU outputs 0.0. If the second neuron has weights 0.5, 0.5 and bias −0.1, it computes 0.4 + 0.2 − 0.1 = 0.5, and ReLU outputs 0.5.
Now suppose the output neuron weights those two hidden values by 2.0 and −1.0, with bias 0.3. The pre-activation is 2.0 × 0.0 − 1.0 × 0.5 + 0.3 = −0.2. A sigmoid turns that into roughly 0.45 — a probability just under one half. Change one hidden weight and the final number moves; that sensitivity is exactly what training exploits.
The demonstration below runs the same forward pass with editable weights, so you can watch one connection change every number downstream.
Where neural networks are used — and where the label misleads
Neural networks are the working core of machine translation, speech recognition, image classification, recommendation ranking and large language models. In every case the pattern is the same: many inputs, several layers of learned features, an output layer shaped to the task, and a loss function that scores how wrong the output was.
The limitation to keep in mind is that a neural network is a function fitted to data. It has no built-in fact database and no automatic check that a confident output is true. A network trained on historical hiring decisions reproduces the patterns in those decisions, including unfair ones — which is why evaluation, data curation and human review sit around the model rather than inside it.
If you want the next layer of detail — how weights are corrected after a wrong answer — read the answer on backpropagation. The number of weights itself is covered in “What are parameters in an AI model?”
How the demonstration maps to the equations
The demo shows two inputs, two hidden neurons and one output. Each arrow carries a weight; each node shows its pre-activation z and its activated value a. Changing the highlighted weight is exactly the wᵢⱼ term in the weighted sum, and the output bar is the sigmoid probability. Nothing is stored and nothing is sent to a server.