Graphics Reference
In-Depth Information
There's another equally useful interpretation of Av .Ifwelet b i denote the
columns of A, then
Av = v 1 b 1 + v 2 b 2 +
...
+ v n b n ,
(7.58)
that is, the product of A with v is a linear combination of the columns of A.
One particularly useful consequence of the definition of Av is that if we want
to multiply A by several vectors v 1 , v 2 , ..., v k , we can express this product by
concatenating the vectors v i into a matrix V whose columns are v 1 , v 2 , etc.; the
product
AV
(7.59)
is then a matrix W whose i th column is Av i . This is no more computationally
efficient than multiplying A by each individual vector. The key application of this
idea is when we have one set of vectors v 1 , v 2 ,
...
, v k and a second set of vectors
w 1 , w 2 ,
...
, w k , and we wish to find a matrix with Av i = w i for i = 1,
...
, k , that
is, we wish to have
AV = W.
(7.60)
Often it's impossible to achieve exact equality, but it will turn out that we can find
the “best” such matrix A by straightforward operations on the matrices V and W,
but we'll wait to present the main ideas in context in Section 10.3.9.
In general, matrix multiplication is not commutative: AB
= BA.
Inline Exercise 7.3: (a) If A is a 2
×
3 matrix and B is a 3
×
1 matrix, show
that AB makes sense, but BA does not.
(b) Let A = 123 T and B = 011 . Compute both AB and BA.
7.6.6 Other Kinds of Vectors
The spaces R 2 and R 3 that we've been discussing, and R n in general, have
certain properties. There's a notion of addition (which is commutative and asso-
ciative), and of scalar multiplication (again associative, and distributive over addi-
tion). There's also a zero vector with the property that 0 + v = v + 0 = v for
any vector v . And there are additive inverses: Given a vector v , we can always
find another vector w with w + v = 0 . These properties, taken together, make R n
a vector space. There are a few other vector spaces we'll encounter in graphics;
some of these will arise in our discussion of images, others in our discussion of
splines, and still others in our discussion of rendering. Most have a common form:
They are spaces whose elements are all functions .
Recall that, if we had a vector w
R 2 , we built a function
φ w : R 2
R : v
w
·
v .
(7.61)
This is a linear function on R 2 , and in fact, any linear function from R 2 to R has
this particular form.
 
 
 
Search WWH ::




Custom Search