Difference between revisions of "Matrix multiplication"

From MathTank
Jump to navigation Jump to search
m
m
Line 25: Line 25:
  
 
Cost comparison
 
Cost comparison
[[File:Cost matrix.png|alt=Cost matrix|thumb|Cost matrix]]
+
[[File:Cost matrix.png|alt=Cost matrix|thumb|Price matrix]]
  
 
Alice and Bob need to buy some apples and pears. Alice needs 2 kg of apples and 5 kg of pears. Bob needs  
 
Alice and Bob need to buy some apples and pears. Alice needs 2 kg of apples and 5 kg of pears. Bob needs  

Revision as of 22:06, 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:

Distance matrix
Distance matrix

[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

Cost matrix
Price matrix

Alice and Bob need to buy some apples and pears. Alice needs 2 kg of apples and 5 kg of pears. Bob needs

Weight matrix
Weight matrix

System of linear equations