My answer to a question on Quora: **Is there a reason matrix multiplication is defined as row times column and not row times row?**

Let us look at a basic (and real life) example of matrix multiplication: a matrix made of a single row is multiplied by a matrix made of a single column. This example is calculation of the cost of purchase of some amounts \(g_1,g_2, g_3\) of some goods (say, apples, bananas, and oranges) at prices \(p_1,p_2, p_3\) of pounds (of sterling) per kilogram. The answer is well known:

\(\displaystyle{p_1g_1 + p_2 g_2 +p_3g_3 = \sum_{i=1}^3 p_ig_i},\)

which could be conveniently written as a matrix product:

\(\displaystyle{p_1g_1 + p_2 g_2 +p_3g_3 = \left[\begin{array}{ccc} p_1 & p_2 & p_3\end{array}\right]\cdot \left[\begin{array}{c} g_1\\ g_2 \\g_3 \end{array}\right]}.\)

The “row by column” rule of multiplication of matrices conveniently emphasises the fundamental fact that the row vector of fruits and the column vector of prices **belong to different vector spaces**. For example, they cannot be added — you do not add fruits and prices.

The “row by column rule” is a convenient symbolical expression of a construction know in linear algebra as paring of vector spaces, see Dual pair – Wikipedia. Actually, in this fruit bowl example, it would be natural to take one step further and use upper and lower indices in the notation,

\(p_1g^1 + p_2 g^2 +p_3g^3 = \left[\begin{array}{ccc} p_1 & p_2 & p_3\end{array}\right]\cdot \left[\begin{array}{c} g^1\\ g^2 \\g^3 \end{array}\right].\)

There are deep algebraic reasons for writing matrix products the way this is done, but I do not wish to go into pretty abstract stuff and prefer to limit myself to the most elementary justification known to me.