How a Dot Product From an Algebra Textbook Became the Foundation of ChatGPT, Claude and Gemini
In 2017, Google published "Attention is All You Need," and neural networks were never the same. Today transformers power ChatGPT, Claude, Gemini and Midjourney. But what are they built on? Not an elaborate memory architecture or a biologically accurate model of the brain, but the plain dot product of two vectors from an algebra textbook. The operation is so simple that students meet it in their first lectures.
AI-processed from Habr AI; edited by Hamidun News
In 2017, a group of Google engineers published the paper "Attention is All You Need," and it quietly split the history of artificial intelligence into "before" and "after." With no flashy presentations and no humanoid robots, eight researchers described an architecture that now underpins ChatGPT, Claude, Gemini, Midjourney and virtually all modern generative AI. The most surprising part: the foundation of this revolution turned out to be one of the simplest operations in linear algebra, the dot product of two vectors.
The wall neural networks hit
Before transformers, recurrent networks (RNN and LSTM) dominated text processing. They read sentences sequentially, word by word, step by step. The problem is that by the end of a long text the model "forgot" the beginning: the signal faded as it passed through hundreds of intermediate steps. This was known as the vanishing gradient problem.
Imagine a model reading a novel that, by chapter five, no longer remembers the main character's name. That is the wall neural networks hit by the mid-2010s. The architecture scaled poorly, and parallel computation was practically unavailable because each step depended on the previous one. Something fundamentally different was needed.
Why the dot product is brilliantly simple
The dot product is an operation from a standard vector algebra course. You take two vectors, multiply their coordinates pairwise and add up all the results. The output is a single number: the larger it is, the more "similar" or "closely related" the vectors are.
In the transformer's self-attention mechanism, the operation is applied as follows:
- Each word is turned into three vectors: Query, Key and Value
- The dot product of one word's Query with every other word's Key shows the "strength of the connection" between the pair of words
- The results are scaled and normalized through softmax, yielding attention weights from 0 to 1
- The word's final vector is a weighted sum of all Values, using those weights
In essence, every token asks all the others at once: "How important are you to my understanding right now?" and gets a precise numerical answer. This happens in parallel for the whole sentence, not word by word.
Three properties that changed the industry
The dot product turned out to be an ideal operation for language for several reasons at once.
Parallelism. All attention computations can run at the same time, unlike in RNNs, where each step depends on the previous one. This unlocked GPUs and TPUs and made it possible to scale models to hundreds of billions of parameters. That is how BERT, GPT-3, and later GPT-4 and Claude appeared within a few years.
Global context without fading. Every word immediately "sees" all the others, regardless of distance in the text. The pronoun "he" at the end of a long paragraph correctly attaches to a character's name from the very beginning. No signal decay through intermediate layers.
Interpretability. Attention matrices can be visualized, so you can literally see which word attends to which when a sentence is processed. That is rare in the world of neural networks, where most decisions remain a black box.
"We dispense with recurrence and convolutions entirely," the authors wrote in 2017.
To the community at the time, this sounded like heresy. Three years later it became axiomatic.
What this means
The transformer proved that a revolution in AI can come not from neuroscience or the philosophy of mind, but from a second-year linear algebra textbook. ChatGPT, Claude, Gemini and Midjourney all, at their core, multiply matrices of dot products billions of times per second. The simplicity of the operation turned out to be its greatest strength: not added complexity, but the right choice of an elementary tool changed everything.
- Nov 27, 2026How a Small Website Finds Out Whether Claude Names It: 29 Questions and Up to $2 a Week
- Nov 27, 2026OpenAI and Cisco Release Shirudo: Protecting Linux from Exploits Without a Patch or Restart
- Nov 27, 2026OpenAI Fixes Codex Limit Bug: Quotas Are 25–40% Smaller
- Nov 27, 2026Chinese AI Slows Down: Moonshot Warns Its Model Releases May Stretch From Six Months to a Year
Key Questions Answered
What are the key details on The wall neural networks hit?
Before transformers, recurrent networks (RNN and LSTM) dominated text processing. They read sentences sequentially, word by word, step by step. The problem is that by the end of a long text the model "forgot" the beginning: the signal faded as it passed through hundreds of intermediate steps. This was known as the vanishing gradient problem. Imagine a model reading a novel that, by chapter five, no longer remembers the main character's name. That is the wall neural networks hit by the mid-2010s.
Why the dot product is brilliantly simple?
The dot product is an operation from a standard vector algebra course. You take two vectors, multiply their coordinates pairwise and add up all the results. The output is a single number: the larger it is, the more "similar" or "closely related" the vectors are.
What are the key details on Three properties that changed the industry?
The dot product turned out to be an ideal operation for language for several reasons at once. Parallelism. All attention computations can run at the same time, unlike in RNNs, where each step depends on the previous one. This unlocked GPUs and TPUs and made it possible to scale models to hundreds of billions of parameters. That is how BERT, GPT-3, and later GPT-4 and Claude appeared within a few years. Global context without fading. Every word immediately "sees" all the others, regardless of distance in the text.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
