SOLID STATE PRESS
← Back to catalog
Tensors: From Vectors to Machine Learning cover
Coming soon
Coming soon to Amazon
This title is in our publishing queue.
Browse available titles
Mathematics

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.

What you'll learn
  • 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
What's inside
  1. 1. From Numbers to Tensors: A Ladder of Objects
    Introduces tensors as a natural generalization of scalars, vectors, and matrices, with concrete examples of each rank.
  2. 2. Indices, Components, and Einstein Summation
    Teaches index notation as the working language of tensors, including upper/lower indices and the Einstein summation convention.
  3. 3. Tensor Operations You Actually Use
    Walks through addition, scalar multiplication, outer product, contraction, and reshaping with worked numerical examples.
  4. 4. Change of Basis and Why Physicists Care
    Explains how tensor components transform under a change of coordinates and why this makes tensors the right language for physics.
  5. 5. Tensors in Machine Learning: PyTorch, Shapes, and GPUs
    Shows how deep learning frameworks represent images, batches, and model weights as tensors, and why GPUs make tensor math fast.
  6. 6. Where Tensors Go Next
    Points to further topics — differential geometry, general relativity, tensor decompositions, and transformer architectures — so the reader knows where the ladder keeps going.
Published by Solid State Press
Tensors: From Vectors to Machine Learning cover
TLDR STUDY GUIDES

Tensors: From Vectors to Machine Learning

Rank, Indices, and the Math Behind Neural Networks — A TLDR Primer
Solid State Press

Contents

  1. 1 From Numbers to Tensors: A Ladder of Objects
  2. 2 Indices, Components, and Einstein Summation
  3. 3 Tensor Operations You Actually Use
  4. 4 Change of Basis and Why Physicists Care
  5. 5 Tensors in Machine Learning: PyTorch, Shapes, and GPUs
  6. 6 Where Tensors Go Next
Chapter 1

From Numbers to Tensors: A Ladder of Objects

A tensor is a container for numbers that generalizes the objects you already know: a single number, a list of numbers, a grid of numbers, and beyond. If you've worked with vectors and matrices, you've already been using tensors — you just didn't need the word yet.

Start at the bottom of the ladder. A scalar is a single number: your height in inches, the temperature outside, the number 7. It has no direction and no structure — just a magnitude. In tensor language, a scalar is a rank-0 tensor. Rank tells you how many indices you need to point at one specific number inside the object. For a scalar, you need zero indices, because there's only one number and no way to "index into" it further.

Climb one rung and you get a vector: an ordered list of numbers, like (3,−1,4) representing a point in 3D space, or a list of three exam scores. To pick out one entry, you need exactly one index — the 2nd score, the 3rd coordinate. That makes a vector a rank-1 tensor. The count of entries, 3 in this case, is called its dimension, and its overall size description — "a list of 3 numbers" — is its shape, written (3,).

Climb again and you get a matrix: a rectangular grid of numbers, like a table of exam scores where rows are students and columns are subjects. To find one entry you need two indices — the row and the column. A matrix is therefore a rank-2 tensor. A matrix with 4 students and 3 subjects has shape (4,3): 4 rows, 3 columns.

Notice the pattern. Each step up the ladder adds one more index needed to locate a single number:

  • Rank 0 (scalar): 0 indices — one number.
  • Rank 1 (vector): 1 index — a list.
  • Rank 2 (matrix): 2 indices — a grid.
  • Rank 3: 3 indices — a stack of grids, like a color photo with rows, columns, and color channels (red, green, blue).
  • Rank n: n indices, for whatever n you need.

About This Book

If you're a linear algebra student who keeps hearing the word "tensor" and wants a straight answer to what is a tensor in machine learning, an engineering major staring down a PyTorch tutorial, or a self-taught coder trying to get pytorch tensors explained simply before diving into deep learning, this book is for you. Parents and tutors bridging the gap between a physics class and a machine learning side project will find it useful too.

This guide moves from ordinary vectors and matrices up through tensor rank and index notation, covering tensor math for beginners with real worked examples, not just theory. You'll get linear algebra tensors explained in plain language, the Einstein summation convention explained step by step, and a practical intro to tensors for deep learning — including how shapes and dimensions actually work on a GPU. A concise overview with no filler.

Read it straight through first, then work the examples by hand before trying the problem set at the end. That's the fastest way to make the ideas stick.

Keep reading

You've read the first half of Chapter 1. The complete book covers 6 chapters — readable in one sitting.

Coming soon to Amazon