Skip to main content
Engineering LibreTexts

14.3: Matrix Product

  • Page ID
    14860
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Given an n × m matrix A and a m × p matrix B, the matrix product AB is defined by

    \[(AB)_{ij}=\sum_{k=1}^{m}A_{ik}B_{kj}\]

    where the index ij indicates the i-th row and j-th column entry of the resulting n × p matrix. Each entry therefore consists of the scalar product of the i-th row of A with the j-th column of B.

    Note that for this to work, the right hand matrix (here B) has to have as many columns as the left hand matrix (here A) has rows. Therefore, the operation is not commutative, i.e., AB ≠ BA.

    For example, multiplying a 3x3 matrix with a 3x1 matrix (a vector), works as follows: Let

    \[\boldsymbol{A} =\begin{pmatrix}
    a & b & c\\
    p & q & r\\
    u & v & w
    \end{pmatrix}\ \boldsymbol{B}=\begin{pmatrix}
    x\\
    y\\
    z
    \end{pmatrix}\]

    Then their matrix product is:

    \[\boldsymbol{AB} =\begin{pmatrix}
    a & b & c\\
    p & q & r\\
    u & v & w
    \end{pmatrix}\begin{pmatrix}
    x\\
    y\\
    z
    \end{pmatrix}=\begin{pmatrix}
    ax+by+cz\\
    px+qy+rz\\
    ux+vy+wz
    \end{pmatrix}\]


    This page titled 14.3: Matrix Product is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Nikolaus Correll via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.