Maths for ML / Notation

a⊗b\mathbf{a}\otimes\mathbf{b}

tensor / outer / Kronecker product

Linear algebraAdvanced

Say it “a tensor b”

Combines two vectors into a matrix of all pairwise products (outer product), or two matrices into a bigger block matrix (Kronecker).

Example

a⊗b=ab⊤\mathbf{a}\otimes\mathbf{b} = \mathbf{a}\mathbf{b}^{\top}

For vectors, this is the outer product.

In code

np.outer(a, b)  # vectors: outer product
np.kron(A, B)   # matrices: Kronecker product
torch.outer(a, b)

Where you’ll see it in ML

Low-rank updates, second-order optimizers (K-FAC, Shampoo).

Don’t confuse it with

← All 94 symbols