O'Reilly logo
live online training icon Live Online training

Linear Algebra with Python: Essential Math for Data Science

enter image description here

Take control of your data by honing your fundamental math skills

Russell Martin

Linear algebra is a field of mathematics dealing with vector spaces and linear functions. The understanding of linear algebra is crucial for data analysis techniques and machine learning. Even state-of-the-art deep learning algorithms rely on the concepts of linear algebra. While the field of linear algebra is extensive, it is important to focus on the areas that are directly applicable for data science.

This is the first course in a four-part series focused on essential math topics. These courses are grouped in pairs with this natural progression:

  1. Linear Algebra with Python
  2. Linear Regression with Python


  1. Probability with Python
  2. Statistics and Hypothesis Testing with Python

What you'll learn-and how you can apply it

By the end of this live, hands-on, online course, you’ll understand:

  • Matrices and vectors and how to perform mathematical operations using matrices and vectors
  • How linear equations are constructed

And you’ll be able to:

  • Represent data as a matrix or vector
  • Construct a system of linear equations
  • Using Python’s NumPy package to perform linear algebra operations

This training course is for you because...

  • You are someone in a technical role but are looking for foundational knowledge to transition into a data scientist position
  • You work with data and want to start building predictive models
  • You want to become a data analyst or data scientist


  • Basic math: addition, subtraction, multiplication and division
  • Algebra
  • Basic Python: variable creation, conditional statements, functions, loops

Recommended preparation:

  • None

Recommended follow-up:

About your instructor

  • Russell Martin is a Data Scientist in Residence at The Data Incubator. He received his PhD in Applied Mathematics from the Georgia Institute of Technology. Russ lived and worked in the UK for seventeen years, including at Warwick University and the University of Liverpool, where he taught in the Department of Computer Science. As a Data Scientist in Residence, Russ instructs Fellows in our Data Science Fellowship, teaches online courses, and leads trainings with our corporate partners.


The timeframes are only estimates and may vary according to how the class is progressing

Getting Started (5 minutes)

  • Presentation: Introduction to Jupyter Notebook environment

Introduction to Linear Algebra (5 minutes)

  • Presentation: What is linear algebra? What aspects of it are covered in this class?
  • Poll: Which of the following equations is a linear equation?

Vectors and Matrices (10 minutes)

  • Presentation: What are vectors and matrices?
  • Exercise: Fill-in-the-blank — Matrix dimensions

Operations with Vectors and Matrices (10 minutes)

  • Presentation: How do we work with matrices (addition and multiplication)?
  • Poll: Which of the matrices from the last exercise can be multiplied?
  • Exercise: Add two matrices

Scalar Product and Orthogonality (10 minutes)

  • Presentation: How do you multiply two vectors?
  • Exercise: Find the dot product of two matrices

Linear Independence and Transformation (10 minutes)

  • Presentation: What is independence?
  • Poll: Are these vectors dependent or independent?
  • Presentation: Linear transformation property

Eigenvectors and Eigenvalues (5 minutes) - Presentation: What makes Eigenvectors different from other vectors?

Q&A and Discussion (10 minutes)

  • Break (5 minutes)

Introduction to NumPy (10 minutes)

  • Presentation: What is a NumPy array (i.e. the ndarray class)?
  • Exercise: Create an array on Jupyter Hub

Operation with NumPy Arrays (15 minutes)

  • Presentation: How do you use Universal functions (e.g. addition) in NumPy?
  • Exercise: Add two arrays
  • Presentation: How do you do matrix multiplication?
  • Exercise: Multiply two arrays
  • Presentation: How do you transpose a matrix?
  • Exercise: Transpose an array

Performance Improvements When Using NumPy Arrays (5 minutes)

  • Presentation: Why is NumPy faster

Array Indexing (10 minutes)

  • Presentation: How can I get a subset of an array?
  • Exercise: Slicing an array

Q&A and Discussion (10 minutes)