Matrix multiplication notation












5












$begingroup$


This is from my textbook:




If $A=(a_{ij})in M_{mn}(Bbb F), B=(b_{ij})in M_{np}(Bbb F)$ then $C=Atimes B=(c_{ij})in M_{mp}(Bbb F)$.
$c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$ where $i=1,...m, j=1,...p$




I know how to multiply matrices but I don't understand this notation : $c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$



Can someone explain what that represents by giving me an example? And how did we get that formula?










share|cite|improve this question









$endgroup$












  • $begingroup$
    Example: To find $c_{11}$, you multiply the first row of matrix $A$ with the first column of matrix $B$.
    $endgroup$
    – Prahlad Vaidyanathan
    Dec 18 '16 at 10:18










  • $begingroup$
    $c_{ij}$ is the element on $i$-th row and $j$-th column of $C$. Similarly, $a_{ik}$, $b_{kj}$ are elements of matrices $B$ and $C$.
    $endgroup$
    – Peter Franek
    Dec 18 '16 at 10:19










  • $begingroup$
    If you know coding, this is how we multiply two matrices.
    $endgroup$
    – Rohan
    Dec 18 '16 at 10:20
















5












$begingroup$


This is from my textbook:




If $A=(a_{ij})in M_{mn}(Bbb F), B=(b_{ij})in M_{np}(Bbb F)$ then $C=Atimes B=(c_{ij})in M_{mp}(Bbb F)$.
$c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$ where $i=1,...m, j=1,...p$




I know how to multiply matrices but I don't understand this notation : $c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$



Can someone explain what that represents by giving me an example? And how did we get that formula?










share|cite|improve this question









$endgroup$












  • $begingroup$
    Example: To find $c_{11}$, you multiply the first row of matrix $A$ with the first column of matrix $B$.
    $endgroup$
    – Prahlad Vaidyanathan
    Dec 18 '16 at 10:18










  • $begingroup$
    $c_{ij}$ is the element on $i$-th row and $j$-th column of $C$. Similarly, $a_{ik}$, $b_{kj}$ are elements of matrices $B$ and $C$.
    $endgroup$
    – Peter Franek
    Dec 18 '16 at 10:19










  • $begingroup$
    If you know coding, this is how we multiply two matrices.
    $endgroup$
    – Rohan
    Dec 18 '16 at 10:20














5












5








5


2



$begingroup$


This is from my textbook:




If $A=(a_{ij})in M_{mn}(Bbb F), B=(b_{ij})in M_{np}(Bbb F)$ then $C=Atimes B=(c_{ij})in M_{mp}(Bbb F)$.
$c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$ where $i=1,...m, j=1,...p$




I know how to multiply matrices but I don't understand this notation : $c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$



Can someone explain what that represents by giving me an example? And how did we get that formula?










share|cite|improve this question









$endgroup$




This is from my textbook:




If $A=(a_{ij})in M_{mn}(Bbb F), B=(b_{ij})in M_{np}(Bbb F)$ then $C=Atimes B=(c_{ij})in M_{mp}(Bbb F)$.
$c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$ where $i=1,...m, j=1,...p$




I know how to multiply matrices but I don't understand this notation : $c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$



Can someone explain what that represents by giving me an example? And how did we get that formula?







linear-algebra matrices notation






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 18 '16 at 10:16









lmclmc

1,073723




1,073723












  • $begingroup$
    Example: To find $c_{11}$, you multiply the first row of matrix $A$ with the first column of matrix $B$.
    $endgroup$
    – Prahlad Vaidyanathan
    Dec 18 '16 at 10:18










  • $begingroup$
    $c_{ij}$ is the element on $i$-th row and $j$-th column of $C$. Similarly, $a_{ik}$, $b_{kj}$ are elements of matrices $B$ and $C$.
    $endgroup$
    – Peter Franek
    Dec 18 '16 at 10:19










  • $begingroup$
    If you know coding, this is how we multiply two matrices.
    $endgroup$
    – Rohan
    Dec 18 '16 at 10:20


















  • $begingroup$
    Example: To find $c_{11}$, you multiply the first row of matrix $A$ with the first column of matrix $B$.
    $endgroup$
    – Prahlad Vaidyanathan
    Dec 18 '16 at 10:18










  • $begingroup$
    $c_{ij}$ is the element on $i$-th row and $j$-th column of $C$. Similarly, $a_{ik}$, $b_{kj}$ are elements of matrices $B$ and $C$.
    $endgroup$
    – Peter Franek
    Dec 18 '16 at 10:19










  • $begingroup$
    If you know coding, this is how we multiply two matrices.
    $endgroup$
    – Rohan
    Dec 18 '16 at 10:20
















