Blog 10

Hour 24, 25 & 27 - Distances, Projections, Magnitude, Cross Product & Curve Fitting

Hey everyone! Welcome back again to out linear algebra blog! Hope everyone is doing well! In today’s blog we will learn about some very interesting ways linear algerba relates to geometry.

Hour 24

Projections

A vector x can be projected on a line L and and the projection of x on L can be thought of being the shadow of x on the line L, if a light source was directly above x and perpendicular to L.

alt text

Here, the projection of x on L is given by the red line and the vector x can be written as the vector sum of Ax + x perp, where A is the transformation matrix which transforms x on L and x perp is the perpendicular component of x.

alt text

Here’s a formula to find the projection of a vector v on any other vector d.

Magnitude of a Vector

We know that vectors have both magnitude and direction. The magnitude of a vector can be said to be the length of the vector.

alt text

We can find the length of a vector by taking the sum of the square of all the elements in the vector and then taking the square root of the sum.

Example of Perpendicular Distance from a Point to a Plane

alt text

Here, we have to first find the normal vector (vector perpendicular to the plane) by finding the coefficients of x, y and z. The coefficients are the elements of the normal vector respectively. Then, the projection onto n of QP will give us the vector whose magnitude is the distance we need.

Other ways to find Projections

alt text

The projection of a vector x on the unit vector u, parallel to a line or plane can be found out by the formula above.

Cross Product

alt text

The cross product of 2 vectors is a vector which is perpendicular to both the original vectors. You can find the cross product of 2 vectors by using the formula provided above.

Hour 25 & 27

Curve Fitting

When you have a set of points and you have to find a line which fits all those points, it means that we need to find a line y = mx + b such that the parameters m and b are chosen for which the line cuts all the points.

alt text

Normal Equations

We can use normal equations to easily solve for such problems. For this we need to know what a transpose is. A transpose of a matrix is another matrix which has rows which were the columns of the original matrix and columns which were the rows of the original matrix (rows and columns are interchanged).

alt text

Example

alt text

Example - Using Matrix Inverse to find Least Square

alt text

We can see that there are two ways to solve this.

1) We can just find (A^T)A and A^T * y and then set them up in augmented form to find x for which A^T * Ax = A^T * y

2) We can solve for x* by finding the inverse of (A^T * A) and then multipy that to A^T * y

Practice Problems

Rank-Nullity Tutorial:

https://youtu.be/eXuWiPRSlUE

Curve fitting Tutorial:

https://youtu.be/MC7l96tW8V8

Problem sets:

(1) Rank-Nullity theorem:

https://yutsumura.com/tag/rank-nullity-theorem/

(2) http://uregina.ca/~franklam/Math416/Math416_LeastSquares.pdf

Written on November 28, 2021