
Learn the essentials of linear algebra with a Python focus for machine learning, covering vectors, matrices, basic operations, eigenvectors and eigenvalues, diagonalization, norms, traces, and solving linear systems.
Explore vectors as directed arrows in a vector space and how matrices perform linear transformations, including basis vectors and preserving the origin, with row and column representations.
Explore core matrix operations in Python with NumPy, including creating matrices, scalar multiplication, addition, transpose, dot product, and matrix-vector multiplication, with shape checks and seeds for reproducibility.
Learn how a matrix as a linear transformation collapses a vector space to a line, plane, or origin, and how independent columns and rows define rank one, two, or zero.
Learn how to solve linear systems with matrices, using inverses to recover unknown vectors, and understand when singular matrices yield non-unique solutions, with practical Python examples.
Change of basis by using the new basis matrix and its inverse to compute the coordinates of a vector as a linear combination of the new basis.
Explore eigenvalues and eigenvectors: learn how certain vectors stay on the same line while being stretched by a scalar, and compute them via the characteristic polynomial or numpy.linalg.eig.
Discover how diagonalization writes a matrix as P D P inverse, with D diagonal and built from eigenvectors and eigenvalues, enabling powers like A^3 to be computed easily.
Explore vector norms and measure the magnitude of a vector using p-norms, including L1 and L2 (Euclidean) norms, with examples and their role in error evaluation and regularization.
Discover that trace equals the sum of all diagonal entries of a matrix, and compute it in Python by calling trace on the matrix.
Congratulations on completing linear algebra for machine learning; you have covered all the essential topics and should feel confident applying them. Please leave a rating to help improve the course.
Linear Algebra is usually a prerequisite of machine learning. However, one doesn't need to know all the concepts in linear algebra.
In this course, I have compiled together all the important linear algebra concepts that are most frequently used in machine learning. This is the content I taught at Polytechnique Montreal as a refresher on linear algebra for machine learning. Understanding these concepts will help you navigate through an introductory course in machine learning.
This course is for you if
- You have some knowledge of linear algebra.
- You want to refresh some parts of linear algebra for machine learning.
This course is not for you if
- You want to learn linear algebra from scratch.
- You want to learn all important concepts in linear algebra.
- You don’t know anything about python.
Please note that I do not cover all the topics in linear algebra. I only cover the topics that are most frequently used in the machine learning textbooks. If you want to learn linear algebra from scratch or master all the concepts, this course is not for you.
In this course, we cover the following topics
- Vectors and Matrices
- Matrix operations
- Rank of a matrix
- Solving linear equations using matrix
- Change of basis
- Eigenvalues and Eigenvectors
- Diagonalization
- Norms
- Trace