Introduction
This is a study note of the course Mathematics for Machine Learning: Linear Algebra on the coursera. In week 2 section, we will look at vector’s modulus, and look at a way to combine vectors together to get the dot product, which can take us on to find the scalar and vector projections. In addition, basis vector and vector space will be defined in this section, and we will learn how to prove linear independence and linear combination.
Modulus
Modulus is length of a vector, so if a vector is given , the modulus of vector is equal to . In addition, we also use dot product to get the modulus of a vector, i.e. we can get the modulus of a vector by the vector dotted by itself, .
Dot Product
The dot product is a scalar number given by multiplying the components of the vector in turn, and adding those up. e.g. given two vector and , we can find the dot product is .
- commutative: is equal to .
- distributive: is equal to .
- associative: is equal to , where is a scalar.
Interestingly, if we take the dot product of a vector with itself, we can get the square of its size of its modulus. i.e. .
Cosine & Dot Product
Let’s start from a right triangle. For a right triangle, it have 3 egdes, respectively called legs if the side adjacent to the right angle, and called hypotenuse if the side oppsite the right angle.
According consine rule, we get a equation.
Then we define a vector and a vector as the following figure.
Let’s make dot product of with itself.
Then, we do that comparison between and .
- , .
- ,
- ,
Vector Projection
Given two vector as following figure, we can make the projection of the vector onto the vector .
Obviously, we can get in the right triangle.
In addition, we use dot product to get a equation .
So, is used to take the scalar projection of vetor onto the vector .
We also can get the vector projection by using .
- scalar projection:
- vector projection:
Linear Dependence & Independence
Linear Dependence
Vectors are linearly dependent if it is possible to write one vector as a linear combination of the others. For example, the vectors , and are linearly dependent if where and are scalars.
Linear Independence
We say that two vectors are linearly independent if they are not linearly dependent, that is, we cannot write one of the vectors as a linear combination of the others.