kron

kron(x, y)

Try it yourself:

See also:

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.

Try Kron in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions