Why can a deep network with no non-linear activation functions represent nothing more than a single linear (affine) layer?

Deep learning, Neurons and activations
Level L1 Beginner. Length Short. Nature Th Theoretical.

What's being asked

Whether you know why stacking linear layers collapses into one linear function and why non-linear activations are essential for deep networks.

Key idea

A linear transformation of a linear transformation is still linear: stacking any number of layers without non-linear activations collapses into a single weighted sum plus offset, which can only draw a flat decision boundary.

Steps

  1. Core rule: a linear (affine) layer simply multiplies its inputs by weights and adds a shift (bias). Applying one linear rule after another gives a single linear rule—just like in school algebra, where 2(3x+1)+5=6x+7 is still one straight line.
  2. Across many layers: whether you stack 2 linear layers or 100, the whole network reduces to one combined weighted sum and one offset, so depth adds extra numbers to tune without adding any curves or bends.
  3. What this misses: a single linear layer can only separate classes with a straight line or flat plane, so it fails on simple non-linear patterns like XOR (where (0,1) and (1,0) are one class while (0,0) and (1,1) are the other).
  4. Role of non-linearities: inserting a non-linear activation such as ReLU⁡(z)=max⁡(0,z) (which keeps positive values and sets negative values to zero) between layers bends the boundary so deeper layers can build curved and complex shapes.

Common mistakes

How long your answer should be

3–4 sentences: the collapse to one linear rule, why flat boundaries limit it, and what a non-linearity adds.

Read this

Previous in Deep learning: What is the difference between a perceptron and a logistic (sigmoid) neuron?
Next in Deep learning: What is backpropagation in a neural network, and what roles do the forward pass and the backward pass play during training?