What is a neural network?
In one line
Ages 8 to 10: A neural network is a team of tiny number-checkers that learns which clues matter by practicing on examples.
Ages 11 to 13: Each neuron adds up its inputs multiplied by weights, and training nudges those weights to make fewer mistakes.
Ages 14 to 18: A neural network stacks layers of weighted sums and nonlinear activation functions, and learns its weights by gradient descent using backpropagation.
A neural network is a computer system that learns from examples. It is built from many small units, called neurons, arranged in layers. Each neuron multiplies its inputs by numbers called weights, adds them up and passes a result on. Training adjusts the weights until the answers get closer to right.
Last reviewed: 20 October 2026 7 min read
The idea in one picture
Deciding whether to fly a kite? You weigh two clues: wind, and rain, which counts against flying. One neuron does this with numbers.
One neuron, worked through:
- Wind is scored from 0 (still) to 10 (very windy). Its weight is 2.
- Rain is 1 if it is raining and 0 if it is not. Its weight is −6.
- Multiply each clue by its weight and add. A score of 8 or more means "fly".
| Day | Wind × 2 | Rain × −6 | Score | Answer |
|---|---|---|---|---|
| Breezy, dry | 5 × 2 = 10 | 0 × −6 = 0 | 10 | fly |
| Breezy, raining | 5 × 2 = 10 | 1 × −6 = −6 | 4 | stay in |
| Calm, dry | 2 × 2 = 4 | 0 | 4 | stay in |
A neural network joins many neurons in layers: one layer's answers become the next layer's clues.
How it works, step by step
- Turn the input into numbers. A photo becomes a grid of numbers, one per color per pixel, from 0 to 255.
- Weigh and add. Each neuron multiplies its inputs by weights, adds them up plus one more number (the bias), and passes the total through an activation function.
- Pass it on. Results flow forward, layer by layer, to the answer.
- Check against the example. During training, the answer is compared with the right answer, and the gap is measured as the loss.
- Nudge the weights. Every weight moves a little in the direction that shrinks the loss, over many rounds.
- Test on new cases. The network is checked on examples it has never seen.
A little deeper (ages 11 to 13)
What about a gale? With wind at 10, the kite neuron scores 20 and says "fly". Wrong: too much wind is as bad as too little. One neuron that compares a weighted total with one line can only say "more wind is better" or "more wind is worse", never "not too little, not too much".
A hidden layer fixes this. Neuron A says 1 if wind is 4 or more. Neuron B says 1 if wind is 9 or more. The output neuron works out A − B − rain and says "fly" if the result is 1.
- Wind 5, dry: 1 − 0 − 0 = 1, fly.
- Wind 10, dry: 1 − 1 − 0 = 0, stay in.
- Wind 5, raining: 1 − 0 − 1 = 0, stay in.
Layers combine simple checks into a more complex rule. The cutoffs (4 and 9) are set by biases, and in a real network training finds them, not a person.
Going further (ages 14 to 18)
One neuron computes y = f(w · x + b): the dot product of weights w and inputs x, plus a bias b, passed through an activation function f. A layer does this for many neurons at once.
A common activation is ReLU, f(x) = max(0, x): 0 for negative numbers, the number itself otherwise. Without a nonlinear step, stacking layers adds nothing, because a linear function of a linear function is still linear.
Training scores the network with a loss function. Backpropagation works out how much each weight affects the loss, and gradient descent moves every weight a small step to reduce it, over and over. That is why real networks use activations such as ReLU instead of the kite example's all-or-nothing step: training needs to measure how a small change in a weight changes the loss.
A network with more than one hidden layer is called a deep neural network, which is where the term deep learning comes from. The transformer, the design behind large language models, is a type of neural network.
Common mix-ups
- Mix-up: "It's a digital brain."Fact: It is loosely inspired by brain cells, but each artificial neuron is a very simple calculation.
- Mix-up: "Programmers type the rules in."Fact: People choose the design and the examples. The weights, which hold what the network has learned, come from training.
- Mix-up: "Right on the training examples means it works."Fact: A network can fit its examples so closely that it fails on new ones. That is overfitting, and fresh tests catch it.
- Mix-up: "It can tell you why it decided."Fact: Its weights are numbers with no reasons attached. Finding what it relies on takes careful testing.
Try it (no device, 5 minutes)
Be the kite neuron. One person calls out a day: a wind number from 0 to 10, and "rain" or "dry". Everyone works out wind × 2, subtracts 6 for rain, and calls "fly" at 8 or more. After five days, change one weight (wind to 3) and replay the same days. Which answers flipped? Training does this automatically: it adjusts weights and checks how the answers change.
Quick check
Using the kite neuron (wind × 2, rain × −6, fly at 8 or more), what does it say for wind 6 on a dry day?
Answer: Fly. The score is 6 × 2 = 12, and 12 is 8 or more.
Fly. The score is 6 × 2 = 12, and 12 is 8 or more.When a neural network learns, what part of it changes?
Answer: Its weights (and biases). Training nudges these numbers so the answers get closer to the right ones.
Its weights (and biases). Training nudges these numbers so the answers get closer to the right ones.Why does a network need a nonlinear activation function between layers?
Answer: Without one, every layer is a linear function, and a linear function of a linear function is still linear, so the extra layers add no power.
Without one, every layer is a linear function, and a linear function of a linear function is still linear, so the extra layers add no power.Questions
No. AI is the broad field of making computers do tasks that seem to need intelligence, and a neural network is one kind of model used inside many AI systems. Some AI systems use rules written by people instead, with no neural network at all.
The name comes from neurons, the cells in the brain that pass signals to each other. An artificial neuron is only loosely inspired by them: it multiplies its inputs by weights, adds them up and applies a simple function.
It makes a guess on a training example, measures how far the guess is from the right answer, and nudges every weight a little to shrink that gap. Repeating this over many examples and many rounds is what training means.
A deep neural network is a neural network with more than one hidden layer between the input and the output. Deep learning is machine learning that uses these deep networks.
No, the core idea needs only multiplying and adding. A child can weigh two clues, add them up, compare the total with a line and see what changes when one weight changes, all on paper.
Mechna Academy is a city of machines for curious children aged 8 to 18, opening first to ages 8 to 10. In each mission, a child guesses how a machine decides, then opens its Peek Hatch to check, changes one thing and tests it on a case it has never seen. Children learn how AI works this way, and they never chat with an AI.
For grown-ups: join the waitlistPlaces are limited. The waitlist is for parents and guardians 18 and older.