Get startedGet started for free

Motivation for Solving Matrix-Vector Equations

1. Solving Matrix-Vector Equations

In this chapter, our focus will be on solving matrix-vector equations. One of the most important questions one can ask in real-world applications is whether one object can be built from many other atomic objects and if this build is unique. If the build in linear and the objects are vectors (as is often the case in data science), this question can be framed as a matrix-vector equation. Almost every machine learning problem looks like a matrix-vector equation at some point, so the importance of this topic cannot be overstated.

2. Motivation - Can These Vectors Make That Vector?

For the purposes of this lecture, we're going to look at matrix-vector multiplication in a slightly different way. Notice that, through decomposition, you can view the multiplication of a matrix A by a vector x as the sum of the elements of the vector times each of the columns of the matrix. The sum of vectors multiplied by constants is called a linear combination of vectors.

3. Motivation - Can These Vectors Make That Vector?

Notice that we can test this result in R, and it is indeed true that A times x is

4. Motivation - Can These Vectors Make That Vector?

the linear combination of the columns of A and the elements of x.

5. Motivation - Can These Vectors Make That Vector?

Notice that the R quirk of column vectors and row vectors is again manifested here.

6. Motivation - Can These Vectors Make That Vector?

Thus, what a matrix-vector equation, the question of solving Ax = b for x, is asking whether the vector b can be produced via a linear combination of the columns of the matrix A. Thus, for this example, the question is about finding x_1 and x_2 that allow us to create the vector (-1, 1) out of the vectors (4,-3) and (-2, 2). Those constants just happen to be the elements of the vector x we're trying to obtain.

7. Example of a Matrix-Vector Equation

An example of a matrix-vector equation in action is when one is trying to rate entities that are pairwise related. Bluefield College undergraduate Kenneth Massey, in 1997, in his thesis, devised a method that uses a matrix-vector equation based on the scores of college American football games. This is similar to one of the methods used to determine who gets to play in the College Football Playoff to determine the National Champion. The scores in an example five-team league can be found here. Notice that Johns Hopkins was able to defeat Gettysburg 49 points to 35, while they lost to F & M 14-12.

8. Example of a Matrix-Vector Equation

This collection of games gives rise to a matrix whose ith element of its diagonal is the number of total games played by the ith team, while the i,jth element is the negative of the number of times i and j have played each other. This is called the Massey matrix, whose full development is outside the scope of this course.

9. Example of a Matrix-Vector Equation

This Massey Matrix is then multiplied by an unknown rating vector, r, and set equal to the vector whose ith element is the net point differential (the points each team scored minus the points each team surrendered) for that team during that season. The assumption is that a team's point differential can be explained via a linear combination of the composition of games played throughout the league, with the constants the ratings of each of the teams. Being able to accurately rate entities in a big part of data science, since these ratings often are the features that are used in machine learning algorithms. Solving this equation for the rating vector in the middle will achieve that for us.

10. Let's practice!

Time to explore these ideas in the exercises.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.