A tensor is a multidimensional array equipped with its own algebra: a defined set of operations and rules. Vectors and matrices are tensors too, so the term generalizes both without requiring unfamiliar notation. section 2.5.3 section 2.8
Use the term to connect data layout with the operations that give it mathematical meaning:
- A matrix is a two-dimensional array whose algebra includes operations such as matrix multiplication. section 2.5.2
- A tensor generalizes vectors and matrices to multidimensional arrays while retaining an associated algebra. section 2.5.3
- Tensor terminology can make familiar physical models sound more complicated than they are; a 3D inertia tensor is a 3×3 matrix. section 2.5.2
A matrix-shaped tensor
The nested array [[1, 2, 3], [4, 5, 6], [7, 8, 9]] shows the table-like layout of a two-dimensional tensor. Its entries can participate in matrix-specific operations, rather than being treated as an arbitrary concatenation of values. section 2.5.2
[ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]
Inspect the nested-bracket representation of a matrix as a concrete two-dimensional tensor layout. section 2.5.2






