Documentation - Calculus III for Computational Sciences - Project | MATH 2605, Study Guides, Projects, Research of Mathematics

Material Type: Project; Class: Calc III for Comput Sci; Subject: Mathematics; University: Georgia Institute of Technology-Main Campus; Term: Unknown 1989;

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 08/04/2009

koofers-user-5iw
koofers-user-5iw šŸ‡ŗšŸ‡ø

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Project 5 Documentation
Math 2605, Gameiro
William Rorabaugh
In this project I took a given 2 x 2 matrix A and graphed the image of the unit circle
under A. From this graph (which I call the ellipse), I found the normalized vectors v1 and v2 that
pointed to the major and minor axis respectively of the ellipse. I also found the vectors u1 and u2
on the unit circle that mapped, respectively, to v1 and v2. I finally used the angles of u1 and v1,
and the lengths of the major and minor semi-axis to find the singular value decomposition of A.
I found v1 and v2 while I was finding the points on the ellipse from the points on circle
under A. In this loop, I tracked the vectors of the ellipse with the greatest and smallest
magnitudes. After the loop, I knew that these vectors were the major and minor semi axis and so
I normalized them to find v1 and v2. When I was tracking the largest and smallest vectors of the
ellipse, I also recorded the angle of the vector of the unit circle that I had just used to compute
each of them. I then used these angles I used to find v1 and v2 to derive the unit vectors u1 and u2.
After studying the symmetry of the ellipse and circle I noticed that if u1 maps to v1 then -
u1 maps to - v1. Using this fact, I decided that I could "flip" (multiply by -1) u1 and v1 into
specific quadrants to ease my later computations. So if v1 lay below the x-axis I flipped u1 and v1
to ensure that v1 was above the x-axis. Similarly, I flipped (if necessary) u2 and v2 into position
such that u2 lay clockwise of u1. Before going much further, I took the magnitude of the largest
and smallest vectors that I had found on the ellipse and reported them as the singular values of D
because the lengths of each these semi-axi are the product of the length of a unit vector and a
singular value.
After reading the confusing the instructions, I decided that matrix U should rotate or
reflect u1 and u2 onto (1, 0) and (0, 1) where matrix D would stretch them into the major and
minor axis. Since I had guaranteed that u2 was clockwise of u1, I knew that U would just need to
be a rotation. Since we would actually use UT in the SVD of A and since UT undoes the rotation
of U, I knew that the rotation angle of U was the angle of u1 (measured from + x axis) which
would be rotated back to 0 be UT. Now that I knew UT would rotate u1 and u2 to (1, 0) and (0, 1)
and that D would stretch (1, 0) and (0, 1) into the major and minor axis, I just needed to see how
V would rotate or reflect these axis into their final positions in the direction of v1 and v2.
Since I set v1 above the x-axis, I knew its y component was positive. Using a little
geometry, if the x component of v1 and the y component of v2 had the same sign, then I knew that
V did a simple rotation on the axis to position them at v1 and v2. Otherwise, v2 lay clockwise v1
and V must have done a reflection about the bisector of the angle between (1, 0) and v1. Thus, I
decided if V was an R rotation matrix or an M reflection matrix by comparing the signs of the x
component of v1 and the y component of v2. Since V rotated or reflected the major axis from the
direction (1, 0) to the direction v1, I knew that regardless if V was an R or an M, its angle was
the angle between (1, 0) and v1.
So after flipping all those little direction vectors and deriving the angles of U and V from
u1 and v1, and finally deciding whether V was a rotation or reflection, I had completed the SVD
of A that I could then displayed. The case of the degenerate ellipse (i.e. a line) didn't require any
special mathematics, although I didn't draw u2 and v2 if the length of v2 was almost zero. The one
special case that required some special mathematics was when the ellipses were circles. The
pf2

Partial preview of the text

Download Documentation - Calculus III for Computational Sciences - Project | MATH 2605 and more Study Guides, Projects, Research Mathematics in PDF only on Docsity!