$begingroup$
Example: To find $c_{11}$, you multiply the first row of matrix $A$ with the first column of matrix $B$.
$endgroup$
– Prahlad Vaidyanathan
Dec 18 '16 at 10:18




$begingroup$
Example: To find $c_{11}$, you multiply the first row of matrix $A$ with the first column of matrix $B$.
$endgroup$
– Prahlad Vaidyanathan
Dec 18 '16 at 10:18












$begingroup$
$c_{ij}$ is the element on $i$-th row and $j$-th column of $C$. Similarly, $a_{ik}$, $b_{kj}$ are elements of matrices $B$ and $C$.
$endgroup$
– Peter Franek
Dec 18 '16 at 10:19




$begingroup$
$c_{ij}$ is the element on $i$-th row and $j$-th column of $C$. Similarly, $a_{ik}$, $b_{kj}$ are elements of matrices $B$ and $C$.
$endgroup$
– Peter Franek
Dec 18 '16 at 10:19












$begingroup$
If you know coding, this is how we multiply two matrices.
$endgroup$
– Rohan
Dec 18 '16 at 10:20




$begingroup$
If you know coding, this is how we multiply two matrices.
$endgroup$
– Rohan
Dec 18 '16 at 10:20










2 Answers
2






active

oldest

votes


















10












$begingroup$

Visualisation might help. I'll use your notations and dimensions of the given matrices:




If $A=(a_{ij})in M_{mn}(Bbb F), B=(b_{ij})in M_{np}(Bbb F)$ then $C=Atimes B=(c_{ij})in M_{mp}(Bbb F)$.
$c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$ where $i=1,...m, j=1,...p$




You say you know how to multiply matrices, so take a look at one specific element in the product $C=AB$, namely the element on position $(i,j)$, i.e. in the $i$th row and $j$th column.



To obtain this element, you:




  • first multiply all elements of the $i$th row of the matrix $A$ pairwise with all the elements of the $j$th column of the matrix $B$;

  • and then you add these $n$ products.


You have to repeat this procedure for every element of $C$, but let's zoom in on that one specific (but arbitrary) element on position $(i,j)$ for now:



$$begin{pmatrix}
a_{11} &ldots &a_{1n}\
vdots& ddots &vdots\
color{blue}{mathbf{a_{i1}}} &color{blue}{rightarrow} &color{blue}{mathbf{a_{in}}}\
vdots& ddots &vdots\
a_{m1} &ldots &a_{mn}
end{pmatrix}
cdot
begin{pmatrix}
b_{11}&ldots &color{red}{mathbf{b_{1j}}} &ldots &b_{1p}\
vdots& ddots &color{red}{downarrow} & ddots &vdots\
b_{n1}&ldots &color{red}{mathbf{b_{nj}}}&ldots &b_{np}
end{pmatrix}
=
begin{pmatrix}
c_{11}&ldots& c_{1j} &ldots &c_{1p}\
vdots& ddots & & &vdots\
c_{i1}& & color{purple}{mathbf{c_{ij}}} & &c_{ip}\
vdots& & & ddots &vdots\
c_{m1} &ldots& c_{mj} &ldots &c_{mp}
end{pmatrix}$$

