summaryrefslogtreecommitdiff
path: root/tutorials/module_3/3_system_of_equations.md
blob: e02fe402d099e0df76b227fea316cf5ad639cab7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# 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
$$

Matrix Math

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