Difference between revisions of "Matrix multiplication"
m |
m |
||
| Line 1: | Line 1: | ||
| − | We start with a simple example showing a practical use of multiplying a matrix by numbers (scalars). Below is an example of a distance matrix between three cities in kilometers: | + | We start with a simple example showing a practical use of multiplying a matrix by numbers (scalars). Below is an example of a distance matrix between three cities, in kilometers: |
[[File:Distance matrix.png|alt=Distance matrix|thumb|Distance matrix]] | [[File:Distance matrix.png|alt=Distance matrix|thumb|Distance matrix]] | ||
| Line 6: | Line 6: | ||
340 & 0 & 450 \\ | 340 & 0 & 450 \\ | ||
360 & 450 & 360 | 360 & 450 & 360 | ||
| − | \end{bmatrix} | + | \end{bmatrix}</math> |
We can multiply this matrix by <math> 0.62 </math> to (approximately) convert it to distances in miles: | We can multiply this matrix by <math> 0.62 </math> to (approximately) convert it to distances in miles: | ||
Revision as of 21:20, 27 November 2021
We start with a simple example showing a practical use of multiplying a matrix by numbers (scalars). Below is an example of a distance matrix between three cities, in kilometers:
[math]\displaystyle{ A =\begin{bmatrix} 0 & 340 & 360 \\ 340 & 0 & 450 \\ 360 & 450 & 360 \end{bmatrix} }[/math]
We can multiply this matrix by [math]\displaystyle{ 0.62 }[/math] to (approximately) convert it to distances in miles:
[math]\displaystyle{ B =0.62\cdot A \begin{bmatrix} 0.62 \cdot 0 & 0.62\cdot 340 & 0.62 \dot 360 \\ 0.62 \cdot 340 & 0.62\cdot 0 & 0.62\cdot 450 \\ 0.62 \cdot 360 & 0.62\cdot 450 & 0.62\cdot 360 \end{bmatrix} = \begin{bmatrix} 0.62 \cdot 0 & 0.62\cdot 340 & 0.62 \dot 360 \\ 0.62 \cdot 340 & 0.62\cdot 0 & 0.62\cdot 450 \\ 0.62 \cdot 360 & 0.62\cdot 450 & 0.62\cdot 360 \end{bmatrix} }[/math]
