Skip to main content
Mathematics LibreTexts

2.3: The ijth Entry of a Product

  • Page ID
    14507
  • \( \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}}\)

    In previous sections, we used the entries of a matrix to describe the action of matrix addition and scalar multiplication. We can also study matrix multiplication using the entries of matrices.

    What is the \(ij^{th}\) entry of \(AB?\) It is the entry in the \(i^{th}\) row and the \(j^{th}\) column of the product \(AB\).

    Now if \(A\) is \(m \times n\) and \(B\) is \(n \times p\), then we know that the product \(AB\) has the form \[\left[ \begin{array}{cccc} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{array} \right] \left[ \begin{array}{cccccc} b_{11} & b_{12} & \cdots & b_{1j} & \cdots & b_{1p} \\ b_{21} & b_{22} & \cdots & b_{2j} & \cdots & b_{2p} \\ \vdots & \vdots & & \vdots & & \vdots\\ b_{n1} & b_{n2} & \cdots & b_{nj} & \cdots & b_{np} \end{array} \right]\nonumber \]

    The \(j^{th}\) column of \(AB\) is of the form \[\left[ \begin{array}{cccc} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{array} \right] \left[ \begin{array}{c} b_{1j} \\ b_{2j} \\ \vdots \\ b_{nj} \end{array} \right]\nonumber \] which is an \(m\times 1\) column vector. It is calculated by \[b_{1j} \left[ \begin{array}{c} a_{11} \\ a_{21} \\ \vdots \\ a_{m1} \end{array} \right] + b_{2j}\left[ \begin{array}{c} a_{12} \\ a_{22} \\ \vdots \\ a_{m2} \end{array} \right] +\cdots + b_{nj}\left[ \begin{array}{c} a_{1n} \\ a_{2n} \\ \vdots \\ a_{mn} \end{array} \right]\nonumber \]

    Therefore, the \(ij^{th}\) entry is the entry in row \(i\) of this vector. This is computed by \[a_{i1}b_{1j}+a_{i2}b_{2j}+\cdots + a_{in}b_{nj}=\sum_{k=1}^{n}a_{ik}b_{kj}\nonumber \]

    The following is the formal definition for the \(ij^{th}\) entry of a product of matrices.

    Definition \(\PageIndex{1}\): The \(ij^{th}\) Entry of a Product

    Let \(A=\left[ a_{ij}\right]\) be an \(m\times n\) matrix and let \(B=\left[ b_{ij}\right]\) be an \(n\times p\) matrix. Then \(AB\) is an \(m\times p\) matrix and the \(\left( i, j \right)\)-entry of \(AB\) is defined as \[(AB)_{ij}=\sum_{k=1}^{n}a_{ik}b_{kj} \nonumber \] Another way to write this is \[(AB)_{ij}=\left[ \begin{array}{cccc} a_{i1} & a_{i2} & \cdots & a_{in} \end{array} \right] \left[ \begin{array}{c} b_{1j} \\ b_{2j} \\ \vdots \\ b_{nj} \end{array} \right] = a_{i1}b_{1j} + a_{i2}b_{2j} + \cdots + a_{in}b_{nj}\nonumber \]

    In other words, to find the \(\left( i, j \right)\)-entry of the product \(AB\), or \((AB)_{ij}\), you multiply the \(i^{th}\) row of \(A,\) on the left by the \(j^{th}\) column of \(B\). To express \(AB\) in terms of its entries, we write \(AB = \left[ (AB)_{ij} \right]\).

    Consider the following example.

    Example \(\PageIndex{1}\): The Entries of a Product

    Compute \(AB\) if possible. If it is, find the \(\left( 3,2 \right)\)-entry of \(AB\) using Definition \(\PageIndex{1}\). \[A = \left[ \begin{array}{cc} 1 & 2 \\ 3 & 1 \\ 2 & 6 \end{array} \right], B = \left[ \begin{array}{ccc} 2 & 3 & 1 \\ 7 & 6 & 2 \end{array} \right]\nonumber \]

    Solution

    First check if the product is possible. It is of the form \(\left( 3\times 2\right) \left( 2\times 3\right)\) and since the inside numbers match, it is possible to do the multiplication. The result should be a \(3\times 3\) matrix. We can first compute \(AB\): \[\left[ \left[ \begin{array}{rr} 1 & 2 \\ 3 & 1 \\ 2 & 6 \end{array} \right] \left[ \begin{array}{r} 2 \\ 7 \end{array} \right] ,\left[ \begin{array}{rr} 1 & 2 \\ 3 & 1 \\ 2 & 6 \end{array} \right] \left[ \begin{array}{r} 3 \\ 6 \end{array} \right] ,\left[ \begin{array}{rr} 1 & 2 \\ 3 & 1 \\ 2 & 6 \end{array} \right] \left[ \begin{array}{r} 1 \\ 2 \end{array} \right] \right]\nonumber \] where the commas separate the columns in the resulting product. Thus the above product equals \[\left[ \begin{array}{rrr} 16 & 15 & 5 \\ 13 & 15 & 5 \\ 46 & 42 & 14 \end{array} \right]\nonumber \] which is a \(3\times 3\) matrix as desired. Thus, the \(\left( 3,2 \right)\)-entry equals 42.

    Now using Definition \(\PageIndex{1}\), we can find that the \(\left( 3,2 \right)\)-entry equals \[\begin{aligned} \sum_{k=1}^{2}a_{3k}b_{k2} &=a_{31}b_{12}+a_{32}b_{22} \\ &=2\times 3+6\times 6=42\\\end{aligned}\] Consulting our result for \(AB\) above, this is correct!

    You may wish to use this method to verify that the rest of the entries in \(AB\) are correct.

    Here is another example.

    Example \(\PageIndex{2}\): Finding the Entries of a Product

    Determine if the product \(AB\) is defined. If it is, find the \(\left( 2, 1 \right)\)-entry of the product. \[A= \left[ \begin{array}{rrr} 2 & 3 & 1 \\ 7 & 6 & 2 \\ 0 & 0 & 0 \end{array} \right], B =\left[ \begin{array}{rr} 1 & 2 \\ 3 & 1 \\ 2 & 6 \end{array} \right]\nonumber \]

    Solution

    This product is of the form \(\left( 3\times 3\right) \left( 3\times 2\right)\). The middle numbers match so the matrices are conformable and it is possible to compute the product.

    We want to find the \(\left( 2, 1 \right)\)-entry of \(AB\), that is, the entry in the second row and first column of the product. We will use Definition \(\PageIndex{1}\), which states \[(AB)_{ij}=\sum_{k=1}^{n}a_{ik}b_{kj}\nonumber \] In this case, \(n=3\), \(i=2\) and \(j=1\). Hence the \(\left( 2, 1 \right)\)-entry is found by computing \[(AB)_{21} = \sum_{k=1}^{3}a_{2k}b_{k1} = \left[ \begin{array}{ccc} a_{21} & a_{22} & a_{23} \end{array} \right] \left[ \begin{array}{c} b_{11} \\ b_{21} \\ b_{31} \end{array} \right]\nonumber \] Substituting in the appropriate values, this product becomes \[\left[ \begin{array}{ccc} a_{21} & a_{22} & a_{23} \end{array} \right] \left[ \begin{array}{c} b_{11} \\ b_{21} \\ b_{31} \end{array} \right] = \left[ \begin{array}{ccc} 7 & 6 & 2 \end{array} \right] \left[ \begin{array}{c} 1 \\ 3 \\ 2 \end{array} \right] = 1 \times 7 + 3 \times 6 + 2 \times 2 = 29\nonumber \]

    Hence, \((AB)_{21} = 29\).

    You should take a moment to find a few other entries of \(AB\). You can multiply the matrices to check that your answers are correct. The product \(AB\) is given by \[AB = \left[ \begin{array}{cc} 13 & 13 \\ 29 & 32 \\ 0 & 0 \end{array} \right]\nonumber \]


    This page titled 2.3: The ijth Entry of a Product is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Ken Kuttler (Lyryx) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.