Tensors: From Vectors to Machine Learning
Rank, Indices, and the Math Behind Neural Networks — A TLDR Primer
Tensors show up everywhere once you start looking — in your linear algebra homework, in your physics coursework, and in every PyTorch or TensorFlow tutorial you've tried to follow. If you've ever wondered what is a tensor in machine learning, or stared at a shape mismatch error with no idea why, this book is built to get you unstuck fast.
Tensors: From Vectors to Machine Learning starts where you already are — with scalars, vectors, and matrices — and climbs the ladder one rung at a time. You'll learn index notation and the einstein summation convention explained the way a good tutor would: with worked numbers, not just symbols. From there the book covers the operations you'll actually use (addition, outer products, contraction, reshaping), how tensor components transform under a change of basis (the reason physicists care about tensors in the first place), and finally how deep learning frameworks like PyTorch represent images, batches, and weights as tensors — and why GPUs make that math fast.
This is a tensor math for beginners guide with no filler and no detours through material you don't need for the exam or assignment in front of you. Every idea comes with a concrete example and a plain-language definition, so you're not left guessing what an upper index means or why a rank-2 tensor and a matrix aren't quite the same thing.
Written for high school and early-college students, tutors, and parents helping with homework, this primer is short by design — meant to be read the night before a test or the afternoon before a project is due, then kept nearby as a quick reference after that.
Stop rereading the same confusing paragraph in your textbook. Start here.
- Explain what a tensor is as a generalization of scalars, vectors, and matrices
- Read and write index notation, including the Einstein summation convention
- Distinguish rank, shape, and dimension, and identify the rank of a given tensor
- Perform basic tensor operations: addition, contraction, outer product, and reshaping
- Understand how tensors transform under a change of basis and why that matters in physics
- Recognize how deep learning frameworks use tensors to represent data and model parameters
- 1. From Numbers to Tensors: A Ladder of ObjectsIntroduces tensors as a natural generalization of scalars, vectors, and matrices, with concrete examples of each rank.
- 2. Indices, Components, and Einstein SummationTeaches index notation as the working language of tensors, including upper/lower indices and the Einstein summation convention.
- 3. Tensor Operations You Actually UseWalks through addition, scalar multiplication, outer product, contraction, and reshaping with worked numerical examples.
- 4. Change of Basis and Why Physicists CareExplains how tensor components transform under a change of coordinates and why this makes tensors the right language for physics.
- 5. Tensors in Machine Learning: PyTorch, Shapes, and GPUsShows how deep learning frameworks represent images, batches, and model weights as tensors, and why GPUs make tensor math fast.
- 6. Where Tensors Go NextPoints to further topics — differential geometry, general relativity, tensor decompositions, and transformer architectures — so the reader knows where the ladder keeps going.