We can multiply a matrix with either a scalar or another matrix. Let's see the various ways to perform matrix multiplication.
Multiply a matrix by one number.
The scalar multiplication of a matrix A=(aij ) i=1,...,n j=1,2,...,m and a scalar k gives a product kAof the same size as A. The entries of kA are given by:
k·A=k·(aij )=(k·aij ).
Multiplication of matrices.
The multiplication of matrices is defined between two matrices only if the number of columns of the first matrix is the same as the number of rows of the second matrix, that is, you can multiply Amxn and Bpxq only when n=p (the result it will be a mxq matrix).
For Amxn and Bnxp, the product of both of them is A·B=C, where C is:
That is, cij=ai1·b1j+ai2·b2j+...+ain·bnj