Multiplying matrices

Multiplying matrices by scalars

In scalar multiplication, each entry in the matrix is multiplied by the given scalar.

C=kAC[i,j]=cAi,j

Example

C=kA=3·1-230-14=
=3·13·-23·33·03·-13·4=
=3-690-312

Multiplying matricesl

The component in the ii -th row and the j -th column of C is the dot product between the i -th row of A and the j -th column of B.

In the i -th row of A, the first element is multiplied by the first element of the j -th column of B, then the second element of the i -th row is multiplied by the second element in the j -th column, and thus by the n -th element. Then we add up these products.

Example

102-131·312110=
=1·3+0·2+2·11·1+0·1+2·0-1·3+0·2+2·1-1·1+3·1+1·0=
=5142

Some simple rules for multiplying matrices

  • The number of columns in the first matrix must be equal to the number of rows in the second matrix.
  • The result matrix has the same number of rows as the first matrix and the same number of columns as the second matrix:

Am,n·Bn,k=Cm,k

Keywords: Multiplying matrices