Hey y’all!
Today is Free Comic Book Day where famous comic story companies like Marvel and DC collaborate to distribute free comic books to thousands of stores nationwide!
Oh, you wanna go for a tan? Why? Oh, cos you want to sine some autographs?
Let us forget that I ever wrote that cringy sentence. Anyways, while some of us know this, others don’t: one of the paramount concept of geometry and math itself–trigonometry. This thread will cover the basics from the naming of the sides of a triangle to the law of cosines and sines. Additionally, although I won’t dive too much into them, I’ll also cover the three additional trig ratios (csc, sec, cot). Don’t worry if you don’t know those terms at all!
Trigonometry becomes a basic thing that most programmers need to understand, similar to how we all know basic math operations (addition, subtraction, multiplication, and division). While most things you’ll learn in this tutorial are applicable to Roblox, some may not be, but still deserve to stay since they’re part of the subject.
Disclaimer:
 You will need to know some algebra (i.e. solving equations).
 There may be cringy grammar or conceptual mistakes since this took me hours to write, so please be patient! DM me if you find any.
Section 1: Right Triangle Components
In trigonometry, the names of the sides matter a lot. Therefore, we need to get a good understanding of them.

The side opposite of the right angle (blue) is always knowns as the hypotenuse. However, the two other sides, known as “legs”, (red and green) can vary in names depending on what angle you chose (excluding the right angle).

In terms of the angle marked in yellow, the opposite side is a leg the angle faces towards (green). In other words, it’s the side that it’s not touching, the side that’s farthest from it.

Also in terms of the yellow angle, the adjacent side is a leg that it touches (red). The hypotenuse does not count since it’s not a leg and has it’s own distinct name already.
Section 2: Labeling

Since a triangle is a figure created from three points, a triangle can be named with any capital letters in any order (it doesn’t matter since it’s only three sides). The triangle above can be known as ΔABC (do not confuse the symbol with delta, it’s a triangle in this instance), ΔBAC, ΔCAB, or really anything from those three letters.

There are two ways to name the sides of a triangle:
 Using the lowercase letter of the point across from it (i.e side c is cross from point C).
 Or by writing the names of the two points that create it (i.e. side AB spans from point A to point B)

There are also two ways to name an angle (three technically):
 Use the threeletter from one side of the anglevertexother side of the angle. For example, the orange angle can be ∠CAB or ∠BAC (any of them as long as the vertex “A” is in the middle).
 A shorter way is to just name the vertex itself since there aren’t any other angles within. The orange angle can simply be called ∠A.
 It is most commonly named Θ (theta), a Greek letter.
Section 3: Trig Ratios (sin, cos, tan)
Trig ratios are basically fractions of a side length divided by another side length (adjacent, opposite, and hypotenuse).
 The sine of Θ, noted as sin(Θ), represents the ratio the side opposite divided by the hypotenuse (i.e. sin(Θ) = a/c).
 The cosine of Θ, written as cos(Θ), is the side adjacent divided by the hypotenuse (i.e. cos(Θ) = b/c).
 The tangent of Θ, simply known as tan(Θ), is the side opposite divided by the side adjacent (i.e. tan(Θ) = a/b). This is a little different from the previous two as it does not involve the hypotenuse.
