2

Background

  • $A$ is a matrix
  • $B$ is a matrix
  • $\bf{x}$ is a vector

Question:

Does $(AB)\bf{x}$ $=$ $A(B \bf{x})$ ?

  • This is the property of associativity, not commutativity. – Edward Evans Apr 11 '16 at 02:35
  • Matrix multiplication is associative, so you can do the operations in whatever order you want (different ways may have different number of operations, depending on what you are trying to do). – copper.hat Apr 11 '16 at 02:36
  • 1
    Changed the question. – jackzellweger Apr 11 '16 at 02:37
  • In case there's any more confusion regarding the associativity and commutativity properties of matrix multiplication; while matrix multiplication is associative, it is not commutative in general. That is, you may find two matrices that commute but this is not the case for all matrices. – Edward Evans Apr 11 '16 at 02:40

1 Answers1

1

The equality does hold. $$\left(\left(\begin{matrix} a_{11} & \cdots & a_{1n}\\ \vdots & \ddots & \vdots\\ a_{n1} & \cdots & a_{nn}\end{matrix}\right) \left(\begin{matrix} b_{11} & \cdots & b_{1n}\\ \vdots & \ddots & \vdots\\ b_{n1} & \cdots & b_{nn}\end{matrix}\right) \right) \left(\begin{matrix} x_1\\ \vdots\\ x_n\end{matrix}\right) $$

$$=\left(\begin{matrix} \sum_{i=1}^n a_{1i}b_{i1} & \cdots & \sum_{i=1}^n a_{1i}b_{in}\\ \vdots & \ddots & \vdots\\ \sum_{i=1}^n a_{ni}b_{i1} & \cdots & \sum_{i=1}^n a_{ni}b_{in}\end{matrix}\right) \left(\begin{matrix} x_1\\ \vdots\\ x_n\end{matrix}\right) $$

$$ =\left(\begin{matrix} \sum_{j=1}^n x_j\sum_{i=1}^n a_{1i}b_{ij}\\ \vdots\\ \sum_{j=1}^n x_j\sum_{i=1}^n a_{ni}b_{ij}\\\end{matrix}\right) $$

$$ =\left(\begin{matrix} \sum_{j=1}^n \sum_{i=1}^n x_ja_{1i}b_{ij}\\ \vdots\\ \sum_{j=1}^n \sum_{i=1}^n x_ja_{ni}b_{ij}\\\end{matrix}\right) $$

$$\left(\begin{matrix} a_{11} & \cdots & a_{1n}\\ \vdots & \ddots & \vdots\\ a_{n1} & \cdots & a_{nn}\end{matrix}\right) \left(\left(\begin{matrix} b_{11} & \cdots & b_{1n}\\ \vdots & \ddots & \vdots\\ b_{n1} & \cdots & b_{nn}\end{matrix}\right) \left(\begin{matrix} x_1\\ \vdots\\ x_n\end{matrix}\right)\right) $$

$$=\left(\begin{matrix} a_{11} & \cdots & a_{1n}\\ \vdots & \ddots & \vdots\\ a_{n1} & \cdots & a_{nn}\end{matrix}\right) \left(\begin{matrix} \sum_{i=1}^nb_{1i}x_i\\ \vdots\\ \sum_{i=1}^nb_{ni}x_i\end{matrix}\right) $$

$$=\left(\begin{matrix} \sum_{j=1}^na_{1j}\sum_{i=1}^nb_{ji}x_i\\ \vdots\\ \sum_{j=1}^na_{nj}\sum_{i=1}^nb_{ji}x_i\end{matrix}\right) $$

$$=\left(\begin{matrix} \sum_{j=1}^n\sum_{i=1}^na_{1j}b_{ji}x_i\\ \vdots\\ \sum_{j=1}^n\sum_{i=1}^na_{nj}b_{ji}x_i\end{matrix}\right) $$

The variables $i$ and $j$ in the sum are dummy variables. Therefore, we can interchange them to see that the two results are the same.

Plutoro
  • 22,730
  • 3
  • 41
  • 71