Scalar multiplication: You multiply every component by the scalar c , mathematically it is written c A d=ef [cai j ] , Division of a matrix by a nonzero scalar c is equivalent tomultiplication by (1/c).
Matrix by Vector product: you multiply as if the matrix was turned to the right, and then add as it is.
Rows of A are multiplied with columns of B and so you obtain C matrix result, that is nxp, because one is mxn and the other nxp.