0% found this document useful (0 votes)
11 views10 pages

Linear Algebra - Part 1

ML NOTES

Uploaded by

nvesh2kids
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views10 pages

Linear Algebra - Part 1

ML NOTES

Uploaded by

nvesh2kids
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Linear Algebra

Linear Algebra
• Linear algebra helps in manipulating multivariate data.
• Multivariate data – involves more than two variables resulting in a
single outcome.
Vector
• Vector is an ordered tuple of numbers expressing a
magnitude and direction.
Vector Spaces
• A vector is an element of a vector space.
Properties of a vector
1. If two vectors have same size, they can be added element
wise.

2. We can multiply a vector by a constant by multiplying all its


elements by that constant.

3. The norm ∥x∥ represents the length (of the arrow from the
origin to point x). It measure the magnitude if the vector.
Contd..
1. If x and y are of the same size, their inner (or dot or scalar)
product is

2. To obtain θ , which is the angle between (the arrows of) x


and y. If 〈x, y〉 = 0, we say that x and y are orthogonal, that
is, that they are perpendicular
Matrix
• A matrix is a vector of vectors
• Elements of a matrix are vectors.
• The m × n matrix X has m rows and n columns.
• In machine learning, our training data X is N×d, whose N
rows correspond to the training instances and d columns
correspond to the input features or attributes.
Contd..
• In face recognition each input is a face
image, which is two-dimensional
• A color image is represented by three
such matrices for red, green, and blue.
• Higher-dimensional matrices are
sometimes called tensors.
Properties of a matrix
• If two matrices have the same size, they can be added
element-wise.
• We can multiply a vector (or a matrix) by a constant by
multiplying all its elements by that constant.
• The transpose of a matrix swaps its rows and columns:
If X is m × n, XT is n × m

• Transpose of a matrix is obtained by flipping the rows


and columns.
Similarity of Vectors
• There are different ways in which we can calculate the
similarity between two vectors (of the same size), which are
related, each finding its use in its appropriate setting:
• Inner product, namely, 〈x, y〉.
• Cosine distance, the cosine of the angle between the two
vectors.

• Euclidean distance

You might also like