|
| 1 | +--- |
| 2 | +toc-title: Table of contents |
| 3 | +--- |
| 4 | + |
| 5 | +`<font color='purple' size=2.5><i>`{=html}Updated on Aug |
| 6 | +2024`</i></font>`{=html} |
| 7 | + |
| 8 | +\# Lectures of Linear Algebra |
| 9 | + |
| 10 | +These lecture notes are intended for introductory linear algebra |
| 11 | +courses, suitable for university students, programmers, data analysts, |
| 12 | +algorithmic traders and etc. |
| 13 | + |
| 14 | +The lectures notes are loosely based on several textbooks: |
| 15 | + |
| 16 | +1. `<b><i>`{=html}Linear Algebra and Its Applications`</i></b>`{=html} |
| 17 | + by Gilbert Strang |
| 18 | +2. `<b><i>`{=html}Linear Algebra and Its Applications`</i></b>`{=html} |
| 19 | + by David Lay |
| 20 | +3. `<b><i>`{=html}Introduction to Linear Algebra With |
| 21 | + Applications`</i></b>`{=html} by DeFranza & Gagliardi |
| 22 | +4. `<b><i>`{=html}Linear Algebra With Applications`</i></b>`{=html} by |
| 23 | + Gareth Williams |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +However, the crux of the course is not about proving theorems, but to |
| 28 | +demonstrate the practices and visualization of the concepts. Thus we |
| 29 | +will not engage in precise deduction or notation, rather we aim to |
| 30 | +clarify the elusive concepts and thanks to Python/MATLAB, the task is |
| 31 | +much easier now. |
| 32 | + |
| 33 | +## Prerequisites |
| 34 | + |
| 35 | +Though the lectures are for beginners, it is beneficial that attendants |
| 36 | +had certain amount of exposure to linear algebra and calculus. |
| 37 | + |
| 38 | +And also the attendee are expected to have basic knowledge (3 days |
| 39 | +training would be enough) of - \[x\] Python - \[x\] NumPy - \[x\] |
| 40 | +Matplotlib - \[x\] SymPy |
| 41 | + |
| 42 | +All the codes are written in an `<b>`{=html}intuitive |
| 43 | +manner`</b>`{=html} rather than efficient or professional coding style, |
| 44 | +therefore the codes are exceedingly straightforward, I presume barely |
| 45 | +anyone would have difficulty in understanding the codes. |
| 46 | + |
| 47 | +The notes were written in JupyterLab, the interative plot requires |
| 48 | +`ipympl`. To install, type in `conda install -c conda-forge ipympl` if |
| 49 | +you have JupyterLab 3.x. Check |
| 50 | +`<a href='https://github.com/matplotlib/ipympl'><code>`{=html}ipympl`</code>`{=html}page`</a>`{=html} |
| 51 | +for more details. |
| 52 | + |
| 53 | +## Environment Setup |
| 54 | + |
| 55 | +I use poetry to management environment, if you happen to use VS code |
| 56 | +like me, please follow the steps below: 1. In Windows powershell and |
| 57 | +install poetry |
| 58 | +`(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -p` |
| 59 | +2. Navigate to `cd $env:APPDATA\Python\Scripts`, check if poetry being |
| 60 | +installed. 3. Open a notepad `notepad $profile` and set alias for poetry |
| 61 | +`Set-Alias poetry "C:\Users\user\AppData\Roaming\Python\Scripts\poetry.exe"` |
| 62 | +in notepad, I prefered this way, because sometimes setting env path not |
| 63 | +working in windows. 4. Reload profile by `. $profile`. 5. If you are on |
| 64 | +your personal computer |
| 65 | +`Set-ExecutionPolicy RemoteSigned -Scope CurrentUser` to unstrict your |
| 66 | +execution policy and choose Y. 6. Resume the default restricted policy |
| 67 | +for security `Set-ExecutionPolicy Restricted -Scope CurrentUser`. 7. Now |
| 68 | +check `poetry --version`, if you see the version printed, good to go. 8. |
| 69 | +You choose to use `poetry update`, or just manage version at your own |
| 70 | +convenience. |
| 71 | + |
| 72 | +## What to Expect from Notes |
| 73 | + |
| 74 | +These notes will equip you with most needed and basic knowledge for |
| 75 | +other subjects, such as Data Science, Econometrics, Mathematical |
| 76 | +Statistics, Financial Engineering, Control Theory and etc., which |
| 77 | +heavily rely on linear algebra. Please go through the tutorial |
| 78 | +patiently, you will certainly have a better grasp of the fundamental |
| 79 | +concepts of linear algebera. Then further step is to study the special |
| 80 | +matrices and their application with your domain knowledge. |
| 81 | + |
| 82 | +## Contents |
| 83 | + |
| 84 | +[Chapter 1 - Linear Equation |
| 85 | +System](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%201%20-%20Linear%20Equation%20System.ipynb)`<br>`{=html} |
| 86 | +[Chapter 2 - Basic Matrix |
| 87 | +Algebra](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%202%20-%20Basic%20Matrix%20Algebra.ipynb)`<br>`{=html} |
| 88 | +[Chapter 3 - |
| 89 | +Determinant](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%203%20-%20Determinant.ipynb)`<br>`{=html} |
| 90 | +[Chapter 4 - LU |
| 91 | +Factorization](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%204%20-%20LU%20Factorization.ipynb)`<br>`{=html} |
| 92 | +[Chapter 5 - Vector Addition, Subtraction and Scalar |
| 93 | +Multiplication](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%205%20-%20Vector%20Addition%2C%20Subtraction%20and%20Scalar%20Multiplication.ipynb)`<br>`{=html} |
| 94 | +[Chapter 6 - Linear |
| 95 | +Combination](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%206%20-%20Linear%20Combination.ipynb)`<br>`{=html} |
| 96 | +[Chapter 7 - Linear |
| 97 | +Independence](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%207%20-%20Linear%20Independence.ipynb)`<br>`{=html} |
| 98 | +[Chapter 8 - Vector Space and |
| 99 | +Subspace](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%208%20-%20Vector%20Space%20and%20Subspace.ipynb)`<br>`{=html} |
| 100 | +[Chapter 9 - Basis and |
| 101 | +Dimension](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%209%20-%20Basis%20and%20Dimension.ipynb)`<br>`{=html} |
| 102 | +[Chapter 10 -Null Space vs Col Space, Row Space and |
| 103 | +Rank](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%2010%20-Null%20Space%20vs%20Col%20Space%2C%20Row%20Space%20and%20Rank.ipynb)`<br>`{=html} |
| 104 | +[Chapter 11 - Linear |
| 105 | +Transformation](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%2011%20-%20Linear%20Transformation.ipynb)`<br>`{=html} |
| 106 | +[Chapter 12 - Eigenvalues and |
| 107 | +Eigenvectors](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%2012%20-%20Eigenvalues%20and%20Eigenvectors.ipynb)`<br>`{=html} |
| 108 | +[Chapter 13b - Principal Component |
| 109 | +Analysis](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%2013b%20-%20Principal%20Component%20Analysis.ipynb)`<br>`{=html} |
| 110 | +[Chapter 13a - |
| 111 | +Diagonalization](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%2013a%20-%20Diagonalization.ipynb)`<br>`{=html} |
| 112 | +[Chapter 14 - Applications to Dynamic |
| 113 | +System](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%2014%20-%20Applications%20to%20Dynamic%20System.ipynb)`<br>`{=html} |
| 114 | +[Chapter 15 - Innear Product and |
| 115 | +Orthogonality](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%2015%20-%20Innear%20Product%20and%20Orthogonality.ipynb)`<br>`{=html} |
| 116 | +[Chapter 16 - Gram-Schmidt Process and QR |
| 117 | +Decomposition](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%2016%20-%20Gram-Schmidt%20Process%20and%20QR%20Decomposition.ipynb)`<br>`{=html} |
| 118 | +[Chapter 17 - Symmetric Matrices , Quadratic Form and Cholesky |
| 119 | +Decomposition](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%2017%20-%20Symmetric%20Matrices%20%2C%20Quadratic%20Form%20and%20Cholesky%20Decomposition.ipynb)`<br>`{=html} |
| 120 | +[Chapter 18 - The Singular Value |
| 121 | +Decomposition](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%2018%20-%20The%20Singular%20Value%20Decomposition.ipynb)`<br>`{=html} |
| 122 | +[Chapter 19 - Multivariate Normal |
| 123 | +Distribution](https://nbviewer.org/github/weijie-chen/Linear-Algebra-With-Python/blob/master/notebooks/Chapter%2019%20-%20Multivariate%20Normal%20Distribution.ipynb)`<br>`{=html} |
| 124 | + |
| 125 | +## Screen Shots Examples |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
0 commit comments