Plugin installed incorrectly. Rename plugin directory '_include' to 'include'.
Plugin installed incorrectly. Rename plugin directory '__include' to 'include'.
lecture_5
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| lecture_5 [2015/02/04 11:56] – created rupert | lecture_5 [2017/02/07 10:11] (current) – [Gaussian elimination] rupert | ||
|---|---|---|---|
| Line 21: | Line 21: | ||
| - $x_2$ and $x_5$ are free, so set $x_2=s$ where $s\in \mathbb{R}$ and $x_5=t$ where $t\in \mathbb{R}$ | - $x_2$ and $x_5$ are free, so set $x_2=s$ where $s\in \mathbb{R}$ and $x_5=t$ where $t\in \mathbb{R}$ | ||
| - Working from the bottom: $$ x_4+3x_5=4\implies x_4=4-3x_5=4-3t$$ $$ x_3+x_4+x_5=5\implies x_3=5-x_4-x_5=5-(4-3t)-t=1+2t$$ $$ x_1+2x_2+3x_3=8\implies x_1=8-2x_2-3x_3=8-2s-3(1+2t)=5-2s-6t.$$ | - Working from the bottom: $$ x_4+3x_5=4\implies x_4=4-3x_5=4-3t$$ $$ x_3+x_4+x_5=5\implies x_3=5-x_4-x_5=5-(4-3t)-t=1+2t$$ $$ x_1+2x_2+3x_3=8\implies x_1=8-2x_2-3x_3=8-2s-3(1+2t)=5-2s-6t.$$ | ||
| + | |||
| + | So \begin{align*} x_1& | ||
| + | where $s$ and $t$ are free parameters, i.e. $s,t\in \mathbb{R}$. | ||
| Writing this solution in vector form gives: | Writing this solution in vector form gives: | ||
| Line 26: | Line 29: | ||
| = \begin{bmatrix} 5\\0\\1\\4\\0\end{bmatrix}+s\begin{bmatrix} -2\\1\\0\\0\\0\end{bmatrix} | = \begin{bmatrix} 5\\0\\1\\4\\0\end{bmatrix}+s\begin{bmatrix} -2\\1\\0\\0\\0\end{bmatrix} | ||
| +t\begin{bmatrix} -6\\0\\2\\-3\\1\end{bmatrix}, | +t\begin{bmatrix} -6\\0\\2\\-3\\1\end{bmatrix}, | ||
| + | |||
| + | Note that the solution set is a subset of $\mathbb{R}^5$, | ||
| + | |||
| + | ==== Gaussian elimination ==== | ||
| + | |||
| + | We've seen that putting a matrix into REF (or even better, in RREF) makes it easier to solve equations. | ||
| + | |||
| + | {{page> | ||
| + | |||
| + | === Example === | ||
| + | |||
| + | Use Gaussian elimination to solve the linear system | ||
| + | \begin{align*} 2x+y+3z+4w& | ||
| + | |||
| + | == Solution 1 == | ||
| + | |||
| + | We put the augmented matrix into REF: | ||
| + | \begin{align*} | ||
| + | \def\go# | ||
| + | \def\ar# | ||
| + | & | ||
| + | \ar{\text{reorder rows (to avoid division)}} | ||
| + | \go{1& | ||
| + | \ar{R2\to R2-R1\text{ and }R3\to R3-2R2} | ||
| + | \go{1& | ||
| + | \ar{R3\to R3+R2} | ||
| + | \go{1& | ||
| + | \ar{R3\to-\tfrac13R3} | ||
| + | \go{1& | ||
| + | \end{align*} | ||
| + | This is in REF. There are leading entries in the columns for $x,y,z$ but not for $w$, so $w=t$ is a free variable (where $t\in\mathbb{R}$). Now | ||
| + | $$ z-w=6\implies z=6+w=6+t$$ | ||
| + | $$ y+w=5\implies y=5-w=5-t$$ | ||
| + | $$ x+y+3z+w=25\implies x=25-y-3z-w=25-(5-t)-3(6+t)-t=2-3t.$$ | ||
| + | So | ||
| + | $$ \begin{bmatrix}x\\y\\z\\w\end{bmatrix}=\begin{bmatrix} 2\\5\\6\\0\end{bmatrix}+t\begin{bmatrix}-3\\-1\\1\\1\end{bmatrix}, | ||
| + | |||
| + | == Solution 2 == | ||
| + | |||
| + | We put the augmented matrix into RREF. | ||
| + | \begin{align*} | ||
| + | \def\go# | ||
| + | \def\ar# | ||
| + | & | ||
| + | \ar{\text{do everything as above}} | ||
| + | \go{1& | ||
| + | \ar{R1\to R1-3R3} | ||
| + | \go{1& | ||
| + | \ar{R1\to R1-R2} | ||
| + | \go{1& | ||
| + | \end{align*} | ||
| + | This is in RREF. There are leading entries in the columns for $x,y,z$ but not for $w$, so $w=t$ is a free variable (where $t\in\mathbb{R}$). Now | ||
| + | $$ z-w=6\implies z=6+w=6+t$$ | ||
| + | $$ y+w=5\implies y=5-w=5-t$$ | ||
| + | $$ x+3w=2\implies x=2-3w=2-3t$$ | ||
| + | So | ||
| + | $$ \begin{bmatrix}x\\y\\z\\w\end{bmatrix}=\begin{bmatrix} 2\\5\\6\\0\end{bmatrix}+t\begin{bmatrix}-3\\-1\\1\\1\end{bmatrix}, | ||
| + | |||
| + | |||
lecture_5.1423051012.txt.gz · Last modified: by rupert
