🔢 Math Foundations · AI Basics
LAMP — Linear algebra, Analysis (calculus), Matrix ops, Probability — the four math pillars of AI
You don't need to master all four — but you need to recognize what each contributes
L
Linear Algebra — vectors, matrices, and similarity
Data points are represented as vectors, model parameters as matrices, and similarity between items is measured with dot products. Eigenvalues underpin techniques like PCA (dimensionality reduction).
Example: a word embedding representing "king" as a vector of numbers, where similar words end up as vectors pointing in similar directions.
A
Analysis / Calculus — derivatives and gradients
Derivatives measure how much a small change in one variable affects another. The chain rule enables backpropagation, and gradient descent uses derivatives to find the minimum of the loss function.
Example: gradient descent repeatedly nudges a model's weights in the direction that the derivative says will most reduce the loss.
M
Matrix Operations — the core computation of neural networks
Matrix multiplication is the fundamental repeated operation inside every neural network layer. GPUs are specifically optimized for this kind of parallel matrix math, which is why they're used to train AI models.
Example: a single forward pass through a neural network layer is, at its core, one matrix multiplication followed by an activation function.
P
Probability — reasoning about uncertainty
Bayes' theorem, probability distributions, and expected value underpin a huge range of AI techniques, from simple models like Naive Bayes to modern diffusion models used for image generation.
Example: a spam filter using Naive Bayes literally computes the probability that an email is spam given the words it contains.
1
A question describes gradient descent adjusting a model's weights to reduce error over many training iterations.
2
Ask: which math pillar is fundamentally responsible for computing how much to adjust each weight? Calculus — specifically derivatives and the chain rule.
3
If the same question instead asked about why GPUs speed up training so dramatically, the answer would shift to Matrix Operations, since GPUs are optimized for parallel matrix multiplication.
4
This shows the LAMP pillars aren't interchangeable — each one answers a different kind of "why does this work" question about the same underlying system.

Exams testing this topic usually don't require you to actually perform the math — they test whether you can correctly attribute a described AI behavior to the right underlying math concept. Backpropagation and gradient descent map to calculus. Embeddings, similarity, and dimensionality reduction map to linear algebra. GPU-accelerated training maps to matrix operations. Anything involving uncertainty, likelihood, or probabilistic reasoning maps to probability.

The most common trap is assuming you need to be able to perform advanced math computations by hand to understand AI conceptually. The exam-relevant skill is recognizing WHICH math pillar underlies a given AI behavior or technique, not solving the equations yourself — don't over-invest time in derivation practice if the actual test is conceptual attribution.

1. What does the L in LAMP stand for, and what does it explain in AI systems?
Linear Algebra — it explains how data is represented as vectors/matrices and how similarity between items is computed.
Tap to reveal / hide
2. What math concept underlies backpropagation and gradient descent?
Calculus — specifically derivatives and the chain rule, used to compute how to adjust weights to reduce error.
Tap to reveal / hide
3. Why are GPUs so well suited to training neural networks?
Because the core repeated operation in neural networks is matrix multiplication, and GPUs are optimized for fast parallel matrix math.
Tap to reveal / hide
4. Name one AI technique that relies heavily on probability theory.
Naive Bayes (or diffusion models) — both rely on probability distributions and concepts like Bayes' theorem.
Tap to reveal / hide
5. Do you need to be able to solve the underlying equations by hand to answer most exam questions on this topic?
No — exams usually test whether you can correctly attribute an AI behavior to the right math pillar, not perform the calculation yourself.
Tap to reveal / hide