diff --git a/mechanical/mmme1026_maths_for_engineering.md b/mechanical/mmme1026_maths_for_engineering.md index fb2e1c1..5b04fb7 100755 --- a/mechanical/mmme1026_maths_for_engineering.md +++ b/mechanical/mmme1026_maths_for_engineering.md @@ -390,3 +390,109 @@ $$z^3 = 8i$$ > 4. There are three solutions + +# Matrices (and Simultaneous Equations) + +## Gaussian Elimination + +Gaussian eliminiation can be used when the number of unknown variables you have is equal to the +number of equations you are given. + +I'm pretty sure it's the name for the method you use to solve simultaneous equations in school. + +For example if you have 1 equation and 1 unknown: + +\begin{align*} +2x &= 6 \\ +x &= 3 +\end{align*} + +### Number of Solutions + +Let's generalise the example above to + +$$ax = b$$ + +There are 3 possible cases: + +\begin{align*} +a \ne 0 &\rightarrow x = \frac b a \\ +a = 0, b \ne 0 &\rightarrow \text{no solution for $x$} \\ +a = 0, b = 0 &\rightarrow \text{infinite solutions for $x$} +\end{align*} + +### 2x2 System + +A 2x2 system is one with 2 equations and 2 unknown variables. + +
+ + +#### Example 1 + +\begin{align*} +3x_1 + 4x_2 &= 2 &\text{(1)} \\ +x_1 + 2x_2 &= 0 &\text{(2)} \\ +\end{align*} + + + +\begin{align*} +3\times\text{(2)} = 3x_1 + 6x_2 &= 0 &\text{(3)} \\ +\text{(3)} - \text{(1)} = 0x_1 + 2x_2 &= -2 \\ +x_2 &= -1 +\end{align*} + +We've essentially created a 1x1 system for $x_2$ and now that's solved we can back substitute it +into equation (1) (or equation (2), it doesn't matter) to work out the value of $x_1$: + +\begin{align*} +3x_1 + 4x_2 &= 2 \\ +3x_1 - 1 &= 2 \\ +3x_1 &= 6 \\ +x_1 &= 2 +\end{align*} + +You can check the values for $x_1$ and $x_2$ are correct by substituting them into equation (2). + +
+ +### 3x3 System + +A 3x3 system is one with 3 equations and 3 unknown variables. + +
+ + +#### Example 1 + +\begin{align*} +2x_1 + 3x_2 - x_3 &= 5 &\text{(1)} \\ +4x_1 + 4x_2 - 3x_3 &= 5 &\text{(2)} \\ +2x_1 - 3x_2 + x_3 &= 5 &\text{(3)} \\ +\end{align*} + + + +The first step is to eliminate $x_1$ from (2) and (3) using (1): + +\begin{align*} +\text{(2)}-2\times\text{(1)} = -2x_2 -x_3 &= -1 &\text{(4)} \\ +\text{(3)}-\text{(1)} = -6x_2 + 3x_3 &= -6 &\text{(5)} \\ +\end{align*} + +This has created a 2x2 system of $x_2$ and $x_3$ which can be solved as any other 2x2 system. +I'm too lazy to type up the working, but it is solved like any other 2x2 system. + +\begin{align*} +x_2 &= -2 +x_3 &= 5 +\end{align*} + +These values can be back-substituted into any of the first 3 equations to find out $x_1$: + +\begin{align*} +-2x_1 + 3x_2 - x_3 = 2x_1 + 6 - 3 = 5 \rightarrow x_1 = 1 +\end{align*} + +