DEV Community

Shiv Prasad
Shiv Prasad

Posted on

Vectors and Matrices

https://miro.medium.com/max/1756/1*UsrXoK2aHGPNtVBqmnwoig.png

Vectors are a collection of co-ordinates that a point has in a given space. They are defined by their magnitude and direction.

https://miro.medium.com/max/1741/1*RrAXw2ka-y8zym7Fh3O83Q.png

For n-dimensions there are n-coordinates in the given space.

https://miro.medium.com/max/1753/1*8lrgqR150k90ta0WlhqV5Q.png

Unit vector has a magnitude of one. To find the unit vector of any vector divide each element of the vector by the vectors length.

https://miro.medium.com/max/1746/1*puB82lx2Qg91kSpICSUpfQ.png

The projection of vector x on vector y can be found by dividing the dot product of x and y by the magnitude of the vector y and multiplied by vector y . The projection of vector x is in the direction of y vector.

https://miro.medium.com/max/1748/1*o_pW8Evl_fllL5VWHLUMTg.png

This is an example on projecting vector x on vector y.

https://miro.medium.com/max/1754/1*_nYs_6eRuBLburjkNM9Qmw.png

Above is an example to calculate the angle between two vectors.

https://miro.medium.com/max/1753/1*u_jnY2kUB109oFN1qw1FuQ.png

Two vectors are said to be orthogonal when the angle between them is 90°. That is the dot product between the vectors should be zero.

Matrices :

https://miro.medium.com/max/1758/1*iliJemU_mPtkXOZgpLdJYg.png

Matrices are a collection of row vectors or column vectors. Data we deal are mostly is in the form of matrices. We manipulate these matrices to find relations and make predictions.

Here is a useful playlist :

https://www.youtube.com/playlist?list=PL2jykFOD1AWazz20_QRfESiJ2rthDF9-Z

Top comments (0)