I did not know that I will use Trigonmetry functions in my career when I studied it in my college days. Now, I see its importance in the software engineering, software test engineering, and the math I do in my testing.
Sin, Cos and Tan
Sine (sin), Cosine (cos) and Tangent (tan) are three ways to describe the relationship between an angle and the sides of a right angled triangle.
The Trigonometry functions, especially the "cos" is useful in software engineering, graphics, AI, and robotics.
Sine (sin) = Opposite / Hypotenuse
- Tells how much of the hypotenuse is represented by the opposite side.
Cosine (cos) = Adjacent / Hypotenuse
- Tells how much of the hypotenuse is represented by te adjancent side.
Tangent (tan) = Opposite / Adjancent
- Tells how steep the triangle is for that angle.
I used this mnemonic in 1st PUC to visualize this,
- SOH: Sine = Opposite / Hypotenuse
- CAH: Cosine = Adjacent / Hypotenuse
- TOA: Tangent = Opposite / Adjacent
Note: 1st PUC is Class 11 in Karnataka.
Why Cosine is called Cosine?
The two angles are complementary when their sum is 90°.
Say, for example
- Angle A = 30°
- Angle B = 60°
Together, they make 90°.
The name cosine (cos) comes from "complementary sine". The two angles are complementary when their sum is 90°.
In the right angle triangle, the sine of an angle is the cosine of the other non-right angle.
That is,
cos(30°) = sin(60°), and
sin(30°) = cos(60°)
That is, the side adjacent to one angle is the opposite side of its complementary angle. The hypotenuse remains the same.
Therefore, Cos(Θ) = sin (90° - Θ). Replace the Θ with 30 and 60. The expression unfolds to above highlighted.
- In the right angle triangle, the sine of an angle is the cosine of the other non-right angle.
- This is the mathematical relationship behind the name.
Note:
Sine (sin), this mathematical term is dervied from a concept called jya (or jiva) used by Indian mathematicians. It means, measurement of particular chord related dimension in a circle. In the later centuries, the Latin word sinus became the English word sine.
Cosine Similarity
The cosine similarity tell, how similar the two things are by comparing the direction of their vectors. We use the cosine similarity very much in AI and Machine Learning, and its testing.
The next blog post will cover this with examples and explanation.
To summarize,
- Think of each function as answering a different qestion about an angle.
- Sin, interpret it as, how large is the opposite side relative to the hypotenuse.
- Cos, interpret it as, how large is the adjacent side relative to the hypotenuse.
- Tan, interpret it as, how large is the opposite side relative to the adjacent side.
- Cosine Similarity is important to understand in Software Engineering and Software Test Engineering for AI and Machine Learning.
Reference:
1. https://commack.math.stonybrook.edu/~tony/history-resources/HISTORY_OF_TRIGONOMETRIC_F.pdf
2. https://www.youtube.com/shorts/3G0twX9HpBM


No comments:
Post a Comment
Please, do write your comment on the read information. Thank you.