Plane Rotations

Previous    Next


1. 2*2 Rotation Matrices:

Definition: A 2*2 rotation matrix is a 2*2 matrix of the form: R = c s -s c where c**2 + s**2 = 1.

Property: The matrix R rotates a 2D vector u = [x,y] through an angle a, |a|<=pi, where a is defined by sin(a) = s and cos(a) = c.

Proof: R*u = R*[x] = [ cx + sy] = [ xcos(a) + ysin(a)] [y] [-sx + cy] [-xsin(a) + ycos(a)]

which is the vector [x,y] rotated through angle a if you draw a sketch in the x,y plane.

Property: R is an orthogonal matrix

Proof: since R just rotates a vector, its length is left unchanged. Alternatively:

Rt*R = c -s * c s = c**2 + s**2 cs-sc = 1 0 = I s c -s c sc -cs c**2 + s**2 0 1

where we used the fact that c**2 + s**2 = 1.

Property: By choosing the angle a suitably, we can arrange that the rotated vector R*u has either no x or no y component. i.e. we can always annihilate one coordinate of u to zero.

For example to get y = 0 we choose -sx + cy = 0, in the formula above for R*u. This implies that t = y/x where we define t = tan(a) = s/c. Recovering c and s from t is easy. Since c**2 + s**2 = 1, we divide by c**2 to get 1 + t**2 = 1/c**2 which leads to c = 1/sqrt(1+t**2). Having determined t and c, we recover s from s = c*t.

Property: We can use R to diagonalize a 2*2 real symmetric matrix by a similarity transform: B = 1/R*A*R:

Proof: Consider a general 2*2 real symmetric matrix A:

A = [a b] [b d]

If b=0 then A is already diagonal, so we can assume that b != 0. Multiplying the three matrices by hand gives:

1/R*A*R = Rt*A*R = [c**2 a - 2csb + s**2 d c**2 b + cs(a-d) - s**2 b ] [c**2 b + cs(a-d) -s**2 b c**2 d + 2csb + s**2 a ]

This matrix is also symmetric, so it will be diagonal if the upper right element is 0, ie if we choose the angle so that:

c**2 b + cs(a-d) - s**2 b = 0

which we can rewrite after dividing by c**2 as:

1 + t*(a-d)/b - t**2 = 0, t = s/c = tan(a).

This is a quadratic equation for t which we can solve to get two roots. We choose the smaller magnitude one, which means the smaller in magnitude rotation angle. We can then recover c = 1/sqrt(1+t**2) and s = c*t.

So this completely solves the diagonalization problem for a 2*2 real symmetric matrix and shows that it can be diagonalized by an orthogonal similarity transform. Hardly a huge triumph, but key to the Jacobi eigenvalue method for an n*n matrix.

2. n*n Plane Rotation Matrices (Givens Transformations)

You can build a simple plane rotation in n dimensions by taking the above matrix and "fleshing it out" to an n*n matrix - equal to the identity matrix in all rows/cols except the two coordinates rows and columns p and q (p<q) that you are going to rotate in.

Definition: An n*n plane rotation in the (p,q) plane is defined by the matrix R where R[p][p] = R[q][q] = c, R[p][q] = -R[q][p] = s, R[i][i] = 1, i!= p or q, and R[i][j] = 0, all other i,j, and s,c are numbers such that c**2 + s**2 = 1.

Example: a 4*4 matrix that rotates in the (2,4) plane is:

1 0 0 0 0 c 0 s 0 0 1 0 0 -s 0 c

with s**2 + c**2 = 1.

Properties: The matrix R is orthogonal and has all of the properties discussed above for a 2*2 rotation matrix.

In particular, R can be used with the same choice of c and s computed for the n=2 case to annihilate the element u[q] of a vector u. In other words (R*u)[q] = 0. Also, R can be used with the same choice of c and s computed for the n=2 case to annihilate the elements a[p][q] and a[q][p] of a symmetric n*n matrix A (i.e. with a = a[p][p], b = a[p][q] and d = a[q][q]). In this case, if B = 1/R*A*R then B[p][q] = B[q][p] = 0.

The R computed above will not of course completely diagonalize an n*n symmetric matrix, unless n=2, but it will zap one pair of off-diagonal elements, producing a symmetric matrix B with the same eigenvalues as A and two less non-zero elements. Therefore applying a sequence of such simple rotations, but between different coordinate pairs p,q, might allow us to zap all off diagonal elements. Caution: its not so easy. While R creates a zero at position p,q, it does affect other elements in A and may turn some zero, into a non-zero. Therefore applying successive R matrices for different p,q pairs may not hold all zapped elements to 0.

More complex rotations can be built as products of simple 2-plane rotations, but they are very hard to write down explicit formulas for.


Previous   Next