Difference between revisions of "Multiplication of matrices"
From Robotics
Line 1: | Line 1: | ||
{{Navigation|before=[[Addition of matrices]]|overview=[[Matrices]]|next=[[Matrix inversion]]}} | {{Navigation|before=[[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 <math>\mathbf{A}=(a_{ij})_{i=1...l,j=1...m}</math> with an m-by-n matrix <math>\mathbf{B}=(b_{ij})_{i=1...m,j=1...n}</math> is an l-by-n matrix <math>\mathbf{C}=(c_{ij})_{i=1...l,j=1...n}</math>. The components of the resulting matrix are comuputed as follows: | + | 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 <math>\mathbf{A}=(a_{ij})_{i=1...l,j=1...m}</math> with an m-by-n matrix <math>\mathbf{B}=(b_{ij})_{i=1...m,j=1...n}</math> is an l-by-n matrix <math>\mathbf{C}=(c_{ij})_{i=1...l,j=1...n}</math>. The components of the resulting matrix are comuputed as follows:<br/> |
:<math> | :<math> | ||
c_{ij}=\sum^{m}_{k=1}a_{ik}\cdot b_{kj} | c_{ij}=\sum^{m}_{k=1}a_{ik}\cdot b_{kj} | ||
</math> | </math> | ||
− | 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: | + | 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:<br/> |
:<math> | :<math> | ||
\mathbf{A}\cdot\mathbf{B}= | \mathbf{A}\cdot\mathbf{B}= | ||
Line 22: | Line 22: | ||
\end{array}\right] | \end{array}\right] | ||
</math> | </math> | ||
+ | Some further rules for matrix multiplications are:<br/> | ||
+ | :<math>\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{A}\cdot\mathbf{C}) \\ | ||
+ | (\mathbf{A}+\mathbf{B})\cdot\mathbf{C}&=\mathbf{A}\cdot\mathbf{C}+\mathbf{B}\cdot\mathbf{C} \\ | ||
+ | |||
+ | \end{align}</math> |
Revision as of 14:35, 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 with an m-by-n matrix is an l-by-n matrix . The components of the resulting matrix are comuputed as follows:
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:
Some further rules for matrix multiplications are: