Difference between revisions of "Multiplication of matrices"

From Robotics
Jump to: navigation, search
Line 28: Line 28:
 
(\mathbf{A}+\mathbf{B})\cdot\mathbf{C}&=\mathbf{A}\cdot\mathbf{C}+\mathbf{B}\cdot\mathbf{C} &\text{for all l-by-m matrices } \mathbf{A},\mathbf{B} \text{ and m-by-n matrices } \mathbf{C}\\  
 
(\mathbf{A}+\mathbf{B})\cdot\mathbf{C}&=\mathbf{A}\cdot\mathbf{C}+\mathbf{B}\cdot\mathbf{C} &\text{for all l-by-m matrices } \mathbf{A},\mathbf{B} \text{ and m-by-n matrices } \mathbf{C}\\  
 
\mathbf{A}\cdot(\mathbf{B})+\mathbf{C})&=\mathbf{A}\cdot\mathbf{B}+\mathbf{A}\cdot\mathbf{C} &\text{for all l-by-m matrices } \mathbf{A} \text{ and m-by-n matrices }\mathbf{B},\mathbf{C}
 
\mathbf{A}\cdot(\mathbf{B})+\mathbf{C})&=\mathbf{A}\cdot\mathbf{B}+\mathbf{A}\cdot\mathbf{C} &\text{for all l-by-m matrices } \mathbf{A} \text{ and m-by-n matrices }\mathbf{B},\mathbf{C}
\end{align}</math>
+
\end{align}</math><br/>
  
 
{{Example
 
{{Example
 
|Title=Multiplication of several matrices
 
|Title=Multiplication of several matrices
|Contents=<br/>
+
|Contents=
 
A good example for the multiplication of several matrices in the context of robotics and transformations is presented in the robotics script. Please have a look in chapter 3 on page 3-35  
 
A good example for the multiplication of several matrices in the context of robotics and transformations is presented in the robotics script. Please have a look in chapter 3 on page 3-35  
 
}}
 
}}

Revision as of 14:45, 16 May 2014

← Back: Addition of matrices Overview: Matrices Next: Matrix inversion

Two matrices can be multiplied if the number of colums of the left matrix equals the number of rows of the right matrix. The result of the multiplication of an l-by-m matrix \mathbf{A}=(a_{ij})_{i=1...l,j=1...m} with an m-by-n matrix \mathbf{B}=(b_{ij})_{i=1...m,j=1...n} is an l-by-n matrix \mathbf{C}=(c_{ij})_{i=1...l,j=1...n}. The components of the resulting matrix are comuputed as follows:


c_{ij}=\sum^{m}_{k=1}a_{ik}\cdot b_{kj}

For example the multiplication of a 2-by-3 matrix with a 3-by-2 matrix results in a 2-by-2 matrix and is computed as follows:


\mathbf{A}\cdot\mathbf{B}=
  \left[\begin{array}{ccc}
    a_{11} & a_{12} & a_{13} \\
    a_{21} & a_{22} & a_{23} 
  \end{array}\right]\cdot
  \left[\begin{array}{cc}
    b_{11} & b_{12} \\
    b_{21} & b_{22}\\
    b_{31} & b_{32}
  \end{array}\right]=
  \left[\begin{array}{cc}
    a_{11}\cdot b_{11}+a_{12}\cdot b_{21}+a_{13}\cdot b_{31} & a_{11}\cdot b_{12}+a_{12}\cdot b_{22}+a_{13}\cdot b_{12} \\
    a_{21}\cdot b_{11}+a_{22}\cdot b_{21}+a_{23}\cdot b_{31} & a_{21}\cdot b_{12}+a_{22}\cdot b_{22}+a_{23}\cdot b_{12}
  \end{array}\right]

Some further rules for matrix multiplications are:

\begin{align}
\mathbf{A}\cdot\mathbf{B}&\ne\mathbf{B}\cdot\mathbf{A} \\
(\mathbf{A}\cdot\mathbf{B})\cdot\mathbf{C}&=\mathbf{A}\cdot(\mathbf{B}\cdot\mathbf{C}) \\
(\mathbf{A}+\mathbf{B})\cdot\mathbf{C}&=\mathbf{A}\cdot\mathbf{C}+\mathbf{B}\cdot\mathbf{C} &\text{for all l-by-m matrices } \mathbf{A},\mathbf{B} \text{ and m-by-n matrices } \mathbf{C}\\ 
\mathbf{A}\cdot(\mathbf{B})+\mathbf{C})&=\mathbf{A}\cdot\mathbf{B}+\mathbf{A}\cdot\mathbf{C} &\text{for all l-by-m matrices } \mathbf{A} \text{ and m-by-n matrices }\mathbf{B},\mathbf{C}
\end{align}
Example: Multiplication of several matrices

A good example for the multiplication of several matrices in the context of robotics and transformations is presented in the robotics script. Please have a look in chapter 3 on page 3-35