Game Development Reference
In-Depth Information
The determinant of a 3 × 3 matrix is given by
m
11
m
12
m
13
Determinant of a 3 × 3
matrix
m
21
m
22
m
23
m
31
m
32
m
33
=
m
11
m
22
m
33
+ m
12
m
23
m
31
+ m
13
m
21
m
32
− m
13
m
22
m
31
− m
12
m
21
m
33
− m
11
m
23
m
32
(6.2)
= m
11
(m
22
m
33
− m
23
m
32
)
+ m
12
(m
23
m
31
− m
21
m
33
)
+ m
13
(m
21
m
32
− m
22
m
31
).
A similar diagram can be used to memorize Equation (6.2). We write two
copies of the matrix
M
side by side and multiply entries along the diagonals
and back-diagonals, adding the diagonal terms and subtracting the back-
diagonal terms.
For example,
−4
( 2)(−1) − (−2)( 4)
−3
3
(−4)
(−2)( 1) − ( 0)(−1)
0
2
−2
=
+(−3)
( 0)( 4) − ( 2)( 1)
1
4
−1
+( 3)
(−2) − (−8)
(−4)
(−4)( 6)
+(−3)(−2)
+( 3)(−2)
(−24)
+(
(−2) − ( 0)
=
+(−3)
=
=
6)
( 0) − ( 2)
+( 3)
+(
−6)
= −24.
(6.3)
If we interpret the rows of a 3 × 3 matrix as three vectors, then the
determinant of the matrix is equivalent to the so-called “triple product” of
the three vectors:
a
x
a
y
a
z
(a
y
b
z
− a
z
b
y
)c
x
+ (a
z
b
x
− a
x
b
z
)c
y
+ (a
x
b
y
− a
y
b
x
)c
z
3 × 3 determinant vs. 3D
vector triple product
b
x
b
y
b
z
c
x
c
y
c
z
=
= (
a
×
b
)
c
.
Search WWH ::
Custom Search