An Introduction to Trigonometry ... by Brandon WilliamsMain Index... Introduction Well it is nearly one in the morning and I have tons of work to do and a fabulous idea pops into my head: How about writing an introductory tutorial to trigonometry! I am going to fall so far behind. And once again I did not have the chance to proof read this or check my work so if you find any mistakes e-mail me.I'm going to try my best to write this as if the reader has no previous knowledge of math (outside of some basic Algebra at least) and I'll do my best to keep it consistent. There may be flaws or gaps in my logic at which point you can e-mail me and I will do my best to go back over something more specific. So let's begin with a standard definition of trigonometry:trig - o - nom - e - try n. - a branch of mathematics which deals with relations between sides and angles of triangles Basics Well that may not sound very interesting at the moment but trigonometry is the most interesting forms of math I have come across…and just to let you know I do not have an extensive background in math. Well since trigonometry has a lot to do with angles and triangles let's familiarize ourselves with some fundamentals. First a right triangle: A right triangle is a triangle that has one 90-degree angle. The 90-degree angle is denoted with a little square drawn in the corner. The two sides that are adjacent to the 90-degree angle, 'a' and 'b', are called the legs. The longer side opposite of the 90-degree angle, 'c', is called the hypotenuse. The hypotenuse is always longer than the legs. While we are on the subject lets brush up on the Pythagorean Theorem. The Pythagorean Theorem states that the sum of the two legs squared is equal to the hypotenuse squared. An equation you can use is:c^2 = a^2 + b^2So lets say we knew that 'a' equaled 3 and 'b' equaled 4 how would we find the length of 'c'…assuming this is in fact a right triangle. Plug-in the values that you know into your formula:c^2 = 3^2 + 4^2Three squared plus four squared is twenty-five so we now have this:c^2 = 25 - - - > Take the square root of both sides and you now know that c = 5So now we are passed some of the relatively boring parts. Let's talk about certain types of right triangles. There is the 45-45-90 triangle and the 30-60-90 triangle. We might as well learn these because we'll need them later when we get to the unit circle. Look at this picture and observe a few of the things going on for a 45-45-90 triangle:In a 45-45-90 triangle you have a 90-degree angle and two 45-degree angles (duh) but also the two legs are equal. Also if you know the value of 'c' then the legs are simply 'c' multiplied by the square root of two divided by two. I rather not explain that because I would have to draw more pictures…hopefully you will be able to prove it through your own understanding. The 30-60-90 triangle is a little but harder to get but I am not going into to detail with it…here is a picture: You now have one 30-degree angle, a 60-degree angle, and a 90-degree angle. This time the relationship between the sides is a little different. The shorter side is half of the hypotenuse. The longer side is the hypotenuse times the square root of 3 all divided by two. That's all I'm really going to say on this subject but make sure you get this before you go on because it is crucial in understanding the unit circle…which in turn is crucial for understanding trigonometry. Trigonometric Functions The entire subject of trigonometry is mostly based on these functions we are about to learn. The three basic ones are sine, cosine, and tangent. First to clear up any confusion that some might have: these functions mean nothing with out a number with them i.e. sin (20) is something…sin is nothing. Make sure you know that. Now for some quick definitions (these are my own definitions…if you do not get what I am saying look them up on some other website): Sine - the ratio of the side opposite of an angle in a right triangle over the hypotenuse. Cosine - the ratio of the side adjacent of an angle in a right triangle over the hypotenuse. Tangent - the ratio of the side opposite of an angle in a right triangle over the adjacent side.Now before I go on I should also say that those functions only find ratios and nothing more. It may seem kind of useless now but they are very powerful functions. Also I am only going to explain the things that I think are useful in Flash…I could go off on some tangent (no pun intended) on other areas of Trigonometry but I'll try to keep it just to the useful stuff. OK lets look at a few pictures: Angles are usually denoted with capital case letters so that is what I used. Now lets find all of the trigonometry ratios for angle A:sin A = 4/5 cos A = 3/5 tan A = 4/3 Now it would be hard for me to explain more than what I have done, for this at least, so you are just going to have to look at the numbers and see where I got them from. Here are the ratios for angle B: sin B = 3/5 cos B = 4/5 tan B = 3/4 Once again just look at the numbers and reread the definitions to see where I came up with that stuff. But now that I told you a way of thinking of the ratios like opposite over hypotenuse there is one more way which should be easier and will also be discussed more later on. Here is a picture…notice how I am only dealing with one angle: The little symbol in the corner of the triangle is a Greek letter called "theta"…its usually used to represent an unknown angle. Now with that picture we can think of sine, cosine and tangent in a different way:sin (theta) = x/r cos (theta)= y/r tan (theta)= y/x -- and x <> 0We will be using that form most of the time. Now although I may have skipped some kind of fundamentally important step (I'm hoping I did not) I can only think of one place to go from here: the unit circle. Becoming familiar with the unit circle will probably take the most work but make sure you do because it is very important. First let me tell you about radians just in case you do not know. Radians are just another way of measuring angles very similar to degrees. You know that there are 90 degrees in one-quarter of a circle, 180 degrees in one-half of a circle, and 360 degrees in a whole circle right? Well if you are dealing with radians there are 2p radians in a whole circle instead of 360 degrees. The reason that there are 2p radians in a full circle really is not all that important and would only clutter this "tutorial" more…just know that it is and it will stay that way. Now if there are 2p radians in a whole circle there are also p radians in a half, and p/2 radians in a quarter. Now its time to think about splitting the circle into more subdivisions than just a half or quarter. Here is a picture to help you out: If at all possible memorize those values. You can always have a picture to look at like this one but it will do you well when you get into the more advanced things later on if you have it memorized. However that is not the only thing you need to memorize. Now you need to know (from memory if you have the will power) the sine and cosine values for every angle measure on that chart. OK I think I cut myself short on explaining what the unit circle is when I moved on to explaining radians. For now the only thing we need to know is that it is a circle with a radius of one centered at (0,0). Now the really cool thing about the unit circle is what we are about to discuss. I'm going to just pick some random angle up there on the graph…let's say…45 degrees. Do you see that line going from the center of the circle (on the chart above) to the edge of the circle? That point at which the line intersects the edge of the circle is very important. The "x" coordinate of that point on the edge is the cosine of the angle and the "y" coordinate is the sine of the angle. Very interesting huh? So lets find the sine and cosine of 45 degrees ourselves without any calculator or lookup tables. Well if you remember anything that I said at the beginning of this tutorial then you now know why I even mentioned it. In a right triangle if there is an angle with a measure of 45 degrees the third angle is also 45 degrees. And not only that but the two legs of the triangle have the same length. So if we think of that line coming from the center of the circle at a 45-degree angle as a right triangle we can find the x- and y-position of where the line intersects…look at this picture:If we apply some of the rules we learned about 45-45-90 triangles earlier we can accurately say that:``` sqrt (2) sin 45 = -------- 2 sqrt (2) cos 45 = ---------- 2``` Another way to think of sine is it's the distance from the x-axis to the point on the edge of the circle…you can only think of it that way if you are dealing with a unit circle. You could also think of cosine the same way except it's the distance from the y-axis to the point on the border of the circle. If you still do not know where I came up with those numbers look at the beginning of this tutorial for an explanation of 45-45-90 triangles…and why you are there refresh yourself on 30-60-90 triangles because we need to know those next.Now lets pick an angle from the unit circle chart like 30 degrees. I'm not going to draw another picture but you should know how to form a right triangle with a line coming from the center of the circle to one of its edges. Now remember the rules that governed the lengths of the sides of a 30-60-90 triangle…if you do then you can once again accurately say that:``` 1 sin 30 = ---- 2 sqrt (3) cos 30 = --------- 2 ``` I was just about to type out another explanation of why I did this but it's basically the same as what I did for sine just above. Also now that I am rereading this I am seeing some things that may cause confusion so I thought I would try to clear up a few things. If you look at this picture (it's the same as the one I used a the beginning of all this) I will explain with a little bit more detail on how I arrived at those values for sine and cosine of 45-degrees: Our definition of sine states that the sine of an angle would be the opposite side of the triangle divided by the hypotenuse. Well we know our hypotenuse is one since this a unit circle so we can substitute a one in for "c" and get this:` / 1*sqrt(2) \ | ------------ | \ 2 /sin 45 = ------------------- 1` Which even the most basic understand of Algebra will tell us that the above is the same as: ` sqrt (2) sin 45 = -------- 2 ` Now if you do not get that look at it really hard until it comes to you…I'm sure it will hit you sooner or later. And instead of my wasting more time making a complete unit circle with everything on it I found this great link to one: http://www.infomagic.net/~bright/research/untcrcl.gif . Depending on just how far you want to go into this field of math as well as others like Calculus you may want to try and memorize that entire thing. Whatever it takes just try your best. I always hear people talking about different patterns that they see which helps them to memorize the unit circle, and that is fine but I think it makes it much easier to remember if you know how to come up with those numbers…that's what this whole first part of this tutorial was mostly about.Also while on the subject I might as well tell you about the reciprocal trigonometric functions. They are as follow: csc (theta) = r/y sec (theta) = r/x cot (theta) = x/y Those are pronounced secant, cosecant, and cotangent. Just think of them as the same as their matching trigonometric functions except flipped…like this: sin (theta) = y/r - - - > csc (theta) = r/y cos (theta) = x/r - - - > sec (theta) = r/x tan (theta) = y/x - - - > cot (theta) = x/y That makes it a little bit easier to understand doesn't it? Well believe it or not that is it for an introduction to trigonometry. From here we can start to go into much more complicate areas. There are many other fundamentals that I would have liked to go over but this has gotten long and boring enough as it is. I guess I am hoping that you will explore some of these concepts and ideas on your own…you will gain much more knowledge that way as opposed to my sloppy words. Before I go… Before I go I want to just give you a taste of what is to come…this may actually turn out to be just as long as the above so go ahead and make yourself comfortable. First I want to introduce to you trigonometric identities, which are trigonometric equations that are true for all values of the variables for which the expressions in the equation are defined. Now that's probably a little hard to understand and monotonous but I'll explain. Here is a list of what are know as the "fundamental identities":``` Reciprocal Identities 1 csc (theta) = ---------- , sin (theta) <> 0 sin (theta) 1 sec (theta) = ---------- , COs (theta) <> 0 cos (theta) 1 cot (theta) = ---------- , tan (theta) <> 0 tan (theta) Ratio Identities sin (theta) tan (theta) = ------------ , cos (theta) <> 0 cos (theta) cos (theta) cot (theta) = ------------- , sin (theta) <> 0 sin (theta) Pythagorean Identities sin^2(theta) + cos^2(theta) = 1 1 + cot^2(theta) = csc^2(theta) 1 + tan^2(theta) = sec^2(theta) Odd-even Identities sin (-theta) = -sin (theta) cos (-theta) = cos (theta) tan (-theta) = -tan (theta) csc (-theta) = csc (theta) sec (-theta) = sec (theta) cot (-theta) = -cot (theta)``` Now proving them…well that's gonna take a lot of room but here it goes. I'm only going to prove a few out of each category of identities so maybe you can figure out the others. Lets start with the reciprocal. Well if the reciprocal of a number is simply one divided by that number then we can look at cosecant (which is the reciprocal of sine) as:``` 1 csc (theta) = ----- ----------------- >>> | If you multiply the numerator and the denominator by "r" you get: / y \ | |---- | < -- I hope you know | csc (theta) = r/y < -- Just like we said before. We just proved \ r / that is sine (theta) | an identity...I'll let you do the rest of them... ``` Now the ratio identities. If you think of tangent as y/x , sine as y/r , and cosine as x/r then check this out:``` sin (theta) --- > y/r y tan (theta) = -------------- --- > ----- --- > Multiply top and bottom by "r" and you're left with --- > --- cos (theta) --- > x/r x ``` I'm going to save the proof for the Pythagorean Identities for another time. These fundamental identities will help us prove much more complex identities later on. Knowing trigonometric identities will help us understand some of the more abstract things…at least they are abstract to me. Once I am finished with this I am going to write another tutorial that will go into the somewhat more complex areas that I know of and these fundamental things I have just talked about are required reading.I was going to go over some laws that can be very useful but my study plan tells me that I may not have provided enough information for you to understand it…therefore that will be something coming in the next thing I write.Closing thoughts Well this concludes all the things that you will need to know before you start to do more complicated things. I was a bit brief with some things so if you have any questions or if you want me to go back and further explain something I implore you to e-mail me and I will do my best to clear up any confusion. Also I want to reiterate that this is a very basic introduction to trigonometry. I hope you were not expecting to read this and learn all there is to know. Actually I have not really even mentioned Flash or the possibilities yet…and quite honestly there is not really anything to work with yet. However once I do start to mention Flash and the math that it will take to create some of these effects everyone sees it will almost be just like a review. When you sit down and want to write out a script it will be like merely translating everything you learned about trigonometry from a piece of paper into actionscript. If you want a little synopsis of what I plan on talking about in the next few things I write here you go:- Trigonometry curves - More advanced look into trigonometry - Programmatic movement using trigonometry - Orchestrating it all into perfect harmony (pardon the cliché) Well that's it for me…until next time.