Math 1410, Spring 2020

Systems of Equations

January 28, 2020

Sean Fitzpatrick
University of Lethbridge

Recap

Warm-up

Find the distance from the point \(P=(1,2,3)\) to the line

\begin{equation*} \vec{r}(t) = \langle 2-t, 1+2t, 1+t\rangle\text{.} \end{equation*}
How about the distance from \(P\) to the plane \(2x-y+z=2\text{?}\)

Equations of lines and planes

Lines are given by equations like

\begin{equation*} \la x,y,z\ra = \la x_0+at, y_0+bt,z_0+ct\ra\text{,} \end{equation*}
or \(x=x_0+at, y=y_0+bt, z=z_0+ct\text{.}\)

Planes are given by equations like \(2x+5y-10z=15\text{.}\)

These equations are linear. Intersections (two lines, line-plane, two planes) involve satisfying multiple linear equations simultaneously.

Systems of Linear Equations

Terminiology

Definition:

An equation involving variables \(x_1,x_2,\ldots, x_n\) is linear if it only involves addition and subtraction of constant multiples of the variable, and constant terms.

A system of linear equations is a collection of one or more linear equations, all involving the same variables. (Although not all variables must appear in all equations.)

A solution to a system of linear equations is a set of values for the variables that satisfies all equations in the system simultaneously.

Examples

Equations like \(3x-4=7\text{,}\) \(\frac12 x - \sqrt{2}y = 10\text{,}\) and

\begin{equation*} 4x_1-2x_2+3x_3-7x_4+18x_5=-1410 \end{equation*}
are linear.

Equations like \(y=x^2\text{,}\) \(x^2-4y^2+z=4\text{,}\) and \(5wxyz=11\) are not. We can multiply variables by constants, but not by each other.

A system of linear equations could look like:

\begin{align*} 2x-y \amp = 4 \\ -x+2y \amp = 6\\ 11x-7y \amp =2 \end{align*}

or

\begin{align*} 2x-3y+4z \amp =2\\ x+y \amp =4\\ x-y+z \amp =1 \end{align*}

A solution to the second system is \(x=2, y=2, z=1\text{.}\) (Why?)

Solving systems: elementary operations

Any system of linear equations can be solved using the following three operations:

  1. Swap positions of two equations. (Change the order)

  2. Multiply both sides of an equation by a nonzero constant.

  3. Add a multiple of one equation to another.

Note that none of these affect the values that will satisfy each equation.

Other operations might be legal, but the above can be “systematized”.

Example: interection of two lines

Suppose we want to know if the lines

\begin{align*} \vec{r}_1(s) \amp = \la 3-2s, -1+s, 2+2s\ra\\ \vec{r}_2(t) \amp = \la -1+4t, 2-t, 3t\ra \end{align*}
intersect. This leads to a system of equations:
\begin{equation*} \begin{matrix} 2s \amp + \amp 4t \amp = \amp 4\\s \amp + \amp t \amp = \amp 3\\2s \amp - \amp 3t \amp = \amp -2\end{matrix}\text{.} \end{equation*}
How do we solve it using elementary operations?

Example: intersection of two planes

The planes \(x-2y+3z=6\) and \(2x+5y-4z=-4\) are not parallel, so they must intersect (in a line). We want to find an equation of this line.

Every point on the line belongs to both planes, so it must satisfy both equations simultaneously. That means we are looking for all solutions to the system

\begin{equation*} \begin{matrix}x \amp -2y \amp +3z \amp =6\\2x \amp +5y \amp -4z \amp =-4\end{matrix}\text{.} \end{equation*}
Note that there are more equations than variables: we expect more than one solution.

Elementary row operations

The augmented matrix

If we're going to be solving lots of linear systems (and we are), then it gets tedious quickly to keep track of all the variables.

A “key idea”: write only the coefficients, and keep track of variables by position. We organize everything in a rectangular array, called a matrix.

Example:

System of equations:

\begin{equation*} \begin{matrix}2x \amp - \amp y \amp + \amp 4z \amp = \amp 7\\-5x \amp + \amp 7y \amp + \amp 8z \amp = \amp 11\\3x \amp - \amp 2y \amp + \amp 81z \amp = \amp 12\end{matrix} \end{equation*}

Augmented matrix:

\begin{equation*} \left[\begin{matrix}2 \amp -1 \amp 4\\-5 \amp 7 \amp 8\\3 \amp -2 \amp 81\end{matrix}\right|\left.\begin{matrix}7\\11\\12\end{matrix}\right] \end{equation*}

From matrix to system

It's important to be able to convert in both directions:

Example:

Write down the system (in variables \(x_1,x_2,x_3,x_4\)) corresponding to the augmented matrix

\begin{equation*} \left[\begin{array}{cccc|c}3 \amp -2 \amp 1 \amp 4 \amp 6\\1 \amp 0 \amp 2 \amp -7 \amp 12\\0 \amp 3 \amp 4 \amp 0 \amp -38\end{array}\right]\text{.} \end{equation*}

Elementary row operations

There are three elementary operations on the rows of a matrix, corresponding to the elementary operations on equations:

  1. Swap any two rows: write \(R_i\leftrightarrow R_j\)

  2. Multiply a row by a nonzero constant (rescale): write \(cR_j\to R_j\)

  3. Add a multiple of one row to another: write \(R_i+cR_j \to R_i\)

Gaussian elimination

There is a standard algorithm for solving a system using row operations:

  • By swapping rows and/or rescaling, get a 1 in row 1, column 1.

    (This is possible unless column 1 consists entirely of zeros.)

  • By adding multiples of row 1 to the other rows, create zeros in all other entries of column 1.

  • Move to row 2, column 2, and repeat (until you reach the last row or column).

Example

For the system below, write down the augmented matrix, and use Gaussian elimination to simplify.

\begin{equation*} \begin{matrix} 2x \amp - \amp 4y \amp + \amp 2z \amp = \amp 8\\ x \amp- \amp 3y \amp - \amp z \amp = \amp 5\\ -x \amp + \amp 2y \amp + \amp z \amp = \amp 3 \end{matrix} \end{equation*}
Then, solve the system, if possible.