## Sunday, November 11, 2007

### The Matrix Reloaded: Deriving sin(A+B), cos(A+B) by Rotation Matrices

In our previous post we asked students to verify the sin(A+B) identity for an angle of 75°. Although one might try to generalize the result, there are many other derivations for the sum and difference identities that teachers have seen or used. Those who teach this topic whether it be in an Advanced Algebra/Trig, Advanced Math, Precalculus, or some similarly named course have the choice of deriving the formula, outlining a proof and having students attempt to provide the details or simply motivating the formula. My guess is that, unless you have a highly motivated and strong group of students, the full derivation is not done in class. By the way, an excellent applet for helping students visualize these formulas is located here. One could use this for classroom demonstration or in tutorial mode.

The forms of these trig identities often engage students and some may wonder if there's a pattern one can recognize that occurs elsewhere in mathematics. Using nonsense names for functions, these rules seem to have the form: the squiggle of the first times the squeegee of the second ± the squiggle of the second times the squeegee of the first. Students will hopefully recognize this pattern again when they see the product rule in calculus. Is there an overarching concept that encompasses forms like this? Well, I'd like to suggest one in this post. You can decide for yourself if it's worth developing the required machinery for secondary students (or it can be an enrichment topic or project).

The trig identities mentioned above have the form of a sum (or difference) of products. Where might one encounter this in mathematics? For myself, it's when I studied the products of matrices or the dot product of 2 vectors. v1⋅v2 = a1b1+a2b2. Matrix products and vectors are required in some states' curricula (CA for example), so there is a basis for this approach (pun intended!!).

To simplify , we will focus on position vectors with a length of 1 so that their terminal points are all on the unit circle. Students learn early on in trig that each point on the unit circle can be represented using the parameter t or θ as in (cosθ, sinθ) and that θ represents an angle or rotation, counterclockwise for θ>0, etc. Another way of viewing this is that the unit vectors (1,0) and (0,1), (which are labeled i and j by most physics teachers), are transformed by this rotation as follows:
(1,0) ---> (cos θ, sin θ) (*)
(0,1) ---> (-sin θ, cos θ).
These results are straightforward and students should be able to demonstrate them graphically for values of θ in Quadrant I. For those who recall the terminology from linear algebra, (1,0) and (0,1) are referred to as an orthornormal basis.

[We will use the notation Rθ to denote the rotation transformation by an angle θ about the origin]:

STUDENT (or reader) ACTIVITY
1. Have students verify or find the following (either graphically or using (*) above) :
R90° (1,0) = (0,1)
R90° (0,1) = (-1,0)
R60° (1,0) = (1/2,√3/2)
R60° (0,1) = ______
R45° (1,0) = ______
R45° (0,1) = ______

--------------------------------------------------------------------------------------------------------------
We will now show how the following 2x2 rotation matrix can accomplish this transformation:
(**)

Note that the first column (vector) is the rotation image of the vector (1,0) and similarly for the 2nd column. This idea of using (orthonormal) basis vectors to construct a matrix representing a transformation is crucial in linear algebra. This requires more development and that is not the purpose of this post. We are asking students to accept this for now, although we will have them verify that this matrix approach produces correct results in specific instances. We will now represent the rotation image of any point on the unit circle by multiplying this matrix by the column vector which represents that point. In rectangular (x,y) notation:

(***)

----------------------------------------------------------------------------------------------------------------
STUDENT ACTIVITY (cont.)

2.
Write the matrix form (**) of Rθ for θ =
(a) 90°
(b) 60°
(c) 45°
(d) -90°

3. Re-do problem #1 above using the matrix multiplication formula (***). Make sure your results match!
---------------------------------------------------------------------------------------------------------------

So how does all of this relate to the sum/difference trig identities? We're almost there! Instead of using (x,y) to represent an arbitrary point on the unit circle, we will use the trigonometric form (cosα,sinα) in column vector form. For now we will assume α is between 0 and π/2:

STUDENT ACTIVITY (cont.)

4. Perform the following matrix multiplication:

Does the resulting column vector look familiar? Answer the next two questions and maybe you'll figure out why!

5. The result of #4 is equivalent to a single rotation of what angle?

