Remember Trigonometry? Thats how you use it in ML
📰 Medium · Python
Learn how trigonometry is used in machine learning to build a movie recommendation system using vectors and cosine similarity
Action Steps
- Visualize movies as vectors in a mathematical space to represent user preferences
- Use direction and magnitude to describe user preferences and calculate similarities
- Apply cosine similarity to measure the angle between vectors and determine recommendations
- Build a simple movie recommendation system using Python and a library like scikit-learn or TensorFlow
- Test and evaluate the performance of the recommender system using metrics like precision and recall
Who Needs to Know This
Data scientists and machine learning engineers can benefit from understanding how trigonometry is applied in ML to build recommender systems, while software engineers can learn how to implement these concepts in code
Key Insight
💡 Trigonometry is used in machine learning to calculate similarities between vectors, enabling applications like recommender systems
Share This
📽️ Did you know trigonometry powers Netflix's movie recommendations? Learn how vectors, directions, and angles come together to suggest your next favorite film 🤖
Key Takeaways
Learn how trigonometry is used in machine learning to build a movie recommendation system using vectors and cosine similarity
Full Article
Title: Remember Trigonometry? Thats how you use it in ML
URL Source: https://medium.com/@nikj0113/remember-trigonometry-thats-how-you-use-it-in-ml-07da8a6b7680?source=rss------python-5
Published Time: 2026-04-25T00:30:17Z
Markdown Content:
# Remember Trigonometry? Thats how you use it in ML | by Nikhil Joshi | Apr, 2026 | Medium
[Sitemap](https://medium.com/sitemap/sitemap.xml)
[Open in app](https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40nikj0113%2Fremember-trigonometry-thats-how-you-use-it-in-ml-07da8a6b7680&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)
[](https://medium.com/?source=post_page---top_nav_layout_nav-----------------------------------------)
Get app
[Write](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fmedium.com%2Fnew-story&source=---top_nav_layout_nav-----------------------new_post_topnav------------------)
[Search](https://medium.com/search?source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40nikj0113%2Fremember-trigonometry-thats-how-you-use-it-in-ml-07da8a6b7680&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)

# Remember Trigonometry? Thats how you use it in ML
[](https://medium.com/@nikj0113?source=post_page---byline--07da8a6b7680---------------------------------------)
[Nikhil Joshi](https://medium.com/@nikj0113?source=post_page---byline--07da8a6b7680---------------------------------------)
Follow
5 min read
·
1 hour ago
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Fp%2F07da8a6b7680&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40nikj0113%2Fremember-trigonometry-thats-how-you-use-it-in-ml-07da8a6b7680&user=Nikhil+Joshi&userId=9f8820245f7c&source=---header_actions--07da8a6b7680---------------------clap_footer------------------)
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2F07da8a6b7680&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40nikj0113%2Fremember-trigonometry-thats-how-you-use-it-in-ml-07da8a6b7680&source=---header_actions--07da8a6b7680---------------------bookmark_footer------------------)
[Listen](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2Fplans%3Fdimension%3Dpost_audio_button%26postId%3D07da8a6b7680&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40nikj0113%2Fremember-trigonometry-thats-how-you-use-it-in-ml-07da8a6b7680&source=---header_actions--07da8a6b7680---------------------post_audio_button------------------)
Share
Remember trigonometry?
Sine, cosine, angles… the stuff that once felt abstract, maybe even pointless?
Now imagine this: every time Netflix suggests a movie you end up loving, there’s a good chance **that same trigonometry is quietly at work behind the scenes**.
Not in the form of triangles on paper — but as **vectors, directions, and angles in a mathematical space**.
In this article, we’ll take a concept you already know and give it a completely new meaning:
* We’ll turn movies into **vectors you can visualize**
* Understand how **direction and magnitude describe preferences**
* See how **cosine similarity measures taste using angles**
* And finally, build a simple **movie recommendation system where all of this comes together**
_By the end, trigonometry won’t feel like a school topic anymore — it’ll feel like a tool that powers real-world intelligence._
**So lets see the structur
URL Source: https://medium.com/@nikj0113/remember-trigonometry-thats-how-you-use-it-in-ml-07da8a6b7680?source=rss------python-5
Published Time: 2026-04-25T00:30:17Z
Markdown Content:
# Remember Trigonometry? Thats how you use it in ML | by Nikhil Joshi | Apr, 2026 | Medium
[Sitemap](https://medium.com/sitemap/sitemap.xml)
[Open in app](https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40nikj0113%2Fremember-trigonometry-thats-how-you-use-it-in-ml-07da8a6b7680&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)
[](https://medium.com/?source=post_page---top_nav_layout_nav-----------------------------------------)
Get app
[Write](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fmedium.com%2Fnew-story&source=---top_nav_layout_nav-----------------------new_post_topnav------------------)
[Search](https://medium.com/search?source=post_page---top_nav_layout_nav-----------------------------------------)
Sign up
[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40nikj0113%2Fremember-trigonometry-thats-how-you-use-it-in-ml-07da8a6b7680&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)

# Remember Trigonometry? Thats how you use it in ML
[](https://medium.com/@nikj0113?source=post_page---byline--07da8a6b7680---------------------------------------)
[Nikhil Joshi](https://medium.com/@nikj0113?source=post_page---byline--07da8a6b7680---------------------------------------)
Follow
5 min read
·
1 hour ago
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Fp%2F07da8a6b7680&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40nikj0113%2Fremember-trigonometry-thats-how-you-use-it-in-ml-07da8a6b7680&user=Nikhil+Joshi&userId=9f8820245f7c&source=---header_actions--07da8a6b7680---------------------clap_footer------------------)
[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2F07da8a6b7680&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40nikj0113%2Fremember-trigonometry-thats-how-you-use-it-in-ml-07da8a6b7680&source=---header_actions--07da8a6b7680---------------------bookmark_footer------------------)
[Listen](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2Fplans%3Fdimension%3Dpost_audio_button%26postId%3D07da8a6b7680&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40nikj0113%2Fremember-trigonometry-thats-how-you-use-it-in-ml-07da8a6b7680&source=---header_actions--07da8a6b7680---------------------post_audio_button------------------)
Share
Remember trigonometry?
Sine, cosine, angles… the stuff that once felt abstract, maybe even pointless?
Now imagine this: every time Netflix suggests a movie you end up loving, there’s a good chance **that same trigonometry is quietly at work behind the scenes**.
Not in the form of triangles on paper — but as **vectors, directions, and angles in a mathematical space**.
In this article, we’ll take a concept you already know and give it a completely new meaning:
* We’ll turn movies into **vectors you can visualize**
* Understand how **direction and magnitude describe preferences**
* See how **cosine similarity measures taste using angles**
* And finally, build a simple **movie recommendation system where all of this comes together**
_By the end, trigonometry won’t feel like a school topic anymore — it’ll feel like a tool that powers real-world intelligence._
**So lets see the structur
DeepCamp AI