Difference between revisions of "Matrix multiplication"
m |
m |
||
| Line 1: | Line 1: | ||
| + | While matrix addition usually does not present motivational challenges (addition is defined in a straight-forward component-wise way), to introduce matrix multiplication it is desirable to explain why we do not use component-wise approach. Of course, the "most appropriate" way to explain the formula for matrix multiplication is via composition of linear transformation. However, matrices (and matrix operations) are usually introduced before the linear transformations, and, additionally, linear transformation require a higher level of abstraction. Below we present several alternative approaches. | ||
| + | |||
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 19: | Line 21: | ||
223.2 & 279 & 0 | 223.2 & 279 & 0 | ||
\end{bmatrix}</math> | \end{bmatrix}</math> | ||
| + | |||
| + | Next, we present two examples that can be used to introduce matrix multiplication. | ||
| + | |||
| + | Cost comparison | ||
| + | |||
| + | |||
| + | |||
| + | System of linear equations | ||
Revision as of 21:31, 27 November 2021
While matrix addition usually does not present motivational challenges (addition is defined in a straight-forward component-wise way), to introduce matrix multiplication it is desirable to explain why we do not use component-wise approach. Of course, the "most appropriate" way to explain the formula for matrix multiplication is via composition of linear transformation. However, matrices (and matrix operations) are usually introduced before the linear transformations, and, additionally, linear transformation require a higher level of abstraction. Below we present several alternative approaches.
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 \cdot 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 & 210.8 & 223.2 \\ 210.8 & 0 & 279 \\ 223.2 & 279 & 0 \end{bmatrix} }[/math]
Next, we present two examples that can be used to introduce matrix multiplication.
Cost comparison
System of linear equations
