kronecker                package:base                R Documentation

_K_r_o_n_e_c_k_e_r _P_r_o_d_u_c_t _o_f _A_r_r_a_y_s

_D_e_s_c_r_i_p_t_i_o_n:

     Computes the generalised kronecker product of two arrays, `X' and
     `Y'.  `kronecker(X, Y)' returns an array `A' with dimensions
     `dim(X) * dim(Y)'.

_U_s_a_g_e:

     kronecker(X, Y, FUN = "*", ...)
     X %x% Y

_A_r_g_u_m_e_n_t_s:

       X: vector or array.

       Y: vector or array.

     FUN: a function, possibly specified as character (string).

     ...: optional arguments to be passed to `FUN'.

_D_e_t_a_i_l_s:

     If `X' and `Y' do not have the same number of dimensions, the
     smaller array is padded with dimensions of size one.  `A' consists
     of submatrices constructed by taking `X' one term at a time and
     expanding that term as `FUN(x, Y, ...)'.

     `%x%' is an `.Alias' for `kronecker' (where `FUN' is hardwired to
     `"*"').

_A_u_t_h_o_r(_s):

     Jonathan Rougier

_R_e_f_e_r_e_n_c_e_s:

     Searle, Shayle R. (1982) Matrix Algebra Useful for Statistics;
     John Wiley and Sons.

_S_e_e _A_l_s_o:

     `outer' on which `kronecker' is built and `matmult' for usual
     matrix multiplication.

_E_x_a_m_p_l_e_s:

     # simple scalar multiplication
     ( M <- matrix(1:6, ncol=2) )
     stopifnot(kronecker(4, M) == 4 * M)

     ( A <- matrix(0:3, ncol=2) )
     A %x% cbind(2:3)
     # Block diagonal array:
     kronecker(diag(3), M)
     stopifnot(kronecker(diag(3), M) == diag(3) %x% M)

