Data Shapes & Tensors

Geometry and algebra of linear maps, vectors, and matrices

A shape records how the numbers in an array are arranged: how many axes it has, and how long each axis is. One number by itself is a scalar. A line of numbers is a vector. A rectangular grid is a matrix. Once you need three axes or more, the word people reach for is tensor: any array with any number of axes. That's the meaning this lesson uses, the one that shows up in code and in papers. It's a looser use of the word than a mathematician's "tensor" (a multilinear map with its own algebra), but it's the one every deep learning framework means when it prints out an array's shape.

🔒 This is a Pro lesson — the interactive figure, worked examples, quiz and practice open with Pro access.

▶ Data Shapes & Tensors
← Elementwise Operations & BroadcastingTranspose →