# Linear Equations Let's consider an linear equation $$ ax=b $$ where $a$ and $b$ are two known constants we can solve for $x$ easily. ## Problem 1 [] # Linear Algebra Although this isn't a course in linear algebra we are going to use some fundamental concepts from linear algebra to solve systems of equations. If you haven't taken linear algebra before, it is the study of linear equations. These equations can be represented in the form of matrices. Let's say we have a system of equation $$ \begin{cases} a_{11} x_1 + a_{12} x_2 + a_{13} x_3 = b_1 \\ a_{21} x_1 + a_{22} x_2 + a_{23} x_3 = b_2 \\ a_{31} x_1 + a_{32} x_2 + a_{33} x_3 = b_3 \end{cases} $$ We can re-write this into matrix form by creating an $A$ matrix of all $a_{nn}$ values and a $b$ vector as follows $$ A = \left[ {\begin{array}{cc} a_{11} & a_{12} & a_{13}\\ a_{21} & a_{22} & a_{23}\\ a_{31} & a_{32} & a_{33}\\ \end{array} } \right] $$ and $$ b = \left[ {\begin{array}{cc} b_{1}\\ b_{2}\\ b_{3}\\ \end{array} } \right] $$ to get, $$ Ax=b $$ How does this work? Matrix Math. The Matrix definition ## Problem 1 ```python import numpy as np # Coefficient matrix A A = np.array([[2, 3], [4, 5]]) # Right - hand side vector b b = np.array([4, 6]) # Solve the system of equations x = np.linalg.solve(A, b) print(x) ``` ## Problem 2 # Systems of Equations ## Working with Systems of Equations Matrix Determinates Cramer's Rule - Elimination ### Forward Elimination ### Back Substitution ### Naive Gauss Elimination ### Gauss Elimination ### LU Decomposition ## Problem 1 ## Problem 2 # LU Decomposition ## ## Problem 1 ## Problem 2 Modeling of dynamic systems