Applications of Linear Algebra

Mohomed Ashkar Haris
4 min readFeb 7, 2022

--

Photo by Lamna The Shark on Unsplash

Abstract

The main aim of this papers is to discuss some examples where linear algebra can be used in solving real life problems. This involved modeling real life problem into linear algebraic mathematical structure and solve them using linear algebraic concepts. Within next paragraphs I hope to discuss how linear algebra can be used to build product recommendation algorithm and locate objects in Global Positioning System (GPS). Let us see one by one.

1. Product Recommendation

In modern world almost all the people are using online shops to purchase and order products to their doorsteps. When we start to search for a product in those websites, we can see a section named “Recommended for You”. Most of the time the product you are searching will be shown in that section.

Not only that, in Facebook, YouTube and Google Ads, they are recommending products in an intelligent manner.

Linear algebra is the main concept used in product recommendation system.

Let us see an example on how we can achieve this using linear algebra. There are many ways to achieve solution to product recommendation using linear algebra. In here I discuss this matter in a simple way.

Let us say there is a website which sells story books. It has already collected some ratings from their best customers.

Now we can store these ratings in a 5x4 matrix.

Now we can store features of the book. Here we consider 3 features Action, Horror, Science. Now we can have 5x3 matrix.

This means the book Time traveler has 45% of Action, 45% of Horror and 10% of science. Now we can store user preference in same manner. (User Preference values are unknown) Columns are how much user like to action content, horror content and scientific content. But still unknow. Rows are representing users. We can use 4x3 matrix.

This means Dave like A3% action content H3% horror content and S3% scientific content. Now we can calculate unknown A, H, S using below equation.

Let us say after solving we got,

A1=0.78, H1=0.82, S1=0.90

as values for Alice. (Not real solved values, for example only) Now we can say there is a new book named “Waterfall” arrived. It has 50% of Action content, 30% of Horror content and 20% of scientific content. Let us try to predict rating of Alice for the new book.

Rating = 5 x Feature(1x3) x [Preferences(1x3)] T

Rating = 5 x [ ] x [ ]

Rating = 5 x [0.816]

Rating = 4.08

Finally, we built a method to predict ratings using linear algebra. Moreover, we can optimize these algorithms to get more efficient results.

Let us see the next example.

2. Global Positioning System (GPS)

Astrophysics is one of the most trending topics in the last decade. Information gained from this field has helped to explain many details in solar system. Furthermore, due to this vast field, we can find a location of an object on earth surface within few milliseconds with high accuracy. Linear algebra is used to calculate these positions. For this, scientists use 3 satellites. Let us see how we can calculate position.

Let p1 = (x, y, z)

In here we take earth radius as 1

We have GPS equipment on (x, y, z) and it receive signals from satellite with following parameters.

Let us observe S1 data.

Distance between S1 and P1 w.r.t light speed,

Distance using (x, y, z),

We can do same for S2 and S3, then we can obtain matrix equation like following.

By solving this equation, we can obtain values for (x, y, z).

Conclusion

In this article we have discussed on two real world usage of linear algebra. Linear algebra is used in almost all the modern computer science algorithms such as machine learning, deep learning, conventional neural network etc. However, here we discussed only two applications.

References

[1]https://www.dit.ie/media/physics/documents/alkalbani.pdf

[2]https://www.quora.com/What-are-the-applications-of-linear-algebra-in-real-life

[3]https://www.math.uri.edu/~jbaglama/classes/2018-2019/fall/mth215/project1.pdf

--

--

Mohomed Ashkar Haris
Mohomed Ashkar Haris

No responses yet