kron(): The Kronecker Product
kron() forms the Kronecker product of two arrays or matrices. It replaces each entry of the first matrix with a scaled copy of the second, creating a larger block matrix. This is useful in tensor-style calculations, repeated systems, image transforms, and structured linear algebra.
Shape and scale
If A is m×n and B is p×q, kron(A, B) is mp×nq. The output can grow quickly, so inspect dimensions with size() before applying it to large inputs. kron is not ordinary multiply() and not entry-wise dotMultiply().
Use identity() to build repeated block structures, and reshape() only when rearranging the resulting entries is mathematically intended.