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)

