From the course: Machine Learning Foundations: Linear Algebra

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Scalar and vector projection

Scalar and vector projection

- [Instructor] Scalar and vector projections are an extremely important part of machine learning because they make mathematical operations and applying machine learning models easier. Before we dive into understanding them, we first need to understand the magnitude or length of the vector. The magnitude of a vector, also called the norm or the geometric length, is the distance from the tail to head of a vector and it's computing using the standard Euclidean distance formula, the square root of the sum of squared vector elements. Vector magnitude is indicated using double vertical bars around the vector. There is a formula we use to calculate that looks like this. Don't panic if it looks complex. In NumPy we have a function that does this job for us called norm, so if we want to calculate magnitude of a vector a, we would just need to type magnitude=np.norm(a). Cool. Let's see what vector projection is. A vector…

Contents