Game Development Reference
In-Depth Information
Let's look at an example. In the previous section we calculated the
classical adjoint of a matrix M ; now let's calculate its inverse:
2
4 −4
3
−3
3
5
M =
0
2
−2
;
1
4
−1
2
3
2
4 −1/4
3
6
9
0
−3/8
0
−1 = adj M
| M |
−24
4
5
5
M
=
−2
1
−8
=
1/12
−1/24
1/3
.
−2
13
−8
1/12
−13/24
1/3
Here the value of adj M comes from Equation (6.6), and | M | is from Equa-
tion (6.3).
There are other techniques that can be used to compute the inverse of a
matrix, such as Gaussian elimination. Many linear algebra textbooks assert
that such techniques are better suited for implementation on a computer
because they require fewer arithmetic operations, and this assertion is true
for larger matrices and matrices with a structure that may be exploited.
However, for arbitrary matrices of smaller order, such as the 2×2, 3×3, and
4×4 matrices encountered most often in geometric applications, the classical
adjoint method is generally the method of choice. The reason is that the
classical adjoint method provides for a branchless implementation, meaning
there are no if statements, or loops that cannot be unrolled statically. On
today's superscalar architectures and dedicated vector processors, this is a
big win.
We close this section with a quick list of several important properties
concerning matrix inverses.
The inverse of the inverse of a matrix is the original matrix:
−1 )
−1 = M .
( M
(Of course, this assumes that M is nonsingular.)
The identity matrix is its own inverse:
−1 = I .
I
Note that there are other matrices that are their own inverse. For
example, consider any reflection matrix, or a matrix that rotates 180 o
about any axis.
The inverse of the transpose of a matrix is the transpose of the inverse
of the matrix:
( M T )
−1 = ( M
−1 ) T
Search WWH ::




Custom Search