- How language becomes numbers through tokenization and embeddings
- How attention and neural networks turn numbers into predictions
- How softmax converts logits into a probability distribution
- How models learn by minimizing error with gradient descent
- What the mathematics does — and does not — establish about AI behavior
Understanding the mathematics inside AI is the foundation for trusting, governing, and holding AI accountable.
Trace a query from language to behavior through the core mathematical transformations.
What AI calculations justify — and what still needs evidence and judgement
Six questions run through this chapter, in the order a project actually meets them: how information is represented, how a model learns, how it handles uncertainty, how it produces a prediction, how that prediction is evaluated, and how it is governed. Each question is answered by a mathematical foundation — and each foundation has a boundary.
Representation, learning, uncertainty and prediction are built on established course foundations. Evaluation and governance are marked as additions — the calibration, threshold and control material an enterprise deployment needs on top of the mathematics.
From ingestion to retrieval — the mathematical disciplines in sequence
Follow a corpus of documents through the full data lifecycle. Each stage is a live, interactive application of a mathematical discipline: tokenization, inferential statistics, linear algebra, calculus, probability, and descriptive geometry — culminating in retrieval.
Hover the dotted terms above to see a plain-English definition.
Raw data arrives as documents. Before any math can act, the text is split into tokens — the atomic unit of every transformation that follows. Click a document to include or exclude it from the corpus.
From language to behavior, one transformation at a time
Each stage is a fully interactive step in the AI pipeline. Move through the walkthrough to see how words become numbers, numbers become predictions, and predictions become the behavior we observe.
The arithmetic inside a neural network
Five hands-on lessons — vectors, matrices, a neuron, softmax, and gradient descent — each computed live in the browser. Drag the vectors, bend the matrix, fire the neuron, turn scores into probabilities, and walk a loss downhill.
How it works, why it fails, and what the limits require
Three ideas carry most of modern AI: representing meaning as vectors, learning by descending a gradient, and reasoning under uncertainty. Each gets the same five-part treatment — plain-English meaning, the equation with every symbol explained, a live demo, what the calculation cannot establish, and what a team should therefore test, monitor or review.
Executive view leads with implications and questions to ask. Technical view adds assumptions and implementation notes. The equation is always available either way.
Vector similarity
A model turns a piece of text into a list of numbers — a vector. Meaning becomes position: documents about the same subject end up pointing in the same direction. Similarity is simply the angle between two of those arrows, which is how a search or retrieval step decides what is worth showing.
Nothing intervened here, but note D-207: it ranks second while being a stale draft. Similarity measures representational closeness — not currency, truth or authority.
Gradient descent and the learning rate
Training is a search. The loss function scores how wrong the model is, the gradient says which way is downhill, and the learning rate says how big a step to take. Too small and training never arrives; too large and it overshoots the minimum or diverges entirely.
Watch the two curves separate: training loss keeps falling while held-out loss bottoms out and rises. The optimization is working exactly as specified and still makes the model worse on new documents — which is why a falling training loss is not a release decision.
Bayes’ rule
Bayes’ rule turns a conditional probability around. If you know how often evidence appears when a hypothesis is true, you can infer how likely the hypothesis is given the evidence. It is the reason a rare condition can produce mostly false alarms even with an accurate test.
At 1.0% prevalence the same test yields a posterior of 16.7%: most flags are false alarms, and someone has to review them. Raise prevalence and the identical test looks far better. That is why a high score is only dependable once the base rate and the calibration behind it are known.
What this does — and does not — prove
The six results below are the ones most often asked to carry more weight than they can. Keep the right-hand column beside the claim whenever a dashboard, a vendor or a pitch deck presents a number as proof.
Ask which column the evidence actually occupies before a deployment decision is taken.
From threshold neurons to agentic systems
Forty concrete examples trace the mathematical ideas behind modern AI — from 1940s neuron models to today's tool-using agents. Historical entries illustrate established methods; near-term entries describe plausible improvements, not promised capabilities; the final three address claims without a defensible date.
Click any entry to see the concrete example and its realistic boundary.
A document-routing assistant, from vector to governance
A simulated document-routing assistant sorts incoming correspondence into categories and decides which items can be handled automatically. Follow it through seven steps. Cobalt marks the mathematical operation; amber marks the business rule, threshold or control that surrounds it. The mathematics never decides on its own — it supplies a number that a rule acts on.
The document is tokenized, and an embedding model maps it to a vector.
Nothing leaves the model here — but choosing which text is included (and excluded) is a business decision.
Where the material comes from, and what we corrected
The course material was used as a foundation for original explanations, demonstrations and diagrams — not reproduced. Two conditions are stated explicitly here because they are the ones most often compressed into a misleading shorthand.
Rank is the number of linearly independent columns (equivalently, rows) of a matrix — not a count of non-zero entries.
Rank is bounded by min(rows, columns) and equals the number of non-zero singular values. A matrix is invertible only when it is square and full rank; a rectangular matrix can be full rank for its shape and still have no inverse. We state the rank conditions explicitly wherever they matter.
An eigendecomposition A = QΛQ⁻¹ requires a square matrix that has a full set of linearly independent eigenvectors.
Not every square matrix is diagonalizable, and only symmetric real matrices are guaranteed an orthonormal decomposition A = QΛQᵀ. For a general matrix the reliable construction is the singular value decomposition A = UΣVᵀ, which exists for any shape. The dimensionality reduction demonstrated in this chapter uses symmetric covariance and Gram matrices, where the orthonormal case does hold.
The sequence of topics on this page — sets and discrete mathematics, calculus, linear algebra and probability — follows the structure of an open AI mathematics course. All explanations, diagrams, interactive demonstrations and enterprise examples here are original to Guild Systems.
Adapted from open course material: Introduction to AI — Mathematics unit (ColumbiaX, CU.OC.AI001, 2024). Referenced for topic structure only. No affiliation with, sponsorship by, or endorsement from Columbia University or ColumbiaX is implied.
- For statistics and calibration: require held-out samples, report confidence intervals, and check calibration per population before using scores as probabilities.
- For linear algebra: prefer the singular value decomposition unless symmetry is guaranteed.
- For probability: state priors explicitly, because the posterior is only as sound as the base rate behind it.
Judge a source by who published it and whether the assumptions are stated: course material from a university is usually more reliable than an unattributed blog post, and a result without its assumptions is not evidence.
01What is the first transformation when turning language into something a model can use?
02What does the softmax function do?
03What does gradient descent minimize during learning?
Three takeaways
The chapter, distilled for the reader in a hurry.
Mathematics is the foundation — trust and accountability are the practice
Understanding how AI works internally is the beginning. Chapters 1 and 2 show how organizations turn that understanding into trustworthy, accountable practice.
Back to Thought Leadership Hub