Order MattersOne very important feature of matrix multiplication (that you will see has important implications for motion control) is that the order in which two matrices are multiplied matters. Recall the example above where we performed first a rotation and then a shear. Define Note that here the variable X represents a whole matrix (in this case a shear transformation) and not just a single number, and similarly Y represents the whole matrix for rotation. We computed above that the net transformation was given by X times Y, i.e., Suppose now we swap the order and perform first the shear and then the rotation. By matrix multiplication we compute that the net transformation for this ordering is given by This matrix is different from the one calculated with the original ordering, i.e., YX is not equal to XY. In this new ordering, the rectangular diver is transformed as shown in the plot. Compare this to the plot of the transformation XY on the diver that we considered earlier. For very special choices of matrices W and Z, it will hold that WZ=ZW. For example, let Check that for any 2 x 2 matrix Z, we have ZI = IZ. We say that I and Z commute. However, for arbitrary choices of matrices W and Z, it will generally be true that WZ is not equal to ZW, i.e., W and Z won't commute. This lack of commutation plays a key role in motion control as will become apparent in the remainder of this lab.
|