Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

kron

Kronecker product (Matlab Style)


Description

Kronecker tensor product of two matrices.

Usage

kron(a, b)

Arguments

a

real or complex matrix

b

real or complex matrix

Details

The Kronecker product is a large matrix formed by all products between the elements of a and those of b. The first left block is a11*b, etc.

Value

an (n*p x m*q-matrix, if a is (n x m and b is (p x q).

Note

kron() is an alias for the R function kronecker(), which can also be executed with the binary operator ‘%x%’.

Examples

a <- diag(1, 2, 2)
b <- matrix(1:4, 2, 2)
kron(a, b)
kron(b, a)

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.