TITLE: How many geometrical interpretations does matrix multiplication have?
QUESTION [8 upvotes]: I am wondering that what is the geometrical interpertation of matrix multiplication. And how many different ways it could be interpreted? The one obvious use is the transformations... I understand a bit in 3D but how about the n-dimensional multiplication --- what kind of transformations would be there?
So, what I want to know is:
1. How can we interpret matrix multiplication?
2. In how many ways do we interpret?
3. How actually coefficients play role in transformations
4. How to interpret more than 3D matrix multiplications
Thanks a lot.

REPLY [6 votes]: In order to have a geometrical understanding of matrix multiplication, we must first establish a reasonable geometric understanding of matrices themselves. We do this by representing points in space as column vectors (how to do this is in itself somewhat subtle, but I'm going to skimp on the details for brevity) and then using matrices to represent transformations of column vectors, which I'm going to write as rows $(x_1,x_2,\dots,x_n)$ for convenience.
For some $m \times n$ matrix $A$, and a column vector $\mathbf x = (x_1, x_2, \dots, x_n)$, let's define the transformation $f_A(\mathbf x)=\mathbf y = (y_1, \dots,y_m)$ by $y_i = \sum_{j = 0}^n A_{ij} x_j$.
Now suppose $A$ is a $m \times n$ matrix and $B$ is a $n \times p$ matrix, and they have corresponding functions on column vectors $f_A$ and $f_B$. Notice that $f_B$ outputs vectors with $n$ components, and $f_A$ takes vectors of $n$ components as input: we might ask what happens if we put the output of $f_B$ into the input of $f_A$. Let $\mathbf v = (v_1,\dots,v_p)$, and write things like $f_B(\mathbf v)_j$ to mean "the $j^\mathrm{th}$ component of $f_B(\mathbf v)$". Then:
\begin{align*}
f_A(f_B(\mathbf v))_i
  &= \sum_{j=0}^n A_{ij} f_B(\mathbf v)_j \\
  &= \sum_{j=0}^n A_{ij} \sum_{k=0}^p B_{jk} v_k \\
  &= \sum_{k=0}^p \sum_{j=0}^n A_{ij} B_{jk} v_k \\
  &= \sum_{k=0}^p (AB)_{ik}v_k \\
  &= f_{AB}(\mathbf v)
\end{align*}
where we define the matrix multiplication $AB$ as the $m\times p$ matrix given by $(AB)_{ik} = \sum_{j=0}^n A_{ij} B_{jk}$.
So when we associate functions with matrices in the way I described above, matrix multiplication of $A$ and $B$ gives the matrix whose function is the function of $B$ followed by the function of $A$. Note that in order for this to make sense, the input of $A$ has to be the same size as the output of $B$, and so the width of $A$ has to be equal to the height of $B$, which is exactly the condition for matrix multiplication to make sense.
{"set_name": "stack_exchange", "score": 8, "question_id": 131889}