Game Development Reference
In-Depth Information
ill conditioned matrix is nearly singular, even though its determinant is 1.
The condition number is the proper tool for detecting such cases, but this
is an advanced topic slightly beyond the scope of this topic.
There are several ways to compute the inverse of a matrix. The one
we use is based on the classical adjoint, which is the subject of the next
section.
6.2.1 The Classical Adjoint
Our method for computing the inverse of a matrix is based on the classical
adjoint. The classical adjoint of a matrix M , denoted “adj M ,” is defined
as the transpose of the matrix of cofactors of M .
Let's look at an example. Take the 3 × 3 matrix M given earlier:
2
4 −4
3
−3
3
5
M =
0
2
−2
.
1
4
−1
First, we compute the cofactors of M , as discussed in Section 6.1.2:
2
4
−2
−1
0
1
−2
−1
0
1
2
4
C {11} = +
C {12} = −
C {13} = +
= 6,
= −2,
= −2,
−3
4
3
−1
−4
1
3
−1
−4
1
−3
4
C {21} = −
C {22} = +
C {23} = −
= 9,
= 1,
= 13,
−3
2
3
−2
−4
0
3
−2
−4
0
−3
2
C {31} = +
C {32} = −
C {33} = +
= 0,
= −8,
= −8.
The classical adjoint of M is the transpose of the matrix of cofactors:
2
3
5 T
{11}
{12}
{13}
C
C
C
4
C {21}
C {22}
C {23}
adj M =
(6.6)
The classical adjoint
{31}
{32}
{33}
C
C
C
2
3
5 T
2
3
6
−2
−2
6
9
0
4
4
5
=
9
1
13
=
−2
1
−8
.
0
−8
−8
−2
13
−8
6.2.2 Matrix Inverse—Official Linear Algebra Rules
To compute the inverse of a matrix, we divide the classical adjoint by the
determinant:
Computing matrix
inverse from classical
adjoint and determinant
−1 = adj M
| M | .
If the determinant is zero, the division is undefined, which jives with our
earlier statement that matrices with a zero determinant are noninvertible.
M
 
Search WWH ::




Custom Search