Division and Inverse matrix
- The inverse of a 2x2 matrix is shown here.
- The inverse of a 3x3 matrix is shown here.
- The inverse of a 4x4 matrix is shown here.
We don't tend to use the notation for division, since matrix multiplication is not commutative we need to be able to distinguish between [a][b]-1 and [b]-1[a].
One case where we can reverse the order is when the result is the identity matrix [I]
so for any matrix b then: [b][b]-1= [b]-1[b]= [I]
So instead of a divide operation we tend to multiply by the inverse, for instance if,
[m] = [a][b]
then,
[m][b]-1 = [a][b][b]-1
because [b][b]-1=[I] we can remove [b][b]-1 which gives:
[m][b]-1 = [a]
Calculating inverse using determinants.
The inverse is the transpose of the matrix where each element is the determinant of its minor (with a sign calculation) divided by the determinant of the whole.
To calculate this we can follow these steps:
- Calculate the minor for every matrix element.
- Form the cofactor matrix from the minors with signs.
- Form the adjoint from cofactor matrix by transposing.
- Form the inverse by dividing the adjoint by the overall determinant.
For example a 3x3 matrices inverse is made up of the following determinants:
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
divided by the of the matrix, where each of these terms is a determinant, expanding these out gives:
[m]-1 = 1/det[m] * |
|
Inverse of some common transforms
Here are some examples of the inverse of
rotate
In order to invert a rotation we just rotate by the same amount in the opposite direction. This is equivalent to swapping the rows with columns and columns with rows (see orthogonal matrices).
So, for example, the inverse of this:
[m] = rotate 90 degrees about Z axis = |
|
is this:
[m]-1 = rotate -90 degrees about Z axis = |
|
Try it in the 'inverse calculator'.
translate
The inverse of a translation by (tx,ty,tz) is a translation by (-tx,-ty,-tz) just move it back in the opposite direction, The translate transform is often represented by a 4x4 matrix together with the multiplication operator as described here.
[m] = translate matrix = |
|
So the inverse is just:
[m]-1 = inverse translate matrix = |
|
Try it in the 'inverse calculator'.
scale
If we scale by Sx, Sy and Sz in the direction of the x,y and z axes, we get,
[m] = scale about x,y and z axes = |
|
So the inverse of this transform is:
[m]-1 = inverse scale about x,y and z axes = |
|
Try it in the 'inverse calculator'.