Today in math class I got bored so I started looking up what matrices are used for in math, and I clicked on a pretty beginner article on operations one can do to matrices, including adding, subtracting, multiplying by one variable, and multiplying matrices by other matrices. From what I learned about multiplying matrices by other matrices, you can simplify it like this:
$$\begin{pmatrix} a&b \\\ c&d \end{pmatrix} \times \begin{pmatrix} e&f\\\ g&h \end{pmatrix} =\begin{pmatrix} (ae+bg) & (af+bh) \\\ (ce+dg) & (cf+dh)\end{pmatrix}$$
Why is this able to work and how does it actually work? Also, is there a simpler way/pattern to remember when to add and when to multiply the numbers instead of just memorizing?
-
1https://en.wikipedia.org/wiki/Matrix_multiplication has diagrams and explanations. – Martin R Dec 10 '21 at 16:09
-
I recommend also various youtube videos on the subject... Herb Gross's "Calculus Revisited" series does a good job of motivating the usefulness of matrix multiplication and PatrickJMT does a good job of handholding and explaining slowly the process. – JMoravitz Dec 10 '21 at 16:14
-
"Why is this able to work"... It works because we defined it in such a way that it works. Recall that in the development of mathematics we almost always have a problem we want to solve first and some intuition as to what it should be in the end and we invent notation, operations, and definitions such that those help us in solving those problems. Matrix multiplication is defined the way it is so as to give the expected result when compared to having composed their corresponding linear mappings they represent. The definitions are what they are for good reason, they aren't out of nowhere – JMoravitz Dec 10 '21 at 16:18
1 Answers
When multiplying, don't think of matrices as grids of numbers, think of the left matrix as a set of rows and the right matrix as a set of columns. Then you multiply rows on the left by columns on the right. How do you multiply a row and a column? You multiply corresponding elements then add
e.g $\left( \begin{matrix} 2 & 1 & -1 \\ \end{matrix} \right)\left( \begin{matrix} 3 \\ 2 \\ 1 \\ \end{matrix} \right)=2(3)+1(2)+(-1)(1)=7$
Note that this only makes sense if a row of the left matrix is the same size as a column of the right matrix. Where do these row times columns go? The product matrix will have as many rows as the left matrix (you are multiplying rows) and as many columns as the right matrix. The number in the second row and first column of the answer, for example, will be the product of the second row and the first column. Similarly for all the other entries in the product matrix.
- 1,482