Geometry 05
Geometry 05
Affine morphisms
Contents
5.1 Changing coordinate systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
5.2 Affine morphisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5.3 Projections and reflections in a hyperplane . . . . . . . . . . . . . . . . . . . . . . . . 4
5.3.1 Tensor products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5.3.2 Parallel projection on a hyperplane . . . . . . . . . . . . . . . . . . . . . . . . . 6
5.3.3 Parallel reflection in a hyperplane . . . . . . . . . . . . . . . . . . . . . . . . . . 7
5.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Let φ : V → W be a linear map between the R-vector spaces V and W . Let v = {v1 , . . . , vn } be a
basis for V and let w = {w1 , . . . , wm } be a basis for W . In your Algebra course, you used the notation
[φ]v,w for the matrix of the linear map φ with respect to the bases v and w. We will use the notation
Mw,v (φ) = [φ]v,w
Notice that the indices v, w are reversed.
You have also learned that if ψ : W → U is another linear map, to some vector space U with basis
u = {u1 , . . . , uk }, then
Mu,v (ψ ◦ φ) = Mu,w (ψ) · Mw,v (φ).
In particular if V = W then
Mw,w (φ) = Mw,v (IdV ) · Mv,v (φ) · Mv,w (IdV ) = Mv,w (IdV )−1 · Mv,v (φ) · Mv,w (IdV ).
So, the matrix of φ with respect to the basis w is obtained from the matrix of φ with respect to the
basis v by conjugating with the matrix Mv,w (IdV ). We call the matrix Mv,w := Mv,w (IdV ) the change of
basis matrix from the basis w to the basis v. If K and K′ are two coordinate systems, we write MK,K′ for
the base change matrix w.r.t. the corresponding bases.
1
Geometry - first year - IE [email protected]
A
j C j′
O i i′
O′
We can do this in two steps: (a) first we change the origin, i.e. we go from Oij to O′ ij and (b) we
change the directions of the coordinate axes, i.e. we go from O′ ij to O′ i′ j′ . The first step is just a
translation and the second step corresponds to the usual base change from linear algebra.
B B
A A
j j′
C C
j j
Oi i′
O′ i Oi
(a) Change the origin. (b) Change the direction of the axes.
2
Geometry - first year - IE [email protected]
Hence, the formula for changing coordinates from the system K to the system K′ is
Suppose now that a point A is given and that the coordinates of A in the frame K (relative to the
coordinate frame/coordinate system K) are (1, 2). Then the coordinates of A relative to K′ are
" #
1
[A]K′ = MK′ ,K + [O]K′
2 K
Since we know i′ and j′ with respect to i and j, we can write down the matrix MK,K′ and then MK′ ,K =
M−1 ′
K,K′ . Since we know the coordinates of O with respect to K, it is more convenient to use the first
equality in (5.1)
" #−1 " # " # ! " # " # " # ! " #
−2 1 1 7 1 2 −1 1 7 3
[A]K′ = · − = · + = .
1 2 2 K −1 K −5 −1 −2 2 K −1 K 0
Example (In dimension 3). Let K = Oijk and K′ = O′ i′ j′ k′ be two coordinate systems (reference
frames) of E3 . Suppose that we know O′ , i′ , j′ and k′ relative to K:
4 −1 −2 0
[O′ ]K = 5 , i′ = −i − 2j = −2 , j′ = −2i + j = 1 , k′ = j + 2k = 1 .
−1 K 0 K 0 K 2 K
The coordinates with respect to K′ can be obtained from the coordinates with respect to K in two
steps:
3
Geometry - first year - IE [email protected]
(a) Change the origin. (b) Change the direction of the axes.
• In (5.3) both A and b depend on the choice of the coordinate systems K and K′ .
GL(Vn ) ⊆ AGL(En ).
H : a1 x1 + · · · + an xn + an+1 = 0
4
Geometry - first year - IE [email protected]
• Consider a line ℓ ⊆ En passing through a point Q(q1 , . . . , qn ) and having v(v1 , . . . , vn ) as direction
vector:
ℓ = {Q + tv : t ∈ R}. (5.4)
Consider a hyperplane H ⊆ En given by the Cartesian equation
H : a1 x1 + · · · + an xn + an+1 = 0 (5.5)
v1 h v w ... v1 wn
. i 1 . 1 .. .
t
v ⊗ w = v · w = .. · w1 , . . . , wn = .. .
vn vn w1 . . . vn wn
Proposition 5.2. The map Rn × Rn → Matn×n (R) given by (v, w) 7→ v ⊗ w has the following properties:
2. (v ⊗ w)t = w ⊗ v.
• The tensor product of two vectors is also called outer product - to be compared with the inner
product which is
w
h i .1
t
⟨v, w⟩ = v · w = v1 , . . . , vn · .. = v1 wn + · · · + vn wn .
wn
(u ⊗ v)w = (v · w)u.
5
Geometry - first year - IE [email protected]
PrH,v : En → En
• With respect to the reference frame K, the hyperplane H has an equation as in (5.5).
ϕ(P )
• By (5.6), PrH,v (P ) = P − lin ϕ(v) v where φ(P (p1 , . . . , pn )) = a1 p1 + · · · + an pn + pn+1 .
• Hence, if we denote by p1′ , . . . , pn′ the coordinates of the projected point PrH,v (P ) then
′
p1 = p1 + µv1
.. a1 p1 + · · · + an pn + an+1
where µ = − .
. a1 v1 + · · · + an vn
p′ = p + µv
n n n
6
Geometry - first year - IE [email protected]
• It is possible to give a more compact description of the above matrix form if we use tensor
products:
1 a
(v · a) Idn − v · a · [P ]K − n+1 [v]K
t t
[PrH,v (P )]K =
lin ϕ(v) |{z}
lin ϕ(v)
v⊗a
where a = (a1 , . . . , an )t .
v · at
!
a
[PrH,v (P )]K = Idn − t · [P ]K − tn+1 [v]K
v ·a v ·a
• Parallel projections on hyperplanes are affine morphisms. Obviously, they are not bijective, so
• With respect to the reference frame K, the hyperplane H has an equation as in (5.5).
ϕ(P ) [P ]K + [P ′ ]K ϕ(P )
[P ]K − [v]K = ⇔ 2[P ]K − 2 [v] = [P ]K + [P ′ ]K .
lin ϕ(v) 2 lin ϕ(v) K
7
Geometry - first year - IE [email protected]
Therefore
ϕ(P )
[RefH,v (P )]K = [P ]K − 2 [v] .
lin ϕ(v) K
• As in the case of PrH,v , it is possible to give a compact description of the matrix form if we use
tensor products:
v⊗a a
[PrH,v (P )]K = Idn −2 t · [P ]K − 2 tn+1 [v]K
v ·a v ·a
where a = (a1 , . . . , an )t .
• Parallel reflections in hyperplanes are affine morphisms. Obviously, they are bijective, so
5.4 Applications
• [Changing reference frames] Changing coordinates is so common in real life applications that
it is impossible to do any meaningful modeling without coordinate changes. Take for example
the OpenGL-pipeline (a process under which objects are rendered on the screen in order to
simulate a 3D scene). In this process there are two dimensional changes of coordinates for in-
stance when a PNG-image is transformed into an OpenGL-texture, or when an OpenGL texture
is translated into device coordinates before being displayed on the screen.
8
Geometry - first year - IE [email protected]
important when constructing computer games. As an example, above is Suzanne, the Blender
monkey.
• [Projecting] There are two main types of algorithms which project a 3D scene in computer
graphics: ray-tracing algorithms and rasterization algorithms. Ray-tracing algorithms intersect
rays with planes determined by the triangles in the scene while rasterization algorithms try to
project the triangles on the display screen.
(b) Rasterization.
(a) Ray-tracing.
It is clearly much more efficient to construct a projection map like PrH,ℓ and project all the
triangles, however, this only works for parallel projections. In order to simulate perspective,
rasterization algorithms use a projective transformation before using a projection like the one
described in the previous paragraphs. Ray-tracing algorithms are conceptually much simpler
but they are much more resource intensive.