No history yet

Multilinear Algebra Foundations

Beyond Matrices

In linear algebra, we work with vectors (1st-order tensors) and matrices (2nd-order tensors). But what happens when data has more than two dimensions? Think of a video clip: it has height, width, and time. This is where multilinear algebra comes in, using tensors to represent this multi-way data.

A tensor is essentially a multi-dimensional array. The 'order' of a tensor refers to the number of dimensions, or 'modes,' it has. A scalar is order-0, a vector is order-1, and a matrix is order-2. A 3rd-order tensor can be visualized as a cube of numbers, and so on.

Lesson image

Slicing and Dicing Tensors

To analyze a tensor, we need ways to look at its internal structure. We can do this by examining its 'fibers' and 'slices'.

  • Fibers are the higher-order equivalent of rows and columns. They are defined by fixing all but one of the tensor's indices. For a 3rd-order tensor, a fiber is a vector that runs through the cube along one of its axes.

  • Slices are two-dimensional sections of the tensor, obtained by fixing one index. For a 3rd-order tensor, you can imagine slicing the cube of data horizontally, vertically, or front-to-back. Each slice is a matrix.

The most powerful technique for applying familiar matrix tools to tensors is 'unfolding,' also known as matricization or flattening. This process rearranges the elements of a higher-order tensor into a matrix. The way we unfold it depends on which mode we want to analyze.

For an I×J×KI \times J \times K tensor, we can unfold it into three different matrices: X(1)X_{(1)} of size I×(JK)I \times (JK), X(2)X_{(2)} of size J×(IK)J \times (IK), and X(3)X_{(3)} of size K×(IJ)K \times (IJ). In each case, the fibers along the chosen mode become the columns of the new matrix.

New Ways to Multiply

Once we have a tensor, how do we operate on it? A key operation is the n-mode product, which defines how to multiply a tensor by a matrix along a specific mode. This is the cornerstone of many tensor decomposition methods, like the Tucker decomposition.

The n-mode product of a tensor XRI1×I2××IN\mathcal{X} \in \mathbb{R}^{I_1 \times I_2 \times \dots \times I_N} with a matrix ARJ×InA \in \mathbb{R}^{J \times I_n} along the n-th mode is another tensor, Y=X×nA\mathcal{Y} = \mathcal{X} \times_n A. The size of the resulting tensor is I1××In1×J×In+1××INI_1 \times \dots \times I_{n-1} \times J \times I_{n+1} \times \dots \times I_N.

Y=X×nA    Y(n)=AX(n)\mathcal{Y} = \mathcal{X} \times_n A \iff Y_{(n)} = A X_{(n)}

Beyond the n-mode product, several specialized matrix products are fundamental in tensor computations. They provide compact ways to express complex operations, especially within decomposition algorithms like the CP model.

ProductSymbolOperationKey Feature
KroneckerABA \otimes BCreates a large block matrix from two smaller matrices.Expands dimensionality. If AA is m×nm \times n and BB is p×qp \times q, the result is mp×nqmp \times nq.
Khatri-RaoABA \odot BA column-wise Kronecker product. Only for matrices with the same number of columns.Preserves the column count while expanding the row count.
HadamardABA * BElement-wise product. Matrices must be the same size.Simple element-by-element multiplication. Used in filtering and scaling operations.

The creates a large block matrix, the Khatri-Rao product is a more specialized column-wise version, and the Hadamard product is a straightforward element-wise multiplication. Understanding the distinction between these is crucial for implementing and interpreting tensor algorithms.

Quiz Questions 1/6

In multilinear algebra, what does the 'order' of a tensor describe?

Quiz Questions 2/6

If you visualize a 3rd-order tensor as a cube of data, what is a 'fiber'?