with element $color{purple}{mathbf{c_{ij}}}$ equal to:
$$mathbf{color{purple}{c_{ij}} = color{blue}{a_{i1}} color{red}{b_{1j}} + color{blue}{a_{i2}} color{red}{b_{2j}} + cdots + color{blue}{a_{in}} color{red}{b_{nj}}}$$
Now notice that in the sum above, the left outer index is always $i$ ($i$th row of $A$) and the right outer index is always $j$ ($j$th column of $B$). The inner indices run from $1$ to $n$ so you can introduce a summation index $k$ and write this sum compactly using summation notation:
$$color{purple}{mathbf{c_{ij}}}=sum_{k=1}^{n} color{blue}{mathbf{a_{ik}}}color{red}{mathbf{b_{kj}}}$$
The formule above thus gives you the element on position $(i,j)$ in the product matrix $C=AB$ and therefore completely defines $C$ by letting $i=1,...,m$ and $j=1,...,p$.






Can someone explain what that represents by giving me an example? And how did we get that formula?




The illustration above should give you an idea of the general formula, but here's a concrete example where I took $3 times 3$ matrices for $A$ and $B$ and focus on the element on position $(2,3)$:



$$begin{pmatrix}
a_{11} & a_{12} &a_{13}\
color{blue}{1} &color{blue}{2} &color{blue}{3}\
a_{31} & a_{32} &a_{33}
end{pmatrix}
cdot
begin{pmatrix}
b_{11}&b_{12} &color{red}{6}\
b_{21}&b_{22} &color{red}{5}\
b_{31}&b_{32} &color{red}{4}
end{pmatrix}
=
begin{pmatrix}
c_{11}& c_{12} &c_{13}\
c_{21}& c_{22} &color{purple}{mathbf{c_{23}}}\
c_{31}& c_{32} &c_{33}
end{pmatrix}$$

with element $color{purple}{mathbf{c_{23}}}$ equal to:
$$begin{array}{rccccccc}
color{purple}{c_{23}}
& = & color{blue}{a_{21}} color{red}{b_{13}} &+& color{blue}{a_{22}} color{red}{b_{23}} &+& color{blue}{a_{23}} color{red}{b_{33}}
& = & displaystyle sum_{k=1}^{3} color{blue}{a_{2k}}color{red}{b_{k3}} \
& = & color{blue}{1} cdot color{red}{6} &+& color{blue}{2} cdot color{red}{5} &+& color{blue}{3} cdot color{red}{4} \[8pt]
& = & 6&+&10&+&12 & =& 28
end{array}$$






share|cite|improve this answer











$endgroup$





















    2












    $begingroup$

    As you can see the sum run over $k$ from $1$ to $n$, but after you fix $i,j$. You said that you know how to multiply matrices, so you know that if $C=AB$, then $(i,j)-th$ element $c_{ij}$ is obtained fixing the $i-th$ row of $A$, the $j-th$ column of $B$, and then you multiply the elements $a_{i1}$ with $b_{1j}$, $a_{i2}$ with $b_{2j}$, $dots$, $a_{in}$ with $b_{nj}$, and finally you sum all products. Thus



    $$c_{ij}=sum_{k=1}^n a_{ik}b_{kj}$$






    share|cite|improve this answer









    $endgroup$













      Your Answer





      StackExchange.ifUsing("editor", function () {
      return StackExchange.using("mathjaxEditing", function () {
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      });
      });
      }, "mathjax-editing");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "69"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      noCode: true, onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2063241%2fmatrix-multiplication-notation%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      10












      $begingroup$

      Visualisation might help. I'll use your notations and dimensions of the given matrices:




      If $A=(a_{ij})in M_{mn}(Bbb F), B=(b_{ij})in M_{np}(Bbb F)$ then $C=Atimes B=(c_{ij})in M_{mp}(Bbb F)$.
      $c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$ where $i=1,...m, j=1,...p$




      You say you know how to multiply matrices, so take a look at one specific element in the product $C=AB$, namely the element on position $(i,j)$, i.e. in the $i$th row and $j$th column.



      To obtain this element, you:




      • first multiply all elements of the $i$th row of the matrix $A$ pairwise with all the elements of the $j$th column of the matrix $B$;

      • and then you add these $n$ products.


      You have to repeat this procedure for every element of $C$, but let's zoom in on that one specific (but arbitrary) element on position $(i,j)$ for now:



      $$begin{pmatrix}
      a_{11} &ldots &a_{1n}\
      vdots& ddots &vdots\
      color{blue}{mathbf{a_{i1}}} &color{blue}{rightarrow} &color{blue}{mathbf{a_{in}}}\
      vdots& ddots &vdots\
      a_{m1} &ldots &a_{mn}
      end{pmatrix}
      cdot
      begin{pmatrix}
      b_{11}&ldots &color{red}{mathbf{b_{1j}}} &ldots &b_{1p}\
      vdots& ddots &color{red}{downarrow} & ddots &vdots\
      b_{n1}&ldots &color{red}{mathbf{b_{nj}}}&ldots &b_{np}
      end{pmatrix}
      =
      begin{pmatrix}
      c_{11}&ldots& c_{1j} &ldots &c_{1p}\
      vdots& ddots & & &vdots\
      c_{i1}& & color{purple}{mathbf{c_{ij}}} & &c_{ip}\
      vdots& & & ddots &vdots\
      c_{m1} &ldots& c_{mj} &ldots &c_{mp}
      end{pmatrix}$$

      with element $color{purple}{mathbf{c_{ij}}}$ equal to:
      $$mathbf{color{purple}{c_{ij}} = color{blue}{a_{i1}} color{red}{b_{1j}} + color{blue}{a_{i2}} color{red}{b_{2j}} + cdots + color{blue}{a_{in}} color{red}{b_{nj}}}$$
      Now notice that in the sum above, the left outer index is always $i$ ($i$th row of $A$) and the right outer index is always $j$ ($j$th column of $B$). The inner indices run from $1$ to $n$ so you can introduce a summation index $k$ and write this sum compactly using summation notation:
      $$color{purple}{mathbf{c_{ij}}}=sum_{k=1}^{n} color{blue}{mathbf{a_{ik}}}color{red}{mathbf{b_{kj}}}$$
      The formule above thus gives you the element on position $(i,j)$ in the product matrix $C=AB$ and therefore completely defines $C$ by letting $i=1,...,m$ and $j=1,...,p$.






      Can someone explain what that represents by giving me an example? And how did we get that formula?




      The illustration above should give you an idea of the general formula, but here's a concrete example where I took $3 times 3$ matrices for $A$ and $B$ and focus on the element on position $(2,3)$:



      $$begin{pmatrix}
      a_{11} & a_{12} &a_{13}\
      color{blue}{1} &color{blue}{2} &color{blue}{3}\
      a_{31} & a_{32} &a_{33}
      end{pmatrix}
      cdot
      begin{pmatrix}
      b_{11}&b_{12} &color{red}{6}\
      b_{21}&b_{22} &color{red}{5}\
      b_{31}&b_{32} &color{red}{4}
      end{pmatrix}
      =
      begin{pmatrix}
      c_{11}& c_{12} &c_{13}\
      c_{21}& c_{22} &color{purple}{mathbf{c_{23}}}\
      c_{31}& c_{32} &c_{33}
      end{pmatrix}$$

      with element $color{purple}{mathbf{c_{23}}}$ equal to:
      $$begin{array}{rccccccc}
      color{purple}{c_{23}}
      & = & color{blue}{a_{21}} color{red}{b_{13}} &+& color{blue}{a_{22}} color{red}{b_{23}} &+& color{blue}{a_{23}} color{red}{b_{33}}
      & = & displaystyle sum_{k=1}^{3} color{blue}{a_{2k}}color{red}{b_{k3}} \
      & = & color{blue}{1} cdot color{red}{6} &+& color{blue}{2} cdot color{red}{5} &+& color{blue}{3} cdot color{red}{4} \[8pt]
      & = & 6&+&10&+&12 & =& 28
      end{array}$$






      share|cite|improve this answer











      $endgroup$


















        10












        $begingroup$

        Visualisation might help. I'll use your notations and dimensions of the given matrices:




        If $A=(a_{ij})in M_{mn}(Bbb F), B=(b_{ij})in M_{np}(Bbb F)$ then $C=Atimes B=(c_{ij})in M_{mp}(Bbb F)$.
        $c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$ where $i=1,...m, j=1,...p$




        You say you know how to multiply matrices, so take a look at one specific element in the product $C=AB$, namely the element on position $(i,j)$, i.e. in the $i$th row and $j$th column.



        To obtain this element, you:




        • first multiply all elements of the $i$th row of the matrix $A$ pairwise with all the elements of the $j$th column of the matrix $B$;

        • and then you add these $n$ products.


        You have to repeat this procedure for every element of $C$, but let's zoom in on that one specific (but arbitrary) element on position $(i,j)$ for now:



        $$begin{pmatrix}
        a_{11} &ldots &a_{1n}\
        vdots& ddots &vdots\
        color{blue}{mathbf{a_{i1}}} &color{blue}{rightarrow} &color{blue}{mathbf{a_{in}}}\
        vdots& ddots &vdots\
        a_{m1} &ldots &a_{mn}
        end{pmatrix}
        cdot
        begin{pmatrix}
        b_{11}&ldots &color{red}{mathbf{b_{1j}}} &ldots &b_{1p}\
        vdots& ddots &color{red}{downarrow} & ddots &vdots\
        b_{n1}&ldots &color{red}{mathbf{b_{nj}}}&ldots &b_{np}
        end{pmatrix}
        =
        begin{pmatrix}
        c_{11}&ldots& c_{1j} &ldots &c_{1p}\
        vdots& ddots & & &vdots\
        c_{i1}& & color{purple}{mathbf{c_{ij}}} & &c_{ip}\
        vdots& & & ddots &vdots\
        c_{m1} &ldots& c_{mj} &ldots &c_{mp}
        end{pmatrix}$$

        with element $color{purple}{mathbf{c_{ij}}}$ equal to:
        $$mathbf{color{purple}{c_{ij}} = color{blue}{a_{i1}} color{red}{b_{1j}} + color{blue}{a_{i2}} color{red}{b_{2j}} + cdots + color{blue}{a_{in}} color{red}{b_{nj}}}$$
        Now notice that in the sum above, the left outer index is always $i$ ($i$th row of $A$) and the right outer index is always $j$ ($j$th column of $B$). The inner indices run from $1$ to $n$ so you can introduce a summation index $k$ and write this sum compactly using summation notation:
        $$color{purple}{mathbf{c_{ij}}}=sum_{k=1}^{n} color{blue}{mathbf{a_{ik}}}color{red}{mathbf{b_{kj}}}$$
        The formule above thus gives you the element on position $(i,j)$ in the product matrix $C=AB$ and therefore completely defines $C$ by letting $i=1,...,m$ and $j=1,...,p$.






        Can someone explain what that represents by giving me an example? And how did we get that formula?




        The illustration above should give you an idea of the general formula, but here's a concrete example where I took $3 times 3$ matrices for $A$ and $B$ and focus on the element on position $(2,3)$:



        $$begin{pmatrix}
        a_{11} & a_{12} &a_{13}\
        color{blue}{1} &color{blue}{2} &color{blue}{3}\
        a_{31} & a_{32} &a_{33}
        end{pmatrix}
        cdot
        begin{pmatrix}
        b_{11}&b_{12} &color{red}{6}\
        b_{21}&b_{22} &color{red}{5}\
        b_{31}&b_{32} &color{red}{4}
        end{pmatrix}
        =
        begin{pmatrix}
        c_{11}& c_{12} &c_{13}\
        c_{21}& c_{22} &color{purple}{mathbf{c_{23}}}\
        c_{31}& c_{32} &c_{33}
        end{pmatrix}$$

        with element $color{purple}{mathbf{c_{23}}}$ equal to:
        $$begin{array}{rccccccc}
        color{purple}{c_{23}}
        & = & color{blue}{a_{21}} color{red}{b_{13}} &+& color{blue}{a_{22}} color{red}{b_{23}} &+& color{blue}{a_{23}} color{red}{b_{33}}
        & = & displaystyle sum_{k=1}^{3} color{blue}{a_{2k}}color{red}{b_{k3}} \
        & = & color{blue}{1} cdot color{red}{6} &+& color{blue}{2} cdot color{red}{5} &+& color{blue}{3} cdot color{red}{4} \[8pt]
        & = & 6&+&10&+&12 & =& 28
        end{array}$$






        share|cite|improve this answer











        $endgroup$
















          10












          10








          10





          $begingroup$

          Visualisation might help. I'll use your notations and dimensions of the given matrices:




          If $A=(a_{ij})in M_{mn}(Bbb F), B=(b_{ij})in M_{np}(Bbb F)$ then $C=Atimes B=(c_{ij})in M_{mp}(Bbb F)$.
          $c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$ where $i=1,...m, j=1,...p$




          You say you know how to multiply matrices, so take a look at one specific element in the product $C=AB$, namely the element on position $(i,j)$, i.e. in the $i$th row and $j$th column.



          To obtain this element, you:




          • first multiply all elements of the $i$th row of the matrix $A$ pairwise with all the elements of the $j$th column of the matrix $B$;

          • and then you add these $n$ products.


          You have to repeat this procedure for every element of $C$, but let's zoom in on that one specific (but arbitrary) element on position $(i,j)$ for now:



          $$begin{pmatrix}
          a_{11} &ldots &a_{1n}\
          vdots& ddots &vdots\
          color{blue}{mathbf{a_{i1}}} &color{blue}{rightarrow} &color{blue}{mathbf{a_{in}}}\
          vdots& ddots &vdots\
          a_{m1} &ldots &a_{mn}
          end{pmatrix}
          cdot
          begin{pmatrix}
          b_{11}&ldots &color{red}{mathbf{b_{1j}}} &ldots &b_{1p}\
          vdots& ddots &color{red}{downarrow} & ddots &vdots\
          b_{n1}&ldots &color{red}{mathbf{b_{nj}}}&ldots &b_{np}
          end{pmatrix}
          =
          begin{pmatrix}
          c_{11}&ldots& c_{1j} &ldots &c_{1p}\
          vdots& ddots & & &vdots\
          c_{i1}& & color{purple}{mathbf{c_{ij}}} & &c_{ip}\
          vdots& & & ddots &vdots\
          c_{m1} &ldots& c_{mj} &ldots &c_{mp}
          end{pmatrix}$$

          with element $color{purple}{mathbf{c_{ij}}}$ equal to:
          $$mathbf{color{purple}{c_{ij}} = color{blue}{a_{i1}} color{red}{b_{1j}} + color{blue}{a_{i2}} color{red}{b_{2j}} + cdots + color{blue}{a_{in}} color{red}{b_{nj}}}$$
          Now notice that in the sum above, the left outer index is always $i$ ($i$th row of $A$) and the right outer index is always $j$ ($j$th column of $B$). The inner indices run from $1$ to $n$ so you can introduce a summation index $k$ and write this sum compactly using summation notation:
          $$color{purple}{mathbf{c_{ij}}}=sum_{k=1}^{n} color{blue}{mathbf{a_{ik}}}color{red}{mathbf{b_{kj}}}$$
          The formule above thus gives you the element on position $(i,j)$ in the product matrix $C=AB$ and therefore completely defines $C$ by letting $i=1,...,m$ and $j=1,...,p$.






          Can someone explain what that represents by giving me an example? And how did we get that formula?




          The illustration above should give you an idea of the general formula, but here's a concrete example where I took $3 times 3$ matrices for $A$ and $B$ and focus on the element on position $(2,3)$:



          $$begin{pmatrix}
          a_{11} & a_{12} &a_{13}\
          color{blue}{1} &color{blue}{2} &color{blue}{3}\
          a_{31} & a_{32} &a_{33}
          end{pmatrix}
          cdot
          begin{pmatrix}
          b_{11}&b_{12} &color{red}{6}\
          b_{21}&b_{22} &color{red}{5}\
          b_{31}&b_{32} &color{red}{4}
          end{pmatrix}
          =
          begin{pmatrix}
          c_{11}& c_{12} &c_{13}\
          c_{21}& c_{22} &color{purple}{mathbf{c_{23}}}\
          c_{31}& c_{32} &c_{33}
          end{pmatrix}$$

          with element $color{purple}{mathbf{c_{23}}}$ equal to:
          $$begin{array}{rccccccc}
          color{purple}{c_{23}}
          & = & color{blue}{a_{21}} color{red}{b_{13}} &+& color{blue}{a_{22}} color{red}{b_{23}} &+& color{blue}{a_{23}} color{red}{b_{33}}
          & = & displaystyle sum_{k=1}^{3} color{blue}{a_{2k}}color{red}{b_{k3}} \
          & = & color{blue}{1} cdot color{red}{6} &+& color{blue}{2} cdot color{red}{5} &+& color{blue}{3} cdot color{red}{4} \[8pt]
          & = & 6&+&10&+&12 & =& 28
          end{array}$$






          share|cite|improve this answer











          $endgroup$



          Visualisation might help. I'll use your notations and dimensions of the given matrices:




          If $A=(a_{ij})in M_{mn}(Bbb F), B=(b_{ij})in M_{np}(Bbb F)$ then $C=Atimes B=(c_{ij})in M_{mp}(Bbb F)$.
          $c_{ij}=sum_{k=1}^{n} a_{ik}b_{kj}$ where $i=1,...m, j=1,...p$




          You say you know how to multiply matrices, so take a look at one specific element in the product $C=AB$, namely the element on position $(i,j)$, i.e. in the $i$th row and $j$th column.



          To obtain this element, you:




          • first multiply all elements of the $i$th row of the matrix $A$ pairwise with all the elements of the $j$th column of the matrix $B$;

          • and then you add these $n$ products.


          You have to repeat this procedure for every element of $C$, but let's zoom in on that one specific (but arbitrary) element on position $(i,j)$ for now:



          $$begin{pmatrix}
          a_{11} &ldots &a_{1n}\
          vdots& ddots &vdots\
          color{blue}{mathbf{a_{i1}}} &color{blue}{rightarrow} &color{blue}{mathbf{a_{in}}}\
          vdots& ddots &vdots\
          a_{m1} &ldots &a_{mn}
          end{pmatrix}
          cdot
          begin{pmatrix}
          b_{11}&ldots &color{red}{mathbf{b_{1j}}} &ldots &b_{1p}\
          vdots& ddots &color{red}{downarrow} & ddots &vdots\
          b_{n1}&ldots &color{red}{mathbf{b_{nj}}}&ldots &b_{np}
          end{pmatrix}
          =
          begin{pmatrix}
          c_{11}&ldots& c_{1j} &ldots &c_{1p}\
          vdots& ddots & & &vdots\
          c_{i1}& & color{purple}{mathbf{c_{ij}}} & &c_{ip}\
          vdots& & & ddots &vdots\
          c_{m1} &ldots& c_{mj} &ldots &c_{mp}
          end{pmatrix}$$

          with element $color{purple}{mathbf{c_{ij}}}$ equal to:
          $$mathbf{color{purple}{c_{ij}} = color{blue}{a_{i1}} color{red}{b_{1j}} + color{blue}{a_{i2}} color{red}{b_{2j}} + cdots + color{blue}{a_{in}} color{red}{b_{nj}}}$$
          Now notice that in the sum above, the left outer index is always $i$ ($i$th row of $A$) and the right outer index is always $j$ ($j$th column of $B$). The inner indices run from $1$ to $n$ so you can introduce a summation index $k$ and write this sum compactly using summation notation:
          $$color{purple}{mathbf{c_{ij}}}=sum_{k=1}^{n} color{blue}{mathbf{a_{ik}}}color{red}{mathbf{b_{kj}}}$$
          The formule above thus gives you the element on position $(i,j)$ in the product matrix $C=AB$ and therefore completely defines $C$ by letting $i=1,...,m$ and $j=1,...,p$.






          Can someone explain what that represents by giving me an example? And how did we get that formula?




          The illustration above should give you an idea of the general formula, but here's a concrete example where I took $3 times 3$ matrices for $A$ and $B$ and focus on the element on position $(2,3)$:



          $$begin{pmatrix}
          a_{11} & a_{12} &a_{13}\
          color{blue}{1} &color{blue}{2} &color{blue}{3}\
          a_{31} & a_{32} &a_{33}
          end{pmatrix}
          cdot
          begin{pmatrix}
          b_{11}&b_{12} &color{red}{6}\
          b_{21}&b_{22} &color{red}{5}\
          b_{31}&b_{32} &color{red}{4}
          end{pmatrix}
          =
          begin{pmatrix}
          c_{11}& c_{12} &c_{13}\
          c_{21}& c_{22} &color{purple}{mathbf{c_{23}}}\
          c_{31}& c_{32} &c_{33}
          end{pmatrix}$$

          with element $color{purple}{mathbf{c_{23}}}$ equal to:
          $$begin{array}{rccccccc}
          color{purple}{c_{23}}
          & = & color{blue}{a_{21}} color{red}{b_{13}} &+& color{blue}{a_{22}} color{red}{b_{23}} &+& color{blue}{a_{23}} color{red}{b_{33}}
          & = & displaystyle sum_{k=1}^{3} color{blue}{a_{2k}}color{red}{b_{k3}} \
          & = & color{blue}{1} cdot color{red}{6} &+& color{blue}{2} cdot color{red}{5} &+& color{blue}{3} cdot color{red}{4} \[8pt]
          & = & 6&+&10&+&12 & =& 28
          end{array}$$







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Feb 20 at 8:54

























          answered Dec 18 '16 at 11:15









          StackTDStackTD

          22.9k2152




          22.9k2152























              2












              $begingroup$

              As you can see the sum run over $k$ from $1$ to $n$, but after you fix $i,j$. You said that you know how to multiply matrices, so you know that if $C=AB$, then $(i,j)-th$ element $c_{ij}$ is obtained fixing the $i-th$ row of $A$, the $j-th$ column of $B$, and then you multiply the elements $a_{i1}$ with $b_{1j}$, $a_{i2}$ with $b_{2j}$, $dots$, $a_{in}$ with $b_{nj}$, and finally you sum all products. Thus



              $$c_{ij}=sum_{k=1}^n a_{ik}b_{kj}$$






              share|cite|improve this answer









              $endgroup$


















                2












                $begingroup$

                As you can see the sum run over $k$ from $1$ to $n$, but after you fix $i,j$. You said that you know how to multiply matrices, so you know that if $C=AB$, then $(i,j)-th$ element $c_{ij}$ is obtained fixing the $i-th$ row of $A$, the $j-th$ column of $B$, and then you multiply the elements $a_{i1}$ with $b_{1j}$, $a_{i2}$ with $b_{2j}$, $dots$, $a_{in}$ with $b_{nj}$, and finally you sum all products. Thus



                $$c_{ij}=sum_{k=1}^n a_{ik}b_{kj}$$






                share|cite|improve this answer









                $endgroup$
















                  2












                  2








                  2





                  $begingroup$

                  As you can see the sum run over $k$ from $1$ to $n$, but after you fix $i,j$. You said that you know how to multiply matrices, so you know that if $C=AB$, then $(i,j)-th$ element $c_{ij}$ is obtained fixing the $i-th$ row of $A$, the $j-th$ column of $B$, and then you multiply the elements $a_{i1}$ with $b_{1j}$, $a_{i2}$ with $b_{2j}$, $dots$, $a_{in}$ with $b_{nj}$, and finally you sum all products. Thus



                  $$c_{ij}=sum_{k=1}^n a_{ik}b_{kj}$$






                  share|cite|improve this answer









                  $endgroup$



                  As you can see the sum run over $k$ from $1$ to $n$, but after you fix $i,j$. You said that you know how to multiply matrices, so you know that if $C=AB$, then $(i,j)-th$ element $c_{ij}$ is obtained fixing the $i-th$ row of $A$, the $j-th$ column of $B$, and then you multiply the elements $a_{i1}$ with $b_{1j}$, $a_{i2}$ with $b_{2j}$, $dots$, $a_{in}$ with $b_{nj}$, and finally you sum all products. Thus



                  $$c_{ij}=sum_{k=1}^n a_{ik}b_{kj}$$







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Dec 18 '16 at 10:27









                  InsideOutInsideOut

                  5,12431034




                  5,12431034






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Mathematics Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      Use MathJax to format equations. MathJax reference.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2063241%2fmatrix-multiplication-notation%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      MongoDB - Not Authorized To Execute Command

                      How to fix TextFormField cause rebuild widget in Flutter

                      in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith