Game Development Reference
In-Depth Information
Another way to help remember the pattern for matrix multiplication is
to write
B
above
C
. This aligns the proper row from
A
with a column
from
B
for each element in the result
C
:
For geometric applications, we are particularly interested in multiplying
square matrices—the 2 × 2 and 3 × 3 cases being especially important.
Equation (4.3) gives the complete equation for 2 × 2 matrix multiplication:
2 × 2 matrix
multiplication
a
11
a
12
a
21
a
22
b
11
b
12
b
21
b
22
AB
=
(4.3)
a
11
b
11
+ a
12
b
21
a
11
b
12
+ a
12
b
22
a
21
b
11
+ a
22
b
21
a
21
b
12
+ a
22
b
22
=
.
Let's look at a 2 × 2 example with some real numbers:
−3
0
−7
2
A
=
,
B
=
,
5
1/2
4
6
−3
0
−7
2
AB
=
5
1/2
4
6
(−3)(−7) + (0)(4)
(−3)(2) + (0)(6)
21
−6
=
=
.
(5)(−7) + (1/2)(4)
(5)(2) + (1/2)(6)
−33
13
Search WWH ::
Custom Search