6. What can we conclude?
----------------------------------------------------------------------------------------------------------------
There's much more to say here but this is enough for now. As usual, I take full responsibility for errors or ambiguities. I await your thoughts. If this is a derivation you've seen before, let me know. One could also derive this using complex numbers or polar coordinates or ...

Totally_clueless said...

Looks good!

For the last step, it is also worthwhile multiplying the rotation matrices for theta and alpha, and see that the resulting rotation matrix corresponds to the sum of the angles.

Similarly for the difference, have theta and -alpha.

TC

Dave Marain said...

Absolutely! I was about to do this but I felt compelled to stop - I was getting overTexified! The product of matrices for the rotations is a critical piece of all this. I may decide to add more detail.

Eric Jablow said...

You can then relate this to Euler's formula e^{iθ} = cos θ + i sin θ. But that's too easy.

Advanced students who know some differential calculus could understand this backwards method too: consider the differential equation y″ + y = 0. Students who remember their differentiation tables will realize that y = cos x and y = sin x are both solutions, and so y = a cos x + b sin x is a solution for any real a and b.

Now, a second-order linear ODE has a 2-dimensional space of solutions; in other words, any solution will be of the form a cos x + b sin x. So, sin (x + θ) is of this form!

(1) sin (x + θ) = a cos x + b sin x.

Letting x = 0,

sin θ = a.

Differentiate equation (1) to get

(2) cos (x + θ) = -a sin x + b cos x.

Let x = 0:

cos θ = b.

Of course we usually derive the derivatives from the addition formulas, so the utility of this method isn't quite clear.

The equation y′ = y leads to e^{x + a) = e^x e^a too.

There's one final social point here. The equation y″ + y = 0 appears in science far more that the equation y″ - y = 0. Trigonometric functions are ubiquitous. Hyperbolic functions appear only rarely: the formula for the catenary. They appear as positions, not as motions. This is because equations of motion that involve hyperbolic functions blow up! These can't be physical.

If you think of the y″ as the acceleration of a particle, then the trigonometric case has the acceleration directed oppositely from the position. This is the real meaning of the term negative feedback. y″ = y gives positive feedback. Current slang defines positive feedback as 'always positive', and that is a false reading of the phrase. In fact, positive feedback is always disastrous.

Dave Marain said...

Eric--
Welcome back (of course, I haven't been supplying you with much fuel!)

I had to make some difficult choices in what to include or exclude here. Since my primary goal was to reveal some of the beauty of linear algebra to high schoolers, I chose to make matrices the focus.

By the way, tc appropriately pointed out that I omitted the important idea that the composite of 2 rotation transformations is equivalent to the product of their matrices which in turn is equivalent to the rotation determined by the SUM of the angles. I deleted that step right before publishing it as I felt it was too much, but I probably should have left it in. Oh well...

Eric, I really like the complex 'argument' however and I did allude to it in the last paragraph. The idea that multiplying complex numbers in trig form or polar form involves adding their 'arguments' (i.e., angles) is powerful stuff.

Consider also the form of multiplying complex numbers in rectangular form:
(a+bi)(c+di) = (ac-bd) + (ad+bc)i
The real and complex parts should remind students of that same pattern one sees in the cos(t+u) and sin(t+u) formulas.

The differential equation argument is my favorite however. Using the idea that a solution can be be expressed in multiple forms and then equated is one that students rarely appreciate. Thanks for sharing that!

Related to that, using differentiation rather than integration, is one of my favorite calculus derivations:

Assume x and a are positive.
d/dx(ln(ax)) = 1/x
d/dx(ln(x)) = 1/x
Therefore, ln(ax) = ln(x) + C
Replacing x by 1 leads to C = ln(a) and, one has the product rule for logarithms!

Totally_clueless said...

"In fact, positive feedback is always disastrous."

Not entirely true. Electrical engineers have made effective use of positive feedback to make cool things like square wave generators and oscillators. When you want instability, this is one way to go.

TC.

Eric Jablow said...

There had been a death in my family last month, Dave.

TC, I see I had exaggerated the case. Now, should I bring up the old Polish joke about stability theory?

Dave Marain said...

My condolences, Eric.

Anonymous said...

Genial brief and this mail helped me alot in my college assignement. Thank you for your information.