Skip to content
Lesson 1 of 3+60 XP

What is a neural network?

Lecture by 3Blue1Brown

A neural network is a function with thousands of adjustable knobs. Using the task of reading handwritten digits, this lecture explains neurons, layers, weights, biases and activations.

Key concepts

Tap a card to reveal its meaning.

Reviewed 0 of 5

Study notes

Highlight any sentence to ask Sage about it.

The task

Each handwritten digit is a 28 × 28 grid of pixels: 784 numbers, one per pixel, each between 0 (black) and 1 (white). These numbers are the activations of the network's first layer. The last layer has 10 neurons, one per digit, and the brightest output neuron is the network's guess.

Layers in between

Between input and output sit hidden layers, two layers of 16 neurons in this example. The hope is that early layers pick up small edges, later ones combine them into loops and lines, and the output combines those into digits. Whether a trained network actually works this way is a fascinating question of its own.

Weights and biases

Each neuron takes a weighted sum of every activation in the previous layer, adds a bias, then squishes the result into the range 0 to 1 with a function like the sigmoid. Weights decide which patterns a neuron responds to; the bias decides how strong the weighted sum must be before the neuron lights up.

The example network has about 13,000 weights and biases. Learning means finding values for all of these knobs that make the network classify digits well.

The compact view

A whole layer's computation fits in one expression: a′ = σ(Wa + b), where a is the vector of activations, W is the matrix of weights, b is the vector of biases and σ applies the squishing function to each entry. This is why linear algebra shows up everywhere in machine learning.

Lesson quiz

Ready to prove it?

3 questions. Get 2 right to complete the lesson.

  • +60 XP for passing
  • +20 XP per correct answer
  • +25 XP for a perfect score

You can take the quiz without an account, but your XP is only saved once you create an account.

Up next · Lesson 2

Gradient descent: how networks learn

Learning means minimizing a cost function. This lecture defines the cost, explains the gradient as the direction of steepest increase, and shows how stepping downhill again and again tunes thousands of weights at once.

Lorequest

Watch great lectures, prove what you learned and level up as you go, with Sage, an AI tutor that reads along with you.

© 2026 Lorequest. All rights reserved.

Video lectures are embedded from YouTube and belong to their creators.