This can be challenging to remember, especially if you’re completely new to this, so until you get the hang of it, just remember:
SOH CAH TOA
Abbreviation of:
Sine Opposite/Hypotenuse
Cosine Adjacent/Hypotenuse
Tangent Opposite/Adjacent
Over time, you won’t even need this, it’ll be there in your brain just like that!
The sin, cos, and tan of a number will always remain the same. A calculator has these values precalculated and any decimal value is approximated because it falls between two whole numbers. You can do more research on this, it’s pretty cool in my opinion!
STOP  Practice Time!
Using the concepts you learned so far, answer the following questions. Then, check your answers by revealing the spoiler next to/below it!
Questions
Question 1: What is the name of the side across from the right angle in a right triangle? Hypotenuse
Question 2: What is the sine of an angle (ratio of sides)? opp/hyp
Question 3: Use a calculator and your previous algebraic knowledge to solve the given problem. Make sure to set the mode to deg not rad as it will give a different result to sin, cos, tan! Round all answers to the tenths.
Solution:
h = hypotenuse (the unknown side)
cos(25) = 5 / h
h * cos(25) = 5
h = 5 / cos(25)
h = 5.5
[CHALLENGE] Question 4: Express the ratio of tan in terms of sin and cos.
Solution:
(Using the diagram from question 3)
tan(∠A) = a/b
sin(∠A) = a/c
cos(∠A) = b/c
_
We only need the a and the b, so how do we cancel out the c?
_
a/b = a/c * c/b = a/c ÷ b/c = sin(∠A) / cos(∠A) = tan(∠A)
_
So, tan(∠A) = sin(∠A) / cos(∠A).
Section 4: Inverse Trig Functions
So, now we can solve for sides using the trig ratios, but what if we were given two sides and we have to find the angle in between (for right triangles)? This is where the inverse counterparts of the three trig ratios come in:
They work very similarly to their normal counterparts. But, instead of putting in the angle measure, you put in the ratio of the sides corresponding to that trig ratio. For example, sin1(a/c) because a/c is what sine is represented by.
If your calculator has sin, cos, tan buttons, then there’s bound to be their inverses in there as well! In the Google calculator (which I mostly use), the inverses are known as arcsin()
, arccos()
, and arctan()
and they’ll appear in the place of the normal trig functions after pressing Inv
:
STOP  Practice Time #2!
Questions
There will only be one question, and here’s a hint, it’s about section 4!
Question 1: Find the measure of the angle. Round your answer to the nearest degree.
arctan(8 / 12) = 34°
Section 5: Special Right Triangles
There are “special” right triangles with certain degree measures that have very definite side lengths (relatively). When you encounter these triangles, you’ll be able to solve them much faster than using the trig ratios!
454590 Triangle
 A 454590 triangle has two 45° angles, meaning there are two congruent legs x (isosceles triangles).
 The hypotenuse is x√2.
Similarly, you can work backward: if the hypotenuse is x, then the legs are x / √2.
306090 Triangle
This is a little more difficult to remember, but you’ll get the hang of it eventually!
 The side across from the 30° angle is x.
 Across from 60°, the side measure is x√3.
 The hypotenuse is simply 2x.
You can check with a calculator yourself if you want, and the values derived from using trig ratios and simply using special triangles will be the same.
Section 6: Pythagorean Trig Identity
In short, the Pythagorean trig identity is basically the equation above. Sine of theta squared plus cosine of theta squared equals 1.
And we’re going to prove it right now:
Why might this be useful, you may ask? Well, this equation is fundamental for unit circles, which is a whole new world of math and deserves its own tutorial .
STOP  Practice Time #3!
Questions
Question 1: Solve the triangle below (find all angle measures and side lengths).
Solution:
All triangles add up to 180, so m∠B = 180°  90°  30° = 60°
What do you know? It’s a 306090 triangle!
Since b is across from 60° angle, a must be 5 / √3 = (5√3) / 3.
c must be 2 times a, which is (10√3) / 3.
Question 2: If sin^2(Θ) = 0.36, find cos(Θ).
Solution:
According to the Pythagorean Trig Identity, sin^2(Θ) + cos^2(Θ) = 1:
0.36 + cos^2(Θ) = 1
cos^2(Θ) = 0.64
cos(Θ) = 0.8
Section 7: Law of Sines
 This applies to ANY type of triangle, whether or not it’s right, Law of Sines doesn’t care.
 The ratio of the side length divided by the sine of the opposite angle is the same for all three sides of a triangle.
 The reciprocal is also true.
