Main content

## Mathematics of rotation

# 3. Completing the proof

## Video transcript

(Springing sound) - In the previous exercise, you should have found that length OA is R cosine theta. But why? First notice that OPA is a right triangle. So we can use sine and cosine. OA is the side adjacent to theta. Meaning that OA equals R cosine theta. Similarly, AP prime equals R sine theta. Good. So we need to show that angle DP prime A is phi. That's because there are similar triangles lurking in there. In particular, this triangle, and this triangle are similar. To see that, notice that this angle is equal to this angle. Because of the opposite angle theorem, notice also that this angle is 90 degrees, as is this angle. Meaning that the two triangles share two angles. They must also share the third angle, because all three angles must add up to 180 degrees. Thus, CP prime A is phi. Now we're set. One thing we're looking for is this distance, OC, because that's X prime. As we observed earlier, OC is equal to OB minus BC. So X prime equals OB minus BC. And since BC equals AD, we can write X prime equals OB minus AD. But what's OB? It's adjacent to phi, so cosine phi equals OB over OA. And we know that OA equals R cosine theta. So cosine phi equals OB over R cosine theta. And OB equals R cosine theta, cosine phi. So OB equals R cosine phi times cosine theta. But we know that R cosine phi is just X, so OB equals X cosine theta. Now what's AD? Well, AD is opposite phi in the triangle DP prime A. So sine phi equals AD over AP prime. And we know that AP prime equals R sine theta. So sine phi equals AD over R sine theta, which means that AD equals R sine theta sine phi. Which can be rearranged to be R sine phi times sine theta, and we know that R sine phi is just Y. So AD equals Y sine theta. Okay, so that means X prime equals X cosine theta minus Y sine theta. So we're halfway there. Now we just need to know what Y prime is. CP prime is Y prime, and it can be written as CP prime equals DP prime plus AB. DP prime is adjacent to phi, so cosine phi equals DP prime over AP prime. But AP prime is R sine theta. So, cosine phi equals DP prime over R sine theta. And DP prime equals R sine theta times cosine phi, which equals X sine theta. AB is opposite phi, so sine phi equals AB divided by OA. But OA is R cosine theta, so sine phi equals AB over R cosine theta. And that means AB equals R sine phi times cosine theta. But R sine phi is just Y, so AB equals Y cosine theta. Putting this together Y prime equals X sine theta plus Y cosine theta. Yay! We did it! In summary, X prime equals X cosine theta minus Y sine theta and Y prime equals X sine theta plus Y cosine theta. You hung in there, and now you've seen a super useful and prevalent formula. Whether you're doing computer graphics or building bridges or triangulating positions, you're gonna see these formulas come up again and again and again. Use the next exercise to get some practice with them.