class: center, middle, inverse, title-slide .title[ # Systems of Linear Equations ] .subtitle[ ## Session 03 ] .author[ ### Alejandro Ucan ] .date[ ### 2023-09-24 ] ---
# Goals * Describe the problem of find equilibriums between linear models. <br/><br/> * Describe a system of linear equations. <br/><br/> * Describe the method to solve a system of linear equations. <br/><br/> --- # Equilibrium > A small company offers offers e-markating services. The company pays the salary of one content creator and one web designer. If the fixed expenses of the company are 500mxn of web servers, 1000mxn of rent and 800mxn of light bills. The concent creator earns 100mxn per hour and the web designer earns 150mxn per hour. <br/><br/> If the company charges 500mxn per hour of work, determine the total cost and the income functions. <br/><br/> `$$C(t)=2300+250t$$` `$$I(t)=500t$$` We want to know how many hours need the company to sell in order to pay the fixed expenses? --- ## Graphically > The equilibrium is the point where the cost and income functions intersect. <img src="index_files/figure-html/unnamed-chunk-1-1.png" width="60%" style="display: block; margin: auto;" /> --- ## Analitically > In order to find our equilibrium we need to solve the following equation: `$$C(t)=I(t)$$` -- <br/><br/> #### Solution `$$2300+250t=500t$$` `$$2300=500t-250t$$` `$$2300=250t$$` `$$t=9.2$$` --- # System of Linear Equations > A system of linear equations is a set of equations that can be written in the form: `$$a_{11}x_1+a_{12}x_2+...+a_{1n}x_n=b_1$$` `$$a_{21}x_1+a_{22}x_2+...+a_{2n}x_n=b_2$$` `$$...$$` `$$a_{m1}x_1+a_{m2}x_2+...+a_{mn}x_n=b_m$$` where `\(a_{ij}\)` and `\(b_i\)` are real numbers and `\(x_1,x_2,...,x_n\)` are variables. <br/><br/> We have that the corresponding variables are in a linear relation with each other. --- ## Example Consider the following system of linear equations: `$$2x+3y=8$$` `$$-x+2y=3$$` Note, that the system has two equations and two variables. Even more. We can state our linear relation if we isolate one variable. `$$y=\frac{8-2x}{3}$$` `$$y=\frac{3+x}{2}$$` --- ## Linear combination method > The linear combination method is a method to solve a system of linear equations. The method consists in multiply each equation by a constant and add the equations to eliminate one variable. -- <br/><br/> #### Example 1 Find the solution for `\(2x+3y=8\)` and `\(-x+2y=3.\)` -- <br/><br/> #### Solution `$$\begin{cases} 2x+3y=8 \\ -x+2y=3 \end{cases} \Rightarrow \begin{cases} 2x+3y=8 \\ 2(-x+2y)=2(3) \end{cases} \Rightarrow \begin{cases} 2x+3y=8 \\ -2x+4y=6 \end{cases}$$` --- #### Solution of Example 1 Now we add up the equations: `$$2x+3y+(-2x+4y)=8+6$$` `$$7y=14\Rightarrow y=2$$` Finally, we substitute `\(y\)` in one of the equations: `$$2x+3(2)=8$$` `$$2x+6=8\Rightarrow 2x=2\Rightarrow x=1$$` Therefore the equilibrium point will be `\((x,y)=(1,2).\)` --- #### Example 2: Find the solution for `\(3x+2y=10\)` and `\(x+2y=2.\)` -- <br/><br/> #### Solution `$$\begin{cases} 3x+2y=10 \\ x+2y=2 \end{cases}\Rightarrow \begin{cases} 3x+2y=10 \\ -3(x+2y)=-3(2) \end{cases} \Rightarrow \begin{cases} 3x+2y=10 \\ -3x-6y=-6 \end{cases}$$` Now we add up the equations: `$$3x+2y+(-3x-6y)=10-6$$` `$$-4y=4\Rightarrow y=-1$$` Finally, we substitute `\(y\)` in one of the equations: `$$x+2(-1)=2$$` `$$x-2=2\Rightarrow x=4$$` Therefore the equilibrium point will be `\((x,y)=(4,-1).\)` --- #### Example 3: Find the solution for `\(2x+3y=8\)` and `\(2x+3y=3.\)` -- <br/><br/> #### Solution `$$\begin{cases} 2x+3y=8 \\ 2x+3y=3 \end{cases}\Rightarrow \begin{cases} 2x+3y=8 \\ -1(2x+3y)=-1(3) \end{cases} \Rightarrow \begin{cases} 2x+3y=8 \\ -2x-3y=-3 \end{cases}$$` Now we add up the equations: `$$2x+3y+(-2x-3y)=8-3$$` We obtain `\(0=5,\)` but this is not possible. Therefore, the system has no solution. --- #### Example 4: Find the solution for `\(2x+3y=8\)` and `\(4x+6y=16.\)` -- <br/><br/> #### Solution `$$\begin{cases} 2x+3y=8 \\ 4x+6y=16 \end{cases}\Rightarrow \begin{cases} 2x+3y=8 \\ \frac{-1}{2}(4x+6y)=\frac{-1}{2}(16) \end{cases} \Rightarrow \begin{cases} 2x+3y=8 \\ -2x-3y=-8 \end{cases}$$` Now we add up the equations: `$$2x+3y+(-2x-3y)=8-8$$` `$$0=0$$` From the fact that `\(0=0\)` is always satisfied, we can conclude that the system has infinite solutions because it doesn't matter what value we assign to `\(x\)` or `\(y\)` the equation will always be satisfied. --- ## Solutions of a system of linear equations > A system of linear equations can have three types of solutions: <br/><br/> > * No solution <br/><br/> > * One solution <br/><br/> > * Infinite solutions --- # What if we have more than two equations and two variables? > The linear combination method can be used to solve a system of linear equations with more than two equations and two variables. The method consists in multiply each equation by a constant and add the equations to eliminate one variable. Once we have reduced our problem, we can use the same method to solve the system. --- #### Example 1 $$ \begin{cases} x+y+z=0 \\ x-y+z=-2 \\ x+y-z=6 \end{cases}$$ --- <br/><br/> #### Solution We remove the `\(z\)` variable, by applying the linear combination method with the first and third equation, and second and third equations: `$$\begin{cases} 2x+2y=6 \\ 2x=4 \end{cases}$$` This implies that `\(x=2,\)` and substituting in the first equation we obtain that `\(2y=6-4=2\Rightarrow y=1.\)` Finally, we substitute `\(x\)` and `\(y\)` in one of the equations: `$$2+1+z=0\Rightarrow z=-3$$` --- #### Example 2 A factory has a fixed weekly production of 42 units. The factory supplies three different wholesalers that demand the whole production. For a given week, the first wholesaler demands as many units as the secont and the third together, while the second request 10% more than the third. How many units are supplied to each wholesaler? -- <br/><br/> #### Solution The set of equations that describe the problem are: `$$x+y+z=42$$` `$$x=y+z$$` `$$y=1.1z$$` --- #### Example 2 Previous system of equations is equivalent to: `$$\begin{cases} x+y+z=42 \\ x-y-z=0 \\ y-1.1z=0 \end{cases}$$` we use the linear combination to remove the `\(z\)` variable. The reduced system is: `$$\begin{cases} 2x=42 \\ x+2.1y=42 \end{cases},$$` whose solutions are `\(x=21\)` and `\(y=10.\)` Finally, we substitute `\(x\)` and `\(y\)` in one of the equations: `$$21+10+z=42\Rightarrow z=11.$$`