Gradivex
  • Home
  • Academy
  • Arena
  • Visualizer
  • Models
Log in
AI Fundamentals/Neural Networks Intro/Lesson 2

The perceptron

Module 3 · Lesson 2 of 6 · 7 min read
Theory

One neuron, one line

The last lesson gave you the four-step loop, input, weight, weighted sum, activation. The perceptron, invented by Frank Rosenblatt in 1958, is that loop stripped down to its simplest possible working version: a single artificial neuron that can only ever answer yes or no.

Here's the whole thing, in order:

  • Take every input and multiply it by its own weight: w₁x₁, w₂x₂, w₃x₃...
  • Add them all up, plus one extra number called the bias (b), think of it as a weight attached to a permanent, always-on input of 1
  • The result is a single number: s = w₁x₁ + w₂x₂ + ... + b
  • Feed s into a step function: if s > 0, output 1 ("fire"). Otherwise, output 0 ("stay silent"). No in-between.

The bias is easy to skip past, but it matters: without it, every decision boundary would be forced to pass through zero. The bias is what lets the neuron shift its threshold left or right instead of being stuck at the origin.

The perceptron gets much easier to reason about once you see it geometrically: the equation s = 0 is a straight line (or, with more than two inputs, a flat plane). Every point on one side of that line gets output 1; every point on the other side gets output 0. Training a perceptron is nothing more than sliding and rotating that one line until it lands in the right place.

Class 0Class 1
A perceptron learns one straight line, nothing more, nothing less.
Interactive

Can one straight line do the job?

For each problem, decide whether a single straight line could correctly separate the two outcomes.

AND gate: output 1 only when both input A and input B are 1.

OR gate: output 1 when input A or input B (or both) is 1.

XOR gate: output 1 when exactly one of A, B is 1, not both, not neither.

NAND gate: output 1 unless both input A and input B are 1.

Two clusters of data points sitting in clearly separate regions of a plane, with a wide empty gap between them.

A dataset shaped like two interleaved spirals winding around each other.

A small circle of "class A" points completely surrounded by a ring of "class B" points, like a donut.

0/7 chosen
Theory

The XOR wall: and why it nearly ended neural networks

In 1969, Marvin Minsky and Seymour Papert published a book, simply titled Perceptrons, that proved, mathematically, not by opinion, that a single perceptron can never solve XOR, or anything else that isn't linearly separable. That's not a training problem you can fix with more data or more patience. It's a hard geometric limit: one straight line just cannot bend itself around a donut-shaped dataset.

The consequence was bigger than the math itself:

  • The result got generalized, unfairly, into 'neural networks are a dead end'
  • Research funding for neural networks collapsed for over a decade, historians call it the first AI winter, a stretch where corporate money dried up almost completely because people decided the technology had been over-hyped and couldn't yet solve real, non-linear business problems
  • Ironically, the fix was already implicit in the same book: stack perceptrons in layers, and a network can bend its decision boundary into curves, rings, spirals, anything
  • That fix just wasn't trainable yet. Nobody had an efficient way to adjust the weights of a multi-layer network until was popularized in 1986, which is exactly where this module is headed next

So the XOR wall wasn't the end of the idea. It was the reason the field had to go from 'one neuron, one line' to 'many neurons, many lines combined', which is what every network you'll meet from here on actually is.

Interactive

Check your understanding

Minsky and Papert proved a single perceptron can't solve XOR. What did that finding actually mean?

Takeaway

What to remember

  • ✓A perceptron is one artificial neuron: weighted sum, plus a bias, fed into a step function that outputs 1 or 0.
  • ✓Geometrically, a perceptron draws exactly one straight line (or flat plane) and classifies by which side of it a point falls on.
  • ✓It can learn any problem where one straight line correctly separates the two outcomes, like AND, OR, NAND.
  • ✓It cannot learn XOR, or anything else that isn't linearly separable, a mathematical limit, not a training bug.
  • ✓That limit triggered the first AI winter, until stacking perceptrons into layers gave networks the ability to bend their decision boundary into anything.
Mentor-0

Stuck on something in this lesson? Ask.

0/1000

Every lesson is free to read. Log in to save your progress, complete lessons, and earn Compute and XP.

Log in free
From biology to mathActivation functions
Gradivex

Understand AI from the inside, read it, see it, prove it.

Platform

AcademyVisualizerRoadmapsModels

Community

DiscordLeaderboard

Company

PrivacyTerms

© 2026 Gradivex. All rights reserved.