O'Reilly logo
live online training icon Live Online training

Linear Algebra with Python First Steps: Essential Math for Machine Learning

Take control of your data by honing your fundamental math skills

Topic: Math, Science, Engineering
Thomas Nield

Linear algebra—numerical math dealing with vectors, matrices, and linear functions—is critical for a wide range of disciplines, including computer science, data analysis, and machine learning. From linear regression to deep learning, the concepts of linear algebra can be found in every corner of applied computer science.

Join expert Thomas Nield to learn linear algebra fundamentals and discover how they apply to data science. You’ll explore vectors and matrices (both visually and numerically), important vector/matrix operators, linear systems and matrix decomposition, and more as you use Python’s NumPy package to perform linear algebra operations.

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:

  • The intuition behind vectors and matrices, both visually and numerically
  • Important vector/matrix operators and what they mean
  • Linear systems and matrix decomposition

And you’ll be able to:

  • Appreciate vectors and matrices beyond just a grid of numbers, and ponder operations in a visualized way
  • Construct a system of linear equations and solve its variables
  • Using Python’s NumPy package to perform linear algebra operations

This training course is for you because...

  • You are working towards data science proficiency, and want to understand how numerical computing works under the hood
  • You want to understand linear algebra beyond contrived grids of numbers, and develop an intuition on what operators actually represent.
  • You work with data and use statistical and machine learning tools that often input/output matrices.


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

Recommended preparation:

  • Setup Python3 and NumPy

Recommended follow-up:

About your instructor

  • Thomas Nield is an operations research consultant as well as a writer, conference speaker, and trainer. He enjoys making technical content relatable and relevant to those unfamiliar or intimidated by it. Thomas regularly teaches classes on analytics, machine learning, and mathematical optimization. He’s authored two books, including Getting Started with SQL (O'Reilly) and Learning RxJava (Packt), and has written several popular articles, including “How It Feels to Learn Data Science in 2019” and “Is Deep Learning Already Hitting Its Limitations?”


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

Getting Started (5 minutes)

  • Presentation: Introduction and Agenda
  • What is linear algebra?
  • Why learn linear algebra?

Vectors, Combining, and Scaling (25 minutes)

  • Presentation: What are vectors? Combining and scaling vectors
  • Hands-on: Adding and scaling vectors in NumPy
  • Presentation: Span and linear dependence
  • Exercise: Adding and scaling vectors

Transforming Vectors and Matrices (25 minutes)

  • Presentation: Basis vectors, matrices, the determinant
  • Hands-on: Matrices and the determinant in NumPy
  • Exercise: Transforming a vector
  • Break (5 minutes)

System of Linear Equations and Inverse Matrices (15 minutes)

  • Presentation: Solving systems of linear equations with inverse matrices
  • Hands-on: Solving systems of linear equations with NumPy
  • Exercise: A word problem

Dot products (20 minutes)

  • Presentation: Understanding dot products, orthogonality
  • Hands-on: Dot products with NumPy
  • Exercise: Executing a dot product

Matrix Decomposition (20 minutes)

  • Presentation: Matrix decomposition, Eigenvectors, and Eigenvalues
  • Hands-on: Matrix decomposition with NumPy
  • Exercise: Decomposing a matrix

Final questions and closing (5 minutes)