Difference between revisions of "Multiplication of matrices"
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><br/> | + | \end{align}</math><br/><br/> |
{{Example | {{Example | ||
− | |Title=Multiplication of | + | |Title=Multiplication of matrices |
|Contents= | |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 | ||
Line 37: | Line 37: | ||
===Multiplication of matrices with vectors=== | ===Multiplication of matrices with vectors=== | ||
− | A vector is a special form of a matrix. | + | A vector is a just special form of a matrix with either only one row or one column. Because an l-by-m matrix can only be multiplied by an m-by-n matrix, there are two possibilities of multiplying matrices and vectors. The first possibility is a 1-by-m row vector multiplied with an m-by-n matrix which results in a 1-by-n row vector:<br/> |
+ | :<math> | ||
+ | \left[\begin{array}{ccc} | ||
+ | v_{11} & \dots & v_{1m} | ||
+ | \end{array}\right] | ||
+ | \cdot | ||
+ | \left[\begin{array}{ccc} | ||
+ | a_{11} & \dots & a_{1n}\\ | ||
+ | \vdots & \ddots & \vdots\\ | ||
+ | a_{m1} & \dots & a_{mn} | ||
+ | \end{array}\right] | ||
+ | = | ||
+ | \left[\begin{array}{ccc} | ||
+ | v_{11}a_{11}+\dots+v_{1m}a_{m1} & \dots & v_{11}a_{1n}+\dots+v_{1m}a_{mn} | ||
+ | \end{array}\right] | ||
+ | </math> | ||
+ | The second possibility is a l-by-m matrix multiplied with an m-by-1 column vector which results in a l-by-1 column vector:<br/> | ||
+ | :<math> | ||
+ | \left[\begin{array}{ccc} | ||
+ | a_{11} & \dots & a_{1m}\\ | ||
+ | \vdots & \ddots & \vdots\\ | ||
+ | a_{l1} & \dots & a_{lm} | ||
+ | \end{array}\right] | ||
+ | \cdot | ||
+ | \left[\begin{array}{c} | ||
+ | v_{11}\\ | ||
+ | \vdots \\ | ||
+ | v_{m1} | ||
+ | \end{array}\right] | ||
+ | = | ||
+ | \left[\begin{array}{c} | ||
+ | a_{11}v_{11}+\dots+a_{1m}v_{m1}\\ | ||
+ | \vdots \\ | ||
+ | a_{l1}v_{11}+\dots+a_{lm}v_{m1} | ||
+ | \end{array}\right] | ||
+ | </math> |
Revision as of 15:33, 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:
Example: Multiplication of 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 |
Multiplication of matrices with vectors
A vector is a just special form of a matrix with either only one row or one column. Because an l-by-m matrix can only be multiplied by an m-by-n matrix, there are two possibilities of multiplying matrices and vectors. The first possibility is a 1-by-m row vector multiplied with an m-by-n matrix which results in a 1-by-n row vector:
The second possibility is a l-by-m matrix multiplied with an m-by-1 column vector which results in a l-by-1 column vector: