The MATLAB Notebook v1.5.2
Section 2 (Application to Geometry): Affine Transformations, Rigid Motions, Congruence, and Similarity
Affine Transformations and Rigid Motions
We define an affine transformation of Rn to be a mapping of the form
FA,a(v)=Av+a,
where v and a are column vectors of length n, and A is an nxn matrix. In particular, an affine transformation for which the matrix A is orthogonal is called a rigid motion. We say two subsets of Rn are congruent if there is a rigid motion that maps one set onto the other.
We note that
FA,a(FB,b(v))=ABv + (Ab+a)=FAB,Ab+a(v),
so that the composition of affine transformations is again an affine transformation. Moreover
if A is invertible, then so is FA,a, and its inverse is FA-1, - A-1a.
In particular, a rigid motion is invertible and its inverse is a rigid motion. Rigid motions respect both distance and angles. More specifically,
Proposition 2.1: If F is a rigid motion of Rn, then ||F(v1)-F(v2)||=||v1-v2|| and (F(v2)-F(v1))•(F(v3)-F(v1))=(v2-v1)•(v3-v1).
If F is a rigid motion, then F=FA,a, where A is orthogonal. Since A is orthogonal, we have for all v, ||Av||2=(Av)•(Av)=v•v=||v||2, from which it follows that ||Av||=||v||. We also have, for any two vectors v1 and v2, F(v1)-F(v2)=Av1+a-(Av2+a)=Av1-Av2=A(v1-v2). The proposition now follows easily.
An affine transformation is a generalization of a linear transformation. The increased generality resides in the fact that a linear transformation always maps the zero vector to itself, while an affine transformation may not.
Definition: The vectors v0, . . . , vn are said to be in general position if there do not exist real numbers ao, ... , an, not all 0, for which [pic] and [pic].
The condition on the sum of the coefficients provides the distinction between the definition of linear independence and the slightly less restrictive definition of general position. The relationship is made more precise in the following proposition.
Proposition 2.2: The vectors v0, . . . , vn are in general position if and only if the vectors v1-v0, .... , vn-v0 are linearly independent.
If the vectors vi are not in general position, then there exist real numbers ao, ... , an, not all 0, for which [pic] and [pic]. It then follows that [pic]. The converse argument is similar. The lower limit of summation may be changed from 0 to 1 because the first term in the last sum is identically 0.
It follows from Proposition 2.2 that that up to n+1 vectors [pic] in an n dimensional vector space can be in general position, and that a set of vectors in general position can (but need not) include the zero vector.
Proposition 2.3: Let v0, . . . , vn and w0, . . . , wn be sets of column vectors of length n. If the vi are in general position, there is a unique affine transformation F of Rn for which F(vi)=wi for [pic]. If the wi are also in general positition, then F is invertible.
Instead of providing a formal proof, we will analyze an explicit example. We will define specific three dimensional vectors v0, . . . , v4 and w0, . . . , w4, and find the desired affine transformation with the help of MATLAB.
v0=[1;1;1]
v0 =
1
1
1
v1=[1;-1;1]
v1 =
1
-1
1
v2=[1;2;3]
v2 =
1
2
3
v3=[3;4;-5]
v3 =
3
4
-5
w0=[0;0;1]
w0 =
0
0
1
w1=[2;4;5]
w1 =
2
4
5
w2=[3;-2;1]
w2 =
3
-2
1
w3=[0;5;0]
w3 =
0
5
0
We must now find the matrix that maps vi-v0 to wi-w0. We begin with the matrix A whose colums are vi-v0. Left multiplication by A maps the standard basis vectors to the columns of A and left multiplication by A-1 maps the columns of A to the standard basis vectors. Note that A-1 will exist if and only if the vi are in general position.
A=[v1-v0,v2-v0,v3-v0]
A =
0 0 2
-2 1 3
0 2 -6
Next, we obtain the matrix B whose columns are wi-w0.
B=[w1-w0,w2-w0,w3-w0]
B =
2 3 0
4 -2 5
4 0 -1
The matrix we want is BA-1
C=B*inv(A)
C =
7.5000 -1.0000 2.0000
5.5000 -2.0000 0
5.5000 -2.0000 1.0000
Now the affine transformation we desire can be obtained in three steps: subtract v0, multiply by C, and add w0. This prescription corresponds to FC,w0-Cv0. In order to accomplish this in MATLAB, we have written a MATLAB m-file to define a function of three variables called affine. affine(A,a,v) returns FA,a(v). We will define the appropriate transformation and check our work.
c=w0-C*v0
c =
-8.5000
-3.5000
-3.5000
affine(C,c,v0)-w0
affine(C,c,v1)-w1
affine(C,c,v2)-w2
affine(C,c,v3)-w3
ans =
0
0
0
ans =
0
0
0
ans =
0
0
0
ans =
0
0
0
We can now check whether the affine transformation we have defined is a rigid motion.
C*C'
ans =
61.2500 43.2500 45.2500
43.2500 34.2500 34.2500
45.2500 34.2500 35.2500
Since CCT is not the identity matrix, C is not orthogonal, and the affine transformation in question is not a rigid motion. Notice that in order to check this, we needed only the matrix C, and not the entire affine transformation. Because the wi are also in general position, C, and therefore the affine transformation, will be invertible.
det(C)
ans =
-9.5000
Rigid Motions and Congruence
We now make the connection with the usual definition of congruence for plane triangles, but first we will need a general proposition on orthogonal matrices.
Proposition 2.4: Let A be an nxn matrix and v1, ... , vn a basis of the space of n dimensional column vectors. Suppose Avi•Avj=vi•vj for [pic]. Then A is orthogonal.
Proof: We need to show that A satisisfies the definition of orthogonality: Av•Aw=v•w for all v and w. We express both v and w as linear combinations of the vi and use the algebraic properties of the dot product.
Proposition 2.5: Triangle v0v1v2 is congruent to triangle w0w1w2 in the usual Euclidean sense if and only if there is a rigid motion F of R2 with F(vi)=wi for [pic].
Proof: Since neither the vi nor the wi are collinear, it follows that both sets are in general position. It follows that there is a unique affine transformation FA,a with the desired properties. F is a rigid motion if and only if A is orthogonal.
A typical side of the first triangle has squared length (vi-vj)•(vi-vj). The corresponding side of the second triangle has squared length (wi-wj)•(wi-wj)=A(vi-vj)•A(vi-vj). If A is unitary, these are equal; therefore corresponding sides of the two triangles have the same length and the triangles are congruent by SSS.
To prove the converse, we observe that (v1-v0) and (v2-v0) form a basis for the space of two dimensional column vectors Moreover, (v1-v0)•(v2-v0)=||v1-v0|| ||v2-v0|| cos([pic]), where [pic] is the angle at v0, and similarly for the second triangle. It follows that if the two triangles are congruent, A satisfies the hypotheses of Proposition 2.4 and is orthogonal.
Hyperplane Reflections
We turn now to the subject of reflections. The reflection of any point (x,y,z) across the x y- plane in R3, for example is obtained by changing the sign of the z coordinate to obtain the point (x,y,-z). Reflection across the y axis in the R2 transforms the point (x,y) into the point (-x,y). In each case, the points of the "mirror" are fixed. More generally, if v is any none-zero vector of Rn, then its orthogonal complement v┴ is called a hyperplane and,since [pic], then for any vector w, we have [pic] and we can define reflection in the mirror v┴ as the linear transformation whose matrix is [pic].
Proposition 2.6: If v is a vector in Rn, then [pic] is both symmetric and orthogonal, and satisfies [pic], and [pic]
Proof: [pic] is symmetric because both Pv and [pic] are symmetric. Moreover [pic]. It follows that [pic], so that [pic] is orthogonal. The last equality is immediate from the definition of [pic] and the identity Pvv=v.
Up to here, we have only discussed reflections whose "mirrors" are linear hyperplanes. We would like to extend our discussion to affine hyperplanes. The distinction is as follows. A linear hyperplane is the orthogonal complement of a fixed vector v, and consists of all those vectors w for which [pic]. An affine hyperplane is more general in that it is characterized by the equation [pic] for some constant c that is not necessarily 0. In particular, any line in the plane and any plane in three dimensional space is an affine hyperplane. We will define reflection in an affine hyperplane to be a rigid motion F such that F(w)=w if and only if w is on the hyperplane and F(F(w))=w for all w.
Proposition 2.7: Let v be a fixed vector and c a fixed scalar. Then there is a unique reflection F in the affine hyperplane [pic], given by [pic], where [pic]and [pic].
Proof: With A and a as given, we have [pic]. Setting the right hand side of this equation to w gives precisely the equation of the hyperplane. We have [pic]. Since [pic] and [pic], it follows that F(F(w))=w. Since [pic] is orthogonal, it follows that F is a rigid motion and is the desired reflection.
Now let us address the issue of uniqueness. Let w be any vector in Rn, and let [pic]. Let G be any reflection in the hyperplane. If w is on the hyperplane, then w=w0=G(w). Otherwise, we have G(w0)=w0, ||G(w)-w0||=||w-w0||, and both w-w0 and G(w)-w0 are perpendicular to [pic], and are therefore multiples of v. It follows that the three points w, w0 and G(w) are collinear and w0 is the midpoint of the line segment whose endpoints are w and G(w). This determines G(w) uniquely; in particular, G(w) must be F(w) and the uniqueness of the reflection is established.
Similarity Transformations and Similarity
An affine transformation FA,a is called a similarity transformation if A is a non-zero scalar multiple of an orthogonal matrix. A similarity transformation is always invertible and its inverse is also a similarity transformation. Two subsets of Rn that are mapped to one another by similarity transformations are called similar. The following proposition provides a recognition principle for similarity transformations.
Proposition 2.8: The square matrix A is a scalar multiple of an orthogonal matrix if and only if AAT is a positive scalar multiple of the identity matrix.
Proof: If A=cU with U orthogonal, then AAT=c2UUT=c^2I. If AAT=c2I (any positive number is a square of a positive number), and we set U=(1/c)A. Then UUT=I , so that U is orthogonal and A=cU.
We will see now how to construct similarity transformation in the plane.
Proposition 2.9: In the two dimensional case, if [pic] and [pic], there are exactly two similarity transformations mapping [pic] to [pic] and [pic] to [pic].
Instead of providing a proof of Proposition 2.9, we will carry out the construction for a specific example in a manner that should make it clear why the proposition is true in general. We begin by choosing our four points.
v1=[1;3]
v2=[2;-1]
w1=[3;5]
w2=[1;1]
v1 =
1
3
v2 =
2
-1
w1 =
3
5
w2 =
1
1
We need, first, to construct an orthogonal transformation that will map v2-v1 to a positive multiple of w2-w1. We begin by constructing two orthogonal matrices whose first columns are positive multiples, respectively, of v2-v1 and w2-w1. Gram-Schmidt orthogonalization will produce the matrices we want, provided we start with non-singular matrices whose first columns are respectively v2-v1 and w2-w1. The second column of each matrix can be any column vector that is obviously not a multiple of the first column. Instead of stepping through the Gram-Schmidt algorithm, we will invoke MATLAB's qr function.
Av=[v2-v1,[0;1]]
Av =
1 0
-4 1
[Uv,Rv]=qr(Av)
Uv =
-0.2425 0.9701
0.9701 0.2425
Rv =
-4.1231 0.9701
0.2425
Aw=[w2-w1,[0;1]]
Aw =
-2 0
-4 1
[Uw,Rw]=qr(Aw)
Uw =
-0.4472 -0.8944
-0.8944 0.4472
Rw =
4.4721 -0.8944
0 0.4472
-Uv and Uw are the two orthogonal matrices we wanted. (For some reason, MATLAB's qr algorithm returned an orthogonal matrix whose first column is a negative instead of a positive multiple of v2-v1, it will be necessary to compensate for this on a case by case basis.) -[pic] is now an orthogonal matrix that will map v2-v1 to a positive multiple of w2-w1. We must now take care of the scale factor.
s=veclength(w2-w1)/veclength(v2-v1)
s =
1.0847
We are now ready to define and check our affine transformation.
A=-s*Uw*inv(Uv)
A*(v2-v1)-(w2-w1)
a=w1-A*v1
affine(A,a,v1)-w1
affine(A,a,v2)-w2
A =
0.8235 0.7059
-0.7059 0.8235
ans =
0
0
a =
0.0588
3.2353
ans =
0
0
ans =
1.0e-015 *
-0.1110
0
It is geometrically clear that there is second similarity transformation with the desired properties, which can be obtained by reflecting the result of the first one across the line through w1 and w2. This can actually be obtained by changing the sign of the second column of either Uw or Uv (changing both will have no effect).
Regular Polygons
If we have a regular polygon with n vertices, then there is a rigid motion of the plane that permutes the vertices cyclically. The nth power of such a mapping fixes all n vertices, and must therefore be the identity. We can use the converse of this idea to build regular polygons. To illustrate the idea, let us build a regular seven-sided polygon. We will start by constructing an orthogonal matrix whose seventh power is the identity.
A=[cos(2*pi/7),sin(2*pi/7);-sin(2*pi/7),cos(2*pi/7)]
A =
0.6235 0.7818
-0.7818 0.6235
A^7
ans =
1.0000 -0.0000
0.0000 1.0000
Next we choose a vector, that will represent one vertex of our polygon, and we let the powers of A act on our first vertex to provide the others. For convenience in plotting, we assemble the coordinates of all these points into a matrix.
P(1,1)=1;
P(1,2)=0;
for j=2:8
P(j,1:2)=P(j-1,1:2)*A';
end
P
Now we plot the polygon.
plot(P(1:8,1),P(1:8,2))
axis equal
Now let us consider a more general problem: Suppose we wish to construct a regular seven sided polygon two of whose vertices are (1,1,3)and (2,5,0). Since any polygon similar to a regular polygon is also regular, we will proceed by constructing a similarity transformation that takes two of the vertices of the polygon we have already constructed to (1,1,3) and (2,5,0). Then the image of our polygon under that similarity transformation will give us the polygon we desire. The detailed construction is left to an exercise.
Problems:
1.
a. Find the affine transformation F of R2 for which F(1,1)=(1.4,-.2), F(2,3)=(3.6,2), and F(5,4)=(6.2,-1.6)
b. Use the result of part a to determine whether the triangle with vertices at (1,1), (2,3) and (5,4) is congruent to the triangle with vertices at (1.4,-.2), (3.6,.2) and (6.2,-1.6).
2. Find the reflection of the point (1,2,7) in the hyperplane 3x-2y+6z=5.
3.
4. Determine whether the triangle with vertices at (0,0), (4,0) and (2,10) is similar to the triangle with vertices at (0,6),(6,0), and (18,18). Model your solution on what you did in Problem 3.
Construct a triangle with two vertices at (2,4) and (1,7) that is similar to the triangle with vertices at (2,2), (4,5) and (9,-10). How many such triangles are there?
Build and display a regular nine-sided polygon.
Build and display a regular seven-sided polygon with (1,1,3) and (2,5,0) as consecutive vertices.
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- minecraft 1.5.2 unblocked games
- minecraft 1 5 2 unblocked games
- minecraft 1 5 2 free download pc
- minecraft 1 5 2 jar file download
- minecraft 1 5 2 servers unblocked
- minecraft 1 5 2 unblocked free
- unblocked minecraft download 1 5 2 jar
- minecraft 1 5 2 free download
- minecraft 1 5 2 servers ip
- minecraft 1 5 2 unblocked download
- minecraft download free 1 5 2 unblocked
- minecraft 1 5 2 download