Game Development Reference
In-Depth Information
Chapter 4
Introduction to Matrices
Unfortunately, no one can be told what the matrix is.
You have to see it for yourself.
— Morpheus in The Matrix (1999)
Matrices are of fundamental importance in 3D math, where they are primar-
ily used to describe the relationship between two coordinate spaces. They
do this by defining a computation to transform vectors from one coordinate
space to another.
This chapter introduces the theory and application of matrices. Our
discussion will follow the pattern set in Chapter 2 when we introduced
vectors: mathematical definitions followed by geometric interpretations.
Section 4.1 discusses some of the basic properties and operations of
matrices strictly from a mathematical perspective. (More matrix op-
erations are discussed in Chapter 6.)
Section 4.2 explains how to interpret these properties and operations
geometrically.
Section 4.3 puts the use of matrices in this topic in context within
the larger field of linear algebra.
4.1
Mathematical Definition of Matrix
In linear algebra, a matrix is a rectangular grid of numbers arranged into
rows and columns. Recalling our earlier definition of vector as a one-
dimensional array of numbers, a matrix may likewise be defined as a two-
dimensional array of numbers. (The “two” in “two-dimensional array”
comes from the fact that there are rows and columns, and should not be
confused with 2D vectors or matrices.) So a vector is an array of scalars,
and a matrix is an array of vectors.
113
 
Search WWH ::




Custom Search