Project 5 Documentation Math 2605, Gameiro William Rorabaugh In this project I took a given 2 x 2 matrix A and graphed the image of the unit circle under A. From this graph (which I call the ellipse), I found the normalized vectors v 1 and v 2 that pointed to the major and minor axis respectively of the ellipse. I also found the vectors u 1 and u 2 on the unit circle that mapped, respectively, to v 1 and v 2. I finally used the angles of u 1 and v 1 , and the lengths of the major and minor semi-axis to find the singular value decomposition of A. I found v 1 and v 2 while I was finding the points on the ellipse from the points on circle under A. In this loop, I tracked the vectors of the ellipse with the greatest and smallest magnitudes. After the loop, I knew that these vectors were the major and minor semi axis and so I normalized them to find v 1 and v 2. When I was tracking the largest and smallest vectors of the ellipse, I also recorded the angle of the vector of the unit circle that I had just used to compute each of them. I then used these angles I used to find v 1 and v 2 to derive the unit vectors u 1 and u 2. After studying the symmetry of the ellipse and circle I noticed that if u 1 maps to v 1 then - u 1 maps to - v 1. Using this fact, I decided that I could "flip" (multiply by - 1) u 1 and v 1 into specific quadrants to ease my later computations. So if v 1 lay below the x-axis I flipped u 1 and v 1 to ensure that v 1 was above the x-axis. Similarly, I flipped (if necessary) u 2 and v 2 into position such that u 2 lay clockwise of u 1. Before going much further, I took the magnitude of the largest and smallest vectors that I had found on the ellipse and reported them as the singular values of D because the lengths of each these semi-axi are the product of the length of a unit vector and a singular value. After reading the confusing the instructions, I decided that matrix U should rotate or reflect u 1 and u 2 onto (1, 0) and (0, 1) where matrix D would stretch them into the major and minor axis. Since I had guaranteed that u 2 was clockwise of u 1 , I knew that U would just need to be a rotation. Since we would actually use U T in the SVD of A and since U T undoes the rotation of U , I knew that the rotation angle of U was the angle of u 1 (measured from + x axis) which would be rotated back to 0 be U T

. Now that I knew U T would rotate u 1 and u 2 to (1, 0) and (0, 1) and that D would stretch (1, 0) and (0, 1) into the major and minor axis, I just needed to see how V would rotate or reflect these axis into their final positions in the direction of v 1 and v 2. Since I set v 1 above the x-axis, I knew its y component was positive. Using a little geometry, if the x component of v 1 and the y component of v 2 had the same sign, then I knew that V did a simple rotation on the axis to position them at v 1 and v 2. Otherwise, v 2 lay clockwise v 1 and V must have done a reflection about the bisector of the angle between (1, 0) and v 1. Thus, I decided if V was an R rotation matrix or an M reflection matrix by comparing the signs of the x component of v 1 and the y component of v 2. Since V rotated or reflected the major axis from the direction (1, 0) to the direction v 1 , I knew that regardless if V was an R or an M , its angle was the angle between (1, 0) and v 1. So after flipping all those little direction vectors and deriving the angles of U and V from u 1 and v 1 , and finally deciding whether V was a rotation or reflection, I had completed the SVD of A that I could then displayed. The case of the degenerate ellipse (i.e. a line) didn't require any special mathematics, although I didn't draw u 2 and v 2 if the length of v 2 was almost zero. The one special case that required some special mathematics was when the ellipses were circles. The

problem with circles was that there vectors all have the same length and so my program would end up with whatever v 1 and v 2 round-off errors randomly decided were bigger or smaller. When I graphed the circle under the identity matrix, for example, I ended up with v 1 and v 2 too close to each other: In reality, since both u 2 and v 2 were clockwise of u 1 and v 1 , and since I get my angles only from u 1 and v 1 , it didn't really matter if u 2 and u 1 weren't perpendicular. But I thought this looked ugly, so I made u 2 and v 2 90 o counter clockwise rotations of u 1 and v 1. When the unit circle maps to another circle under A , this means that the singular values of the D matrix in the SVD of A must be the same. If the values are the same, we can factor them out and reduce D to the identity. D , which is now the identity, multiplied with U T yields U T

. This reduces the SVD of A to some singular value d scaling the product of V and U T . Working with the angles found on page one of this document, the product V and U T is a rotation that rotates clockwise by the angle u 1 and counter clockwise by the angle v 1. So this SVD of A rotates (or reflects, by a similar argument) vectors by the angle between v 1 and u 1 and scales the final answer by singular value d. But we know (by geometric symmetry) that if A takes a circle to another circle, then the rotation of each vector in the unit circle to its image under A must be the same. This means that for any u 1 and v 1 pair we choose, the angle between them will be some, and the SVD in fact yield a rotation matrix with the correct angle of rotation for every source vector in the unit circle, with the correct scalar d on the end. So if I am given a matrix A that maps a circle to a circle (like the Identity did above), I can guarantee that whatever random u 1 and v 1 pair that I used to calculate my SVD for A does in fact yield a correct SVD of A. FIN.