This law is useful when you’re finding a side or angle and you’re given the opposite side/angle and one pair of sideangles. For example, if you’re finding side b, and you’re given m∠B, side c, and m∠C, then you can use the Law of Sines.
Section 8: Law of Cosines
Just like the Law of Sines, the Law of Cosines works with any triangle.
This may seem complex at first, so, here’s the general formula:
Note: angle1 is between side2 and side3. Law of Cosines can only be used when you have the angle in between the two sides to the right of the equation (if that makes sense).
This is primarily useful when you are given three sides of a triangle, but you’re finding a certain angle. Or if you’re given an angle and two sides that create that angle, and you’re finding the opposite side. For example, if you’re given side b, side c, and m∠A and you’re trying to find side a.
NOTE
When you are given SAS (a side, an angle in between, and another side adjacent to it), you need to use a combination of both Law of Sines and Cosines. First, doing the Law of Cosines will give you the side across from the given angle, meaning you can now use the Law of Sines to set a proportion with that angleside pair and an unknown angle with the side across from it.
BUT, beware! You must find the smaller angle! And remember, to find the smaller angle of the two unknown ones, just look at the side length across from it. Choose the angle in which the side length across from it is less than the side length across from the other unknown angle. We’ll see this in action in Practice 4 Question 3!
For more info, please read my reply.
STOP  Practice Time #4!
Questions
Question 1: Solve for m∠A in degrees. Round to the nearest whole.
Solution:
It will be easier to set it up with sine at the numerator and the side at the denominator.
sin(48) / 7 = sin(∠A) / 9
9 * sin(48) / 7 = sin(∠A)
sin1(9 * sin(48) / 7) = m∠A
m∠A = 73°
Question 2: Find the unknown side. Round your answer to the nearest tenth.
Solution:
a^2 = 8^2 + 7^2  2 * 8 * 7 * cos(37)
a = √(64 + 49  112 * cos(37))
a = √(113  112 * cos(37))
a = 4.9
[CHALLENGE] Question 3: Solve the triangle. Find all sides and angles. Round lengths to the nearest tenth and degrees to the nearest whole number.
Solution:
Using the Law of Cosines:
c = √(256 + 25  32 * 5 * cos(61))
c = √(281  160 * cos(61))
c = 14.3
_
Using the Law of Sines (remember smaller angle first (B), meaning the one across from side with length 5):
sin(61) / 14.3 = sin(B) / 5
5 * sin(61) / 14.3 = sin(B)
sin1(5 * sin(61) / 14.3) = m∠B
m∠B = 18°
_
Angles in a triangle add to 180:
m∠A = 180°  61°  18° = 101°
Section 9: More Trig Functions (csc, sec, cot)
As I said thousands of words yonder, I will not go very deep into this. At this point, the line between trigonometry and calculus are blurred. But, I thought I’d show it to you anyways.
 Cosecant, written as csc, is the reciprocal of the ratio that is a sine. Don’t get this confused with this being paired with cosine because it has “co” in it, it belongs with sine!
 Secant, noted as sec, is the reciprocal of cosine.
 Cotangent, also known as cot, is the reciprocal of tangent.
You can research more about them if you want, but the basics of trigonometry end right here, I’m afraid .
Application to Roblox
(must provide radians)
math.sin(math.rad(degrees)) sine
math.cos(math.rad(degrees)) cosine
math.tan(math.rad(degrees)) tangent
(returns radians)
math.deg(math.asin(ratio)) inverse sine
math.deg(math.acos(ratio)) inverse cosine
math.deg(math.atan(ratio)) inverse tangent
(trig in math functions)
Vector3.new(x, y, z):Dot(Vector3.new(a, b, c)) a b * cos(Θ)
more that I may not know about :)
For the last one, make sure you check out @BuilderBudCarl vector mathematics tutorial, it’s very indepth and informational!
So, I hope you found this tutorial useful. As I mentioned before, some concepts like sin, cos, tan, arcsin, arccos, arctan, may be much more useful to Roblox development than concepts such as the csc, sec, and cot. It really depends since trigonometry is a vast subfield, just like math itself.
Polls
How useful is this tutorial (and/or the information inside of it) to you? Please rate from 110.
 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
0 voters
How clear was the information conveyed? Rate from 110.
 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
0 voters
Did you learn anything new? Even a single concept that I didn’t cover majorly.
 Yes
 No
0 voters
Feel free to share comments, concerns, or questions via replies!
Thank you for reading (if you didn’t skip) and your feedback,
and have a trigonometric day!
Topic Edits
Sat, May 2, 2020:
 Corrections
Sun, May 3, 2020:
 More fixes
 Cringy pun addition at the beginning (you’re welcome)
 The addition of this topic edits dropdown
Sat, Nov 28, 2020:
 Added NOTES section right after Law of Sines & Cosines (please view it if you haven’t already!)