Learning the math

SHIVASNOTES / EXPLORE

Linear algebra, gradients and optimization—worked through one step at a time.

Browse the subject

27 technical articles. Search by title or topic, or open a tag for more notes.

Show entries
Article Topics
AI Kernel Engineer Beginner Guide: Math, Linear Algebra, C/Linux
Foundations
Matrix Wx+b: From Scalars To Transformers
Foundations
Derivatives And The Chain Rule: The Math Of Tiny Changes
Foundations
How the Jacobian Matrix Works
Foundations
Backpropagation From wx+b: The Smallest Training Loop
Foundations
Softmax: The Probability Engine
Transformer maths
Activation Functions: The Nonlinearity Inside Neural Networks
Transformer maths
LayerNorm And RMSNorm: Stabilizing The Signal
Transformer maths
Positional Encoding: Teaching Transformers Where To Look
Transformer maths
Attention: The Core Of The Transformer
Transformer maths
Residual Connections: The Gradient Highway
Transformer maths
dL/d(LLM): The Full Backward Pass
Transformer maths
Where Does LLM Cross-Entropy Loss Come From? Compression, Shannon Entropy And Generalization
Transformer maths
Softmax vs Softplus: Competition, Positive Gates, and Backpropagation
Transformer maths
Optimizers: From SGD to AdamW
Optimization
Muon Optimizer: SGD vs AdamW vs Matrix-Aware Training Updates
Optimization
Muon Optimizer: From wx+b to Matrix Updates
Optimization
Backpropagation Through LoRA & QLoRA: Follow the Gradients
Optimization
LoRA & QLoRA: Inside the Update
Optimization
Convolution Is Wx+b Moving Across a Signal
Convolutions
Backpropagation Through Convolution: Shared Weights, Overlapping Gradients
Convolutions
How Kokoro Uses Dilated Convolution
Convolutions
Quaternions, Axis-Angle, And Vector Rotation
Rotations & control
Quaternion to Axis-Angle: A Drone's 45-Degree Turn
Rotations & control
Modelling A Quadcopter: From Four Rotor Speeds To Motion
Rotations & control
Why 4-Bit Quantization Is King: Understanding Q4_K, MXFP4, and NVFP4
Numerical precision
What Numerical Parity Actually Requires: BF16, Quantization, ISA Drift And CKE X-Ray
Numerical precision
Showing 1 to 10 of 27 entries

Follow the work. Understand the machine.

I write about the maths, the kernels, and what happens when I try to make them work. Join me for the investigations, including the bits that go wrong.

ENGINEERING NOTES FROM ANTHONY SHIVAKUMAR
How to think like an AI kernel and HPC engineer — ShivasNotes field guide cover
THE ILLUSTRATED FIELD GUIDE

How to think like an AI kernel & HPC engineer

  • 10 pages to connect the pieces
  • A real Whisper investigation
  • A worksheet for your next experiment
KEEP IN TOUCH

A note when there’s something to share.

Get the illustrated field guide by email, followed by engineering notes as I write them.

  • You’re joining the ShivasNotes email list. No fixed cadence.
  • Your welcome email includes the PDF. Allow a few minutes, and check spam if it hasn’t arrived.