GitPedia

Linear Algebra With Python

Lecture Notes for Linear Algebra Featuring Python. This series of lecture notes will walk you through all the must-know concepts that set the foundation of data science or advanced quantitative skillsets. Suitable for statistician/econometrician, quantitative analysts, data scientists and etc. to quickly refresh the linear algebra with the assistance of Python computation and visualization.

From weijie-chen·Updated June 25, 2026·View on GitHub·

These lecture notes are intended for introductory linear algebra courses, suitable for university students, programmers, data analysts, algorithmic traders and etc. The project is written primarily in Jupyter Notebook, distributed under the MIT License license, first published in 2020. It has gained significant community traction with 2,563 stars and 616 forks on GitHub. Key topics include: computational-science, data-analysis, data-science, data-visualization, diagonalization.

<font color='purple' size=2.5><i>Updated on Aug 2024</i></font>
Presentation1

Lectures of Linear Algebra

These lecture notes are intended for introductory linear algebra courses, suitable for university students, programmers, data analysts, algorithmic traders and etc.

The lectures notes are loosely based on several textbooks:

  1. <b><i>Linear Algebra and Its Applications</i></b> by Gilbert Strang
  2. <b><i>Linear Algebra and Its Applications</i></b> by David Lay
  3. <b><i>Introduction to Linear Algebra With Applications</i></b> by DeFranza & Gagliardi
  4. <b><i>Linear Algebra With Applications</i></b> by Gareth Williams

cover-min

However, the crux of the course is not about proving theorems, but to demonstrate the practices and visualization of the concepts. Thus we will not engage in precise deduction or notation, rather we aim to clarify the elusive concepts and thanks to Python/MATLAB, the task is much easier now.

Prerequisites

Though the lectures are for beginners, it is beneficial that attendants had certain amount of exposure to linear algebra and calculus.

And also the attendee are expected to have basic knowledge (3 days training would be enough) of

  • Python
  • NumPy
  • Matplotlib
  • SymPy

All the codes are written in an <b>intuitive manner</b> rather than efficient or professional coding style, therefore the codes are exceedingly straightforward, I presume barely anyone would have difficulty in understanding the codes.

Environment Setup

I use poetry to management environment, if you happen to use VS code like me, please follow the steps below:

  1. In Windows powershell and install poetry (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -p
  2. Navigate to cd $env:APPDATA\Python\Scripts, check if poetry being installed.
  3. Open a notepad notepad $profile and set alias for poetry Set-Alias poetry "C:\Users\user\AppData\Roaming\Python\Scripts\poetry.exe" in notepad, I prefered this way, because sometimes setting env path not working in windows.
  4. Reload profile by . $profile.
  5. If you are on your personal computer Set-ExecutionPolicy RemoteSigned -Scope CurrentUser to unstrict your execution policy and choose Y.
  6. Resume the default restricted policy for security Set-ExecutionPolicy Restricted -Scope CurrentUser.
  7. Now check poetry --version, if you see the version printed, good to go.
  8. You choose to use poetry update, or just manage version at your own convenience.

What to Expect from Notes

These notes will equip you with most needed and basic knowledge for other subjects, such as Data Science, Econometrics, Mathematical Statistics, Financial Engineering, Control Theory and etc., which heavily rely on linear algebra. Please go through the tutorial patiently, you will certainly have a better grasp of the fundamental concepts of linear algebera. Then further step is to study the special matrices and their application with your domain knowledge.

Contents

Please access my webiste for better reading experience: Linear Algebra for Python<br>
Chapter 1 - Linear Equation System<br>
Chapter 2 - Basic Matrix Algebra<br>
Chapter 3 - Determinant<br>
Chapter 4 - LU Factorization<br>
Chapter 5 - Vector Addition, Subtraction and Scalar Multiplication<br>
Chapter 6 - Linear Combination<br>
Chapter 7 - Linear Independence<br>
Chapter 8 - Vector Space and Subspace<br>
Chapter 9 - Basis and Dimension<br>
Chapter 10 -Null Space vs Col Space, Row Space and Rank<br>
Chapter 11 - Linear Transformation<br>
Chapter 12 - Eigenvalues and Eigenvectors<br>
Chapter 13b - Principal Component Analysis<br>
Chapter 13a - Diagonalization<br>
Chapter 14 - Applications to Dynamic System<br>
Chapter 15 - Innear Product and Orthogonality<br>
Chapter 16 - Gram-Schmidt Process and QR Decomposition<br>
Chapter 17 - Symmetric Matrices , Quadratic Form and Cholesky Decomposition<br>
Chapter 18 - The Singular Value Decomposition<br>
Chapter 19 - Multivariate Normal Distribution<br>

Screen Shots Examples

截图01
截图03
截图00
截图00
截图01
截图02
截图03

Contributors

Showing top 2 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from weijie-chen/Linear-Algebra-With-Python via the GitHub API.Last fetched: 6/27/2026