NumPy: Linear Algebra

Ha Khanh Nguyen (hknguyen)

1. Why Linear Algebra?

2. Matrix Multiplication & Transpose

3. Functions in numpy.linalg

4. Exercise

We are given the following matrices:

Evaluate the following expression using NumPy matrix functions:

$$ (X^TX)^{-1}X^Ty $$

This lecture note is modified from Chapter 4 of Wes McKinney's Python for Data Analysis 2nd Ed.