Module 01 / Foundation
Single Neuron
Forward Pass
Input -> weights -> bias -> activation -> output. See how one neuron turns features into a prediction signal.
Explore
Interactive lesson
Complete current prototype loaded without changing its teaching content.
Loading the preserved interactive lesson...
Current moment
Context
Background
A single neuron is the fundamental building block of a neural network. It receives one or more input signals, multiplies each by a weight that controls how influential that input is, adds a bias term to shift the result, and then passes the weighted sum through an activation function to produce an output. This forward-pass sequence turns raw input values into an internal representation the network can use.
On its own, a single neuron is still a linear model before the activation is applied. That is why a neuron is simple but important: by stacking many neurons with nonlinear activations, we move from a single weighted sum to a flexible model that can learn much richer patterns.
Notation
Important formulas
The neuron first computes a weighted sum of its inputs and adds a bias.
The activation function transforms the weighted sum into the neuron output.
Tradeoffs
Pros and cons
Pros
- Forms the basic computational unit of feed-forward neural networks and deeper architectures.
- Weighted inputs plus bias provide a flexible linear template for learning relative input importance.
- When combined with nonlinear activations and multiple layers, neurons support universal function approximation.
Cons
- A single neuron alone cannot model complex nonlinear relationships.
- Without a nonlinear activation, stacking many linear neurons still behaves like one linear transformation.
- A small neuron set can underfit complex data, while a large one requires careful initialization and regularization.
Practice
Example and guidance
Quick Example
Let x1 = 1, x2 = 2, w1 = 0.5, w2 = -1.0, and b = 0.1. The weighted sum becomes z = -1.4, and passing that through a sigmoid gives a value close to 0.20.
Common Mistake
Beginners often forget the bias term and treat the neuron as only a weighted input sum. Another common mistake is to ignore the role of nonlinearity: if every activation is linear, stacking neurons does not create a more expressive network.