Skip to content

Mathematics · Ch 3 — Matrices

Multiplication of Matrices

5

Multiplication of Matrices

The Compatibility Condition

Unlike addition, matrix multiplication does not require the two matrices to have the same order -- but it does require a different kind of match.

Definition. If AA is a matrix of order m×nm\times n and BB is a matrix of order n×pn\times p -- that is, the number of columns of AA equals the number of rows of BB -- then the product ABAB is defined, and is a matrix of order m×pm\times p. If the column-count of AA does not equal the row-count of BB, the product ABAB is simply not defined.

The Row-by-Column Rule

Each entry of the product is computed by pairing a full row of AA with a full column of BB:

(AB)ij=∑k=1naik bkj=ai1b1j+ai2b2j+⋯+ainbnj.(AB)_{ij}=\sum_{k=1}^{n}a_{ik}\,b_{kj}=a_{i1}b_{1j}+a_{i2}b_{2j}+\cdots+a_{in}b_{nj}.

In words: to find the entry in row ii, column jj of ABAB, take row ii of AA, take column jj of BB, multiply them term by term, and add up the results. Example 5 and Exercise: Matrix Multiplication, Q1 both apply this rule directly for 2×22\times2 matrices:

[abcd][efgh]=[ae+bgaf+bhce+dgcf+dh].\begin{bmatrix}a&b\\c&d\end{bmatrix}\begin{bmatrix}e&f\\g&h\end{bmatrix}=\begin{bmatrix}ae+bg & af+bh\\ce+dg & cf+dh\end{bmatrix}.

The same rule extends to rectangular matrices exactly as stated in the compatibility condition above -- Exercise: Matrix Multiplication, Q3 multiplies a 2×32\times3 matrix by a 3×23\times2 matrix to get a 2×22\times2 product, working through each entry as a sum of three products (since n=3n=3 here) rather than two.

Properties That Multiplication Does Satisfy

Although matrix multiplication behaves very differently from ordinary multiplication in some respects (Section 8 covers exactly where it differs), it does satisfy the following, whenever the products involved are defined:

  • Associativity: (AB)C=A(BC)(AB)C=A(BC).
  • Distributivity over addition: A(B+C)=AB+ACA(B+C)=AB+AC and (A+B)C=AC+BC(A+B)C=AC+BC.
  • Compatibility with scalars: k(AB)=(kA)B=A(kB)k(AB)=(kA)B=A(kB) for any scalar kk. …