Robots Atlas>ROBOTS ATLAS

Neural Networks: From Fundamentals to Modern AI · Math and tools: tensors, gradients, Python, NumPy

Scalar, vector, matrix, tensor — geometric intuition

Math and tools: tensors, gradients, Python, NumPy

Introduction

Before you touch PyTorch, you need one picture in your head: a tensor is a container for numbers with a defined shape. A scalar is a single number (weight, temperature). A vector is a list of numbers — an arrow in space with a length and a direction. A matrix is a table of numbers — for example a grayscale image. A tensor generalizes all of these to any number of dimensions: a batch of color photos for a neural network is a four-dimensional tensor. This lesson builds intuition for shapes, axes, and dimensions, so that the next lessons (operations, gradient, PyTorch) have something to stand on. No formulas — just pictures in your head.