8.1 Introduction to Tensors
Multi-way arrays and why flattening loses structure.
These notes walk through the lecture slides. The original deck is unchanged; use (slides) on the course hub if you want that PDF.
Figures and notes follow Introduction to Tensor Decompositions and their Applications in Machine Learning.
1. Brief history
Tensors generalize matrices to higher dimensions: multidimensional arrays.
They and their decompositions appear in 1927, then sit unused in computer science until late in the 20th century. Cheaper compute and better multilinear algebra — especially in the last decade — moved them into statistics, data science, and machine learning.
2. Tensor basics
A tensor is a multi-way collection of numbers, usually from . The simplest high-dimensional case is a three-dimensional array: a data cube. The same notation extends to more modes.

3. Tensor order
The order of a tensor is the number of dimensions.
| Object | Order | Notation |
|---|---|---|
| Scalar | 0 | |
| Vector | 1 | |
| Matrix | 2 | |
| Higher-order tensor |
Each is the length of that mode.

4. Tensor indexing
Fix some indices to get a subarray.
- Fibers: fix every index but one.
- Slices (slabs): fix every index but two.
For a third-order tensor, fibers are (column), (row), (tube). Slices are (frontal), (lateral), (horizontal).

5. Outer and inner product
The vector outer product is the product of the entries, written . For two length- vectors and ,
For vectors the same product is a tensor:
with .
The inner product of two length- vectors is a scalar:
6. Rank-1 tensors
An -way tensor is rank-1 if it is exactly the outer product of vectors. Adding a mode is a new scaling of a sub-tensor.
A rank-1 matrix: . A rank-1 3-way tensor: . The -way form is the product above.

7. Tensor rank
The rank is the smallest number of rank-1 tensors that sum to :
The factor matrices store those vectors as columns:
The weights (with ) often absorb column norms, typically so each column has squared length one.
Practice
-
A matrix is a 2-way array. What is a tensor adding?
-
What is a fiber, and what is a slice?
-
What does mean in terms of rank-1 tensors?