Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion preliminaries/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ slides: true
<img src="00.Preliminaries.key-stage-0055anim0.svg" data-images="00.Preliminaries.key-stage-0055anim0.svg,00.Preliminaries.key-stage-0055anim1.svg,00.Preliminaries.key-stage-0055anim2.svg,00.Preliminaries.key-stage-0055anim3.svg,00.Preliminaries.key-stage-0055anim4.svg,00.Preliminaries.key-stage-0055anim5.svg,00.Preliminaries.key-stage-0055anim6.svg" class="slide-image" />

<figcaption>
<p >Another way to define matrix multiplication is as <strong>the sum of outer products</strong>. This is less intuitive, but it's sometimes useful in analyses.<br></p><p >The outer product is what happens when we multiply a column vector with a row vector (the opposite of a dot product, which is also called an<em> inner </em>product). The result is a matrix where element i, j is the product of <span class="blue">a</span><sub>i</sub> and <span>b</span><sub>j</sub>. <br></p><aside >The outer product essentially arranges all ways of multiplying one element of <strong class="blue">a</strong> with one element of <strong>b</strong> in a grid.<br></aside><p >The relevance to matrix multiplication is that we can also write the matrix multiplication <strong class="blue">A</strong><strong>B</strong> as the sum of all outer products of one column of <strong class="blue">A</strong> with the corresponding row of <strong>B</strong>.<br></p><p >If we denote the k-th column of <strong class="blue">A</strong> as <span class="blue">A</span><sub>·k</sub> and the k-th row of <strong>B</strong> as <span>B</span><sub>k·</sub>, then we get the definition on the right for matrix multiplication based on outer products. The lines below that are a short proof that it's equivalent to the dot product definition. Try to follow this proof, it’s good practice in getting comfortable with manipulating matrix indices, which will become important later on.<br></p><aside >In the first like we fill in the outer product definition of matrix multiplication. In the second we note that when we sum a series of matrices element-wise the element i, j of the result is the sum of the elements i, j of each term. Finally we use the definition of the outer product; the element i, j of the resulting matrix is the i-th element of the first vector times the j-th element of the second.</aside><aside ></aside>
<p >Another way to define matrix multiplication is as <strong>the sum of outer products</strong>. This is less intuitive, but it's sometimes useful in analyses.<br></p><p >The outer product is what happens when we multiply a column vector with a row vector (the opposite of a dot product, which is also called an<em> inner </em>product). The result is a matrix where element i, j is the product of <span class="blue">a</span><sub>i</sub> and <span>b</span><sub>j</sub>. <br></p><aside >The outer product essentially arranges all ways of multiplying one element of <strong class="blue">a</strong> with one element of <strong>b</strong> in a grid.<br></aside><p >The relevance to matrix multiplication is that we can also write the matrix multiplication <strong class="blue">A</strong><strong>B</strong> as the sum of all outer products of one column of <strong class="blue">A</strong> with the corresponding row of <strong>B</strong>.<br></p><p >If we denote the k-th column of <strong class="blue">A</strong> as <span class="blue">A</span><sub>·k</sub> and the k-th row of <strong>B</strong> as <span>B</span><sub>k·</sub>, then we get the definition on the right for matrix multiplication based on outer products. The lines below that are a short proof that it's equivalent to the dot product definition. Try to follow this proof, it’s good practice in getting comfortable with manipulating matrix indices, which will become important later on.<br></p><aside >In the first line we fill in the outer product definition of matrix multiplication. In the second we note that when we sum a series of matrices element-wise the element i, j of the result is the sum of the elements i, j of each term. Finally we use the definition of the outer product; the element i, j of the resulting matrix is the i-th element of the first vector times the j-th element of the second.</aside><aside ></aside>
</figcaption>
<span class="hint">click image for animation</span>
</section>
Expand Down