Neural Networks Explained Simply
A neuron multiplies inputs by weights, adds them up, and fires — stack millions and you get deep learning.
What you will learn
- Describe a single neuron’s maths
- Compute one neuron by hand
- See how layers build deep networks
Inspired by the brain (loosely)
A neural network is built from tiny units called neurons. The name comes from the brain, but a neuron here is just a small piece of arithmetic — nothing mystical.
What one neuron does
A neuron takes some inputs, multiplies each by a weight (its importance), adds them up (plus a bias), and passes the total through an activation that decides whether it “fires”.
# One neuron deciding "should I go out?" from 2 inputs
inputs = [1, 0] # 1 = sunny(yes), 0 = free time(no)
weights = [0.6, 0.9] # how much each input matters
bias = -0.5
total = sum(i * w for i, w in zip(inputs, weights)) + bias
output = 1 if total > 0 else 0 # a simple activation (fire or not)
print('total =', total, '-> output =', output)Note: Output: total = 0.1 -> output = 1 0.6×1 + 0.9×0 = 0.6, minus 0.5 bias = 0.1. That is above 0, so the neuron fires (1 = “go out”). Change the weights and the decision changes.
From one neuron to deep learning
- Put many neurons side by side → a layer.
- Feed one layer’s outputs into the next → a network.
- Many layers between input and output → a deep neural network (deep learning).
- Training = automatically adjusting all the weights until the network’s predictions match the data.
With enough neurons and layers, a network can learn astonishingly complex patterns — recognising faces, understanding speech, generating text. It is the same neuron maths, repeated millions of times.
Tip: You will not tune weights by hand — libraries like TensorFlow and PyTorch do it. But knowing a neuron is “weighted sum + activation” takes the mystery out of every headline about deep learning.
Watch out: Deep networks are powerful but hungry: they need lots of data and computing power, and they are hard to explain (“why did it decide that?”). They are not always the right tool — a small problem often needs only a simple model.
Q. What does a single neuron compute?
✍️ Practice
- Recompute the neuron with
inputs = [1, 1]— does it still fire? - Explain what the bias does if you make it +0.5 instead of −0.5.
🏠 Homework
- In your own words, explain how a network “learns” (hint: it adjusts the weights).