matmult             package:compositions             R Documentation

_i_n_n_e_r _p_r_o_d_u_c_t _f_o_r _m_a_t_r_i_c_e_s _a_n_d _v_e_c_t_o_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     Multiplies two matrices, if they are conformable. If one argument
     is a vector, it will be coerced to either a row or a column matrix
     to make the two arguments conformable. If both are vectors it will
     return the inner product.

_U_s_a_g_e:

     x %*% y
     \method{%*%}{default}(x, y)

_A_r_g_u_m_e_n_t_s:

     x,y: numeric or complex matrices or vectors

_D_e_t_a_i_l_s:

     This is a copy of the '%*%' function. The function is made generic
     to allow the definition of specific methods.

_V_a_l_u_e:

     The matrix product.  Uses 'drop' to get rid of dimensions which
     have only one level.

_S_e_e _A_l_s_o:

     '%*%.rmult'

_E_x_a_m_p_l_e_s:

     M <- matrix(c(
     0.2,0.1,0.0,
     0.1,0.2,0.0,
     0.0,0.0,0.2),byrow=TRUE,nrow=3)
     x <- c(1,1,2)
     M %*% x
     x %*% M
     x %*% x
     M %*% M
     t(x) %*% M

