# Fast(est) and intuitive ways to look at matrix multiplication?

Most of the time I see matrix multiplication presented and defined, as a seemingly arbitrary sequence of operations. For example, the textbook I'm currently reading for a linear algebra course defines the product $AB$ as the $(i, j)$ entry in the $1 \times 1$ matrix that is the product of the ith row of $A$ and the jth column of $B$. Properties of matrix multiplication are subsequently proven based upon this definition. The definition is clear, but why the matrix product is useful is not clear to me as a student. A different textbook I'm referencing defines the product $AB$ in terms of linear combinations.

The problem I have is doing matrix multiplication quickly by hand, particularly when the $A$ is $p \times 1$ and $B$ is $1 \times q$. I would like to know of how to look at or define matrix multiplication, in a manner which makes it easy (for the average student) to compute by hand, while being intuitive and consistent for use for later proofs.

wikipedia has a great article.

-

1
– Ben Millwood Sep 8 '12 at 18:52
$A= \left( \begin{matrix} a_{11}&a_{12}&a_{13} \\a_{21}&a_{22}&a_{23} \\a_{31}&a_{32}&a_{33} \end{matrix} \right)$ – T. Webster Apr 27 at 4:53

## 5 Answers

In general, let $A$ be $m\times n$ and let $B$ be $n\times l$. Let $A_i=(a_{i1},a_{i2},\dots,a_{in})$ be the $i$th row of $A$, $1\leq i\leq m$ and let $B_j=(b_{1j},b_{2j},\dots,b_{nj})$ be the $j$th column of $B$, $1\leq j \leq l$. Given a row vector $\overline x=(x_1,x_2,\dots,x_n)$ and a row vector $\overline y =(y_1;y_2;\dots;y_n)$, define $$\overline x\cdot \overline y=\sum_{i=1}^n x_iy_i$$

Then we can define $$A\cdot B$$ as the matrix who has as entries $$(AB)_{ij}=A_iB_j=\sum_{k=1}^n a_{ki}b_{jk}$$

where we interpret each row and column as a row vector and column vector respectively.

You can write it as $$A\cdot B=\left( \begin{matrix} A_1B_1&A_1B_2&\cdots&A_1B_l\\ A_2B_1&A_2B_2&\cdots&A_2B_l \\\vdots&{}&{}&\vdots \\A_mB_1&A_mB_2&\dots&A_mB_l\end{matrix} \right)$$

-

Perhaps the best way to look at matrix multiplication when you want to compute a product by hand is as follows:

When you're computing by hand, just bump the second matrix up to make room for the product in the lower-right corner.

Note that the upper-left corner must be a square, which re-confirms the requirement that "columns of $A$" = "rows of $B$"; moreover, you can see that $A\times B$ inherits its row dimension from $A$ and its column dimension from $B$.

-

Matrix multiplication is defined as it is so that is reflects the composition of linear maps. No more, no less.

-

This is the reason why matrix multiplication is defined this way. – Fernando Martin Sep 14 '12 at 4:06

It's important to understand how to multiply $AB$ by recognizing that each column of $AB$ is a linear combination of columns of $A$ with the corresponding column of $B$ telling you which particular linear combination; similarly each row of $AB$ is a linear combination of the rows of $B$ with the corresponding row of $A$ telling you which particular linear combination.

This is covered in any reasonable text on linear algebra. This perspective is both helpful for doing concrete calculations by hand as well as for understanding matrices theoretically. In particular, this interpretation of matrix multiplication is very handy for understanding Gaussian elimination and for studying the rank of a matrix.

-

1
Thats my favorite method. The great thing is that when the numbers are reasonable, I am able to compute a whole row at "once" instead of advancing by single numbers. – Honza Brabec Sep 8 '12 at 20:18

Just remember that each ij-th entry in AB (where i signifies the row of AB and j signifies the column in AB) is equal to the the dot product of the ith row of A and the jth row of B.

Another trick is to visualize turning the jth column of B and aligning it with the ith row of A, multiplying each entry, and then adding it up.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 37, "mathjax_display_tex": 4, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9417718648910522, "perplexity_flag": "head"}