Introduction to Linear Algebra for Data Science and Machine Learning With Python


Programming is a great way to get practical insights about math theoretical concepts. The goal of this session is to show you that you can start learning the math needed for machine learning and data science using code. You'll learn about scalars, vectors, matrices and tensors, and see how to use linear algebra on your data. Don't worry if you don't have a math background, we'll explain the mathematical notations and conventions. At the end of the session, you'll know how to operate on vectors, matrices and tensors, use the norm of vectors, and apply the dot product to vectors. You'll also see more advanced concepts like matrices as linear transformations, linear combinations, basis, and how to use matrices to express systems of equations.

Session Outline:
Session 1: Scalars and vectors
You'll learn the basics of vector operations with Numpy and visualization with Matplotlib. You'll then learn the dot product visually and practically. You'll finally learn different kind of norms and why it is crucial to machine learning.

Hands-on Session 1: Practical Project: Regularization
In this hands-on, you'll see the important idea of model regularization from a practical and visual point of view, through the example of polynomial regression.

Session 2: Matrices and tensors
You'll see here all the details you need about matrices (special matrices, matrix product, transposition, etc.) and tensors. You'll see how Numpy allows you to convert linear algebra ideas straight into workable code.

Hands-on Session 2: Practical Project: Image Classification
In this practical session, you'll see how to store images as Numpy tensors. You'll see that it allows you to use machine learning or deep learning libraries. You'll finally study the case of image classification with Keras (omitting the details of the neural network).

Background Knowledge:
Some basic Python programming skills (loops, functions, etc.) and ideally some experience with the libraries Numpy and Matplotlib (not required).


Hadrien Jean is a machine learning scientist working at My Medical Assistent where he is developing deep learning models in the medical domain. He wrote the book Essential Math for Data Science ( aimed at helping people to get the math needed in data science from a coding perspective. He previously worked at Ava on speech diarization. He also worked on a bird detection project using deep learning. He completed his Ph.D. in cognitive science at the École Normale Supérieure (Paris, France) on the topic of auditory perceptual learning with a behavioral and electrophysiological approach. He has published a series of blog articles aiming at building intuition on mathematics through code and visualization (

Open Data Science




Open Data Science
One Broadway
Cambridge, MA 02142

Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Consent to display content from Youtube
Consent to display content from Vimeo
Google Maps
Consent to